Date Duration Calculator

Updates automatically · "Months"/"years" totals are averages — see the exact breakdown below

The duration between two dates sounds like it should have one obvious answer, but “duration” actually means several genuinely different things depending on what you’re asking. This tool gives you all of them at once, rather than picking one and hiding the rest: an exact calendar breakdown (years, months, and days, calculated the way a person would count on a calendar), flat totals (total days, weeks, months, and years, as single numbers), and an optional business-days count (weekdays only, for anything scoped in working days rather than calendar time).

The exact breakdown is calendar-anchored, not a fixed-length unit — it’s built by walking real calendar months and years, so “1 month” always means one real month’s worth of days, whichever month that happens to be (28 to 31 days), not a fixed 30-day placeholder. This is exact, but it does mean a month-length mismatch has to be resolved somehow: January 31 to February 28 has no clean “one month” answer, since February has no 31st for the anchor to land on. This tool resolves that case to the actual elapsed days (28) rather than forcing a fractional or rounded month — documented honestly in the FAQ below as a real convention choice, not presented as the one obviously correct answer, since a different convention could reasonably resolve it differently.

Total Months and Total Years are a different, separately useful kind of number: averages, not calendar counts. They’re computed as total days divided by the Gregorian calendar’s average month length (30.436875 days) and average year length (365.2425 days) — the same average a leap-year cycle produces over 400 years. This answers “roughly how many months/years is this” as one clean decimal figure, which is exactly what the exact breakdown deliberately doesn’t try to do (a calendar breakdown can’t cleanly express “1.8 years” as a single number — it gives you “1 year, 9 months, 12 days” instead). Both numbers are computed from the same real, leap-year-aware day count; they’re just answering different questions.

Negative durations (end date before start date) always compute, never error. A visible notice appears above the results in that case, and every number shown — total days, the breakdown, business days — is the positive size of the span between the two dates, not a signed negative number that could be misread. Business days count weekdays strictly after the start date, up to and including the end date (a Friday to the following Monday is 1 business day, since Saturday and Sunday fall in between and the start date itself is where you’re counting from, not an elapsed day) — public holidays aren’t excluded, since holiday calendars vary by country and this tool has no way to know which one applies.

Every calculation runs on real calendar math, including real leap years — no approximation smooths over a February 29, and every date field is handled as a plain calendar date (no time-of-day component), so a duration spanning a daylight-saving transition is never off by an hour at the boundary. Nothing is sent anywhere: both dates and every result stay in your browser.

Examples

Frequently asked questions

Why does the exact breakdown sometimes show only days, when I expected a month?
Because some month-length mismatches genuinely have no clean answer. January 31 to February 28, for example, is shown as 28 days rather than "1 month" — there's no February 31 for a one-month anchor to land on, so this tool counts the actual elapsed days instead of rounding to a month that doesn't exist. This is a documented, honest convention (the same approach dateutil.relativedelta-style calculators use), not a bug: a different, equally defensible convention could resolve this edge case differently, which is exactly why the Total Months and Total Years figures above the breakdown are offered separately, as explicit averages rather than a second version of the exact calendar count.
What do "Total Months" and "Total Years" actually mean, versus the breakdown?
They're deliberately different kinds of numbers. The exact breakdown (e.g. "2 years, 3 months, 5 days") is a calendar decomposition, anchored to real month lengths — exact, but not a fixed-length unit. Total Months and Total Years are averages instead: total days divided by 30.436875 (365.2425 / 12) and by 365.2425 respectively, the Gregorian calendar's average month and year length across its 400-year leap cycle. They answer "roughly how many months/years is this" as a single decimal number, which is a genuinely different question from "exactly how much calendar time is this," and both are useful depending on what you're asking.
What happens if the end date is before the start date?
The tool still calculates a result — every number shown (days, weeks, months, years, the breakdown, business days) is always a positive value, the size of the span between the two dates regardless of which one is earlier. A visible notice appears above the results whenever this happens ("End date is before start date"), so it's never ambiguous or mistaken for an error; the two dates are simply swapped for the purposes of the calculation.
How are business days counted?
As the number of weekdays (Monday through Friday) strictly after the start date, up to and including the end date — the same convention Total Days itself uses (an elapsed count, not a count of calendar positions). A Friday to the following Monday, for example, counts 1 business day: Saturday and Sunday are skipped, and Friday itself is the date you're counting FROM, not an elapsed day. Public holidays are not excluded — this tool has no holiday calendar (and holidays vary enormously by country and year), so "business days" here means weekdays only.
Does this account for leap years?
Yes — every calculation uses the real calendar, including real leap years (a year divisible by 4, except century years not divisible by 400), not an approximation. February 28 to March 1 is 1 day in a non-leap year and 2 days in a leap year (crossing the real February 29), and that distinction is exactly what this tool computes, not smoothed over. The Total Years average above does use a fixed 365.2425-day figure that already accounts for leap years on average, which is a different, and separately documented, kind of approximation from the exact day-by-day calendar math the totals and breakdown are built on.