Skip to content
OverCalculator
Time & DateMore in Dates & calendars

Date Duration Calculator

Calculate the duration between two dates as full years, months, and days, plus the exact total days, months, and weeks.

Published

Duration

Duration
6 years, 6 months, 26 days
Total days
2,399Exact difference between the dates
Total months
78
Total weeks
342

Jan 15, 2020 → Aug 10, 2026 · calendar-month breakdown; total days are the exact difference.

The first date of the span.
The last date of the span.

Results update as you type.

Uses calendar months and the Gregorian calendar. Months have different lengths, so the breakdown is a calendar reading, not an exact hour count.

Date Duration Calculator

The date duration calculator reports the span between two calendar dates in two complementary ways: a calendar breakdown into full years, months, and days, and an exact count of total days (plus total months and weeks). It is the tool for “how long is it from this date to that date” questions where a plain day count does not tell the whole story.

Use it for contract and notice terms, tenancy and lease periods, project timelines, subscription anniversaries, or any milestone where “2 years and 3 months” reads more naturally than “820 days.”

What this calculator does

Enter a start date and an end date. The primary result is the duration broken into years, months, and days. Supporting results show:

  • Total days — the exact number of days between the two dates.
  • Total months — the same span expressed as months (years × 12 plus months).
  • Total weeks — full 7-day weeks within the total-day count.

The breakdown uses the Gregorian calendar, so month lengths vary (28 to 31 days) and February 29 exists in leap years. The day count includes every leap day that falls in the span.

How the calendar breakdown works

The breakdown counts in calendar units, not average units. First it takes the year difference, then the month difference, then the day difference, and it rebalances from the end: if the end day-of-month is smaller than the start day-of-month, it borrows one month back and adds the number of days in the month before the end date. If the month difference then goes negative, it borrows one year back and adds 12 months.

That is why a span from January 31 to February 28 is 0 years, 0 months, 28 days — the day count is real, but no full calendar month has passed. The total-day count is computed independently as the exact calendar difference between the two dates.

Formula

Let S be the start date and E the end date. Start with:

years=EyearSyear,months=EmonthSmonth,days=EdaySday\text{years} = E_{\text{year}} - S_{\text{year}}, \qquad \text{months} = E_{\text{month}} - S_{\text{month}}, \qquad \text{days} = E_{\text{day}} - S_{\text{day}}

If days < 0, borrow from months:

months=1,days+=days in month before E\text{months} -= 1, \qquad \text{days} \mathrel{+}= \text{days in month before } E

If months < 0, borrow from years:

years=1,months+=12\text{years} -= 1, \qquad \text{months} \mathrel{+}= 12

The exact day count is the calendar difference between the dates:

total days=ES\text{total days} = E - S

total months=years×12+months,total weeks=total days7\text{total months} = \text{years} \times 12 + \text{months}, \qquad \text{total weeks} = \left\lfloor \frac{\text{total days}}{7} \right\rfloor

Worked example

Take the default span: January 15, 2020 to August 10, 2026.

The year difference is 6, the month difference is 8 − 1 = 7, and the day difference is 10 − 15 = −5. Because the day difference is negative, borrow one month:

71=6 months,5+31=26 days7 - 1 = 6 \text{ months}, \qquad -5 + 31 = 26 \text{ days}

so the breakdown is 6 years, 6 months, 26 days. Checking by addition: January 15, 2020 plus 6 years is January 15, 2026, plus 6 months is July 15, 2026, plus 26 days is August 10, 2026.

The exact day count: from January 15, 2020 to January 15, 2026 there are 2,192 days (2020 and 2024 are leap years), and from January 15 to August 10, 2026 there are 207 days:

2,192+207=2,399 total days2{,}192 + 207 = 2{,}399 \text{ total days}

In months and weeks:

6×12+6=78 months,2,3997=342 weeks6 \times 12 + 6 = 78 \text{ months}, \qquad \left\lfloor \frac{2{,}399}{7} \right\rfloor = 342 \text{ weeks}

Interpreting the result

The two readings answer different questions. “6 years, 6 months, 26 days” is the calendar reading: it matches how a birthday, a contract renewal, or a milestone anniversary is usually phrased. “2,399 days” is the exact reading: it is precise, comparable, and unaffected by which months the span crosses. Use the calendar reading for scheduling and the day count for anything that needs an exact number.

The same calendar date pair can produce slightly different breakdowns across tools because month-end conventions differ — some tools snap January 31 to February 28 as “1 month,” while the calendar-arithmetic convention used here reports the actual 28 days. The exact day count should always agree, and that is the number to trust for comparisons.

For a span anchored to a birth date, the age calculator gives the same years/months/days reading plus total months, weeks, and days since birth. To compare two people or two dates side by side, the age difference calculator reports the gap in the same units. If you already have a day count and need it in average months or weeks, the days to months calculator and the days to weeks calculator handle those conversions.

Tips

  • Decide whether you need an inclusive count before quoting a term. A span from January 15 to January 20 is 5 days by exact difference, or 6 days if both endpoints are included.
  • For end-of-month dates, state the convention you used. “End of January to end of February” is unambiguous as a phrase even though the calendar breakdown reads 0 years, 0 months, 28 days.
  • Use the total-day count for anything contractual or comparative; it cannot be distorted by month-length differences.

Common pitfalls

  • Expecting every month to count as 30 or 31 days; the breakdown is calendar-based, not average-based.
  • Forgetting that the day count is exclusive of the end date, then being surprised that a same-day span reports 0 days.
  • Assuming years are always 365 days; a span crossing a leap day includes February 29 in its total.
  • Comparing breakdowns from tools with different month-end conventions without checking the underlying day count.

Sources

Compare Date Duration Calculator with related tools

Frequently asked questions

How does the calculator break a span into years, months, and days?
It counts full calendar years first, then full calendar months, then leftover days. Because months have different lengths, the day component can differ from the raw day count divided by 30; the exact total-day count is always shown separately.
Are both the start date and end date counted?
The total-day count is the exact difference between the two dates, so it does not include the end date itself. If you want an inclusive count that includes both endpoints, add 1 to the total.
Why is the breakdown not the same as dividing total days by 30 or 365?
The breakdown uses calendar months and years rather than average lengths. A span from January 31 to February 28 shows 0 years, 0 months, and 28 days, even though 28 days is close to one month, because February is shorter than the 31-day month it follows.
Does the calculator handle leap years and February 29?
Yes. It uses the Gregorian calendar, so February 29 exists in leap years, and the day count includes leap days. For example, February 29, 2020 to February 29, 2024 is exactly 4 years, 0 months, 0 days, or 1,461 total days.

Related calculators

Date Duration Calculator updated at

Verified