Skip to calculator

Dates and durations · Gaps and business days

How long separates two calendar dates?

The main result is a decomposition: 2 years, 5 months, and 10 days, for example. Total days sit beside it. That is not the same need as “how many stay nights.”

Calculate

First bound (order is free: a negative gap is possible).

Second bound. If it is before the start, total days are negative.

How the calculator works

Both dates are required. Calendar days are computed first (end − start, signed). For the decomposition, the engine works on the absolute duration: difference of years, then months, then days, borrowing from the previous month when the arrival day-of-month is smaller than the start’s (Jan 31 → Mar 1, for example). If the end precedes the start, total days are negative, but the decomposition describes the duration in absolute value.

Formula and method

totalJours = datefin − datedébut

Signed civil UTC date difference.

ans, mois, jours = décomposition calendaire de |intervalle|

Adjustment on real month lengths, including leap February.

The decomposition follows the calendar, not an average of 30.44 days per month. Two “one month” intervals do not have the same number of days (February vs March). That is precisely why this tool exists, versus a raw day count. We do not round to the nearest month: the remainder goes into days.

Worked example

From March 15, 2024 to August 25, 2026

Start = 2024-03-15, end = 2026-08-25.

  1. Years: 2 (March 15, 2024 → March 15, 2026).
  2. Months: 5 (March 15 → August 15).
  3. Days: 10 (August 15 → August 25).
  4. Calendar total: 893 days (2024 is a leap year, so Feb 29, 2024 is in the interval).

2 years, 5 months, and 10 days (893 days in total).

Input notes

Start date
Start of the span (signature, jobsite start, opening). No time of day.
End date
Arrival date. Both fields are required: unlike age, there is no implicit “today.”

Assumptions and limits

Assumptions

  • Gregorian calendar, valid dates only.
  • Decomposition on the absolute duration; sign carried by total days.
  • No hours: consecutive Aug 25 and Aug 26 is a 1-day exclusive gap.

Limits

  • A contractual “30-day month” is not recast: we follow the real calendar.
  • Business days are computed in another tool.
  • The decomposition is not unique in a mathematical sense (you could stack otherwise); the rule is the one described: years, then months, then days.

How to read the result

“2 years, 5 months, 10 days” reads like an age, but for any pair of dates. The 893 days serve day penalties, daily interest, or checking a 900-day deadline. If the question is “Jan 1 and Jan 3, is that 2 or 3 days?”, switch to the exclusive / inclusive count: here, Jan 1 → Jan 3 = 2 days total and 0 years 0 months 2 days.

Common mistakes

  • Using this tool for a stay where both bounds count (nights, rental).

    Look at the inclusive count in “days between two dates.” A 14-day gap is not 15 rental days.

  • Taking 30 days per month to check the decomposition.

    February does not have 30 days. The decomposition follows the real civil month.

  • Forgetting that a reversed order makes the total negative.

    That is not an error: absolute duration stays in Y/M/D, the sign is on the total.

Comparison

Which tool for which question
QuestionToolTypical result
What age on Aug 25, 2026?Age26 years, 2 months, 10 days + birthday
How long since Mar 15, 2024?Date gap2 years, 5 months, 10 days + 893 d
How many days from Jul 1 to 15?Days between two dates14 exclusive / 15 inclusive
How many Mon–Fri?Business daysWeekends and optional holidays

Methodology · Sources

Related calculations

Frequently asked questions

Why 893 days and not 2 × 365 + a fraction?

Because 2024 is a leap year: a Feb 29 falls in the interval.

Mar 15, 2024 to Mar 15, 2025: 365 days. Mar 15, 2025 to Mar 15, 2026: 365 days. Mar 15, 2026 to Aug 25, 2026: 163 days. Total 893. A 365.25 × 2.44 calculation is not civil status.

Does the decomposition replace total days?

No. The two answer different clauses.

“Three months from January 31” is not “90 days.” The decomposition says how the calendar advances. Total days says how many dates elapsed. A per-day contract and a monthly rent are not interchangeable.

What happens from January 31 to March 1?

Total days depends on the year (28 or 29 days in February). The decomposition borrows from February.

In 2026 (February 28 days), Jan 31 to Mar 1 is 29 calendar days. The Y/M/D decomposition is not a substitute for that total: for a day count, read the total. Month-ends (31 → 30, 31 → 28) are the case where “one month later” is not a fixed number of days.

Can I compute an age here?

Yes for the decomposition. No for the next birthday and refusing a future birth.

The age tool is built for that: date of birth, today by default, next birthday, Feb 29. Date difference remains the generic deadline tool.

Author and update

Written by Rédaction HexaCalc (editorial team). Content last updated: August 25, 2026. No third-party medical or financial review is claimed.

This calculation uses a standard mathematical identity. See also the methodology.

Need only the number of days?

Exclusive (end − start) or inclusive (both dates count): that is another intent, treated separately.

Count the days between two dates

Category: Dates and durations