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.
Choose the output for the question
For an anniversary-style description, use the calendar years, months, and days breakdown. For a duration-based calculation, use total days and preserve the two endpoint dates. Those answers should not be substituted blindly: a month is not a fixed day count. If another workflow includes both endpoints, document that rule separately rather than silently adding a day to this result.
How the calendar breakdown works
The breakdown uses original-start rollover anchors, a convention defined by this calculator. For each whole month count N, move the original start year and month forward N months, start on the first day of that target month, and add the original start day minus one calendar days. If that day does not exist in the target month, it rolls into the following month. Every anchor is calculated from the original start; do not repeatedly add months to the previous anchor.
Choose the greatest N whose anchor is on or before the end date. The years are N divided by 12 with the fraction discarded, the months are N modulo 12, and the remaining days are the calendar-day difference from that anchor to the end. This convention does not clamp January 31 to February 28. For January 31, 2026, the one-month anchor is March 3: February 28 is 0 months and 28 days, March 1 is 0 months and 29 days, and March 3 is 1 month and 0 days. The two-month anchor is March 31, independently of the rolled one-month anchor. The three-month anchor is May 1, so January 31 to May 1 is 3 months and 0 days.
Formula
Let A(N) be the original-start rollover anchor and let S and E be the ordered start and end dates:
The total-day count is independent of that decomposition and is the exclusive calendar-day difference between the dates:
Worked example
Take the default span: January 15, 2020 to August 10, 2026.
The original-start anchor at 78 months is July 15, 2026. The 79-month anchor is August 15, after the end date, so 78 is the greatest eligible month count. Splitting 78 by 12 gives 6 years and 6 months. July 15 to August 10 is 26 calendar days, so the breakdown is 6 years, 6 months, 26 days.
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:
In months and 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 counts completed birthdays and reports total months, weeks, and days since birth. Its February 28 convention for February 29 birthdays can produce a different years/months/days reading from this generic duration calculator. 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
- ISO, ISO 8601-1:2019 — Date and time — Representations for information interchange — unambiguous YYYY-MM-DD date representation used by the inputs.
- Wikipedia, Gregorian calendar — month lengths and the leap-year rule behind the day counts.