CalcDuck

Date Difference Calculator

Date Difference Calculator

Fill in the fields to see your result.

The difference between two dates is counted in whole years, then whole months, then the remaining days — for example, January 1, 2020 to January 1, 2021 is exactly 1 year, or 366 days, since 2020 was a leap year. Enter any two dates, in either order, to see the full years-months-days breakdown plus totals in days, weeks and months.

Tip: “Copy with settings” shares a link that opens this calculator with your numbers already filled in.

How this calculator works

This calculator finds the exact span between two calendar dates — useful for contracts, project timelines, historical research, or just settling an argument about how long ago something happened. Enter the two dates in whichever order is convenient; the calculator sorts them internally and tells you which one came first.

The main result is a calendar breakdown in years, months and days, the same convention used by age calculators: you count the largest number of whole years, then whole months, then whatever days are left over. Underneath that you also get the plain totals in days, weeks and months, which are often what spreadsheets and contracts actually ask for.

How the difference is counted

1. Sort the two dates so the calculation always runs from the earlier date to the later one.2. Count the largest number of whole months from the earlier date that does not pass the later date (a month added to Jan 31 lands on Feb 28/29 — day-of-month is clamped).3. Years = whole months ÷ 12; the remainder stays as months. Days = whatever is left after stepping forward that many months.

Total days, weeks and months are computed from the same UTC day count, so they never disagree with each other even though the years-months-days split uses calendar months of unequal length.

Worked example

  1. First date: May 15, 1990. Second date: May 14, 2024 (entered in that order).
  2. The earlier date is May 15, 1990, so the calculation runs from there to May 14, 2024.
  3. 407 whole months fit (408 would land on May 15, one day past the target); that is 33 years and 11 months, leaving 29 days.
  4. Result: 33 years, 11 months, 29 days — 12,418 total days, or 1,774 total weeks.

Frequently asked questions

Does it matter which date I enter first?

No. The calculator sorts the two dates before computing, so entering them in reverse order gives the identical years-months-days breakdown — it just tells you that the first date was after the second.

Why do total days and the years-months-days breakdown seem to use different math?

Total days is a plain count of calendar days between the two dates. The years-months-days breakdown instead counts whole calendar months, which have different lengths, so the two numbers describe the same span in different units rather than disagreeing.

Can I use this for a legal or contract deadline?

It gives the calendar math correctly, but some contracts and statutes define date counting differently (for example, whether the start date itself counts). Check the specific wording if the exact day matters legally.

How is this different from the Days Until Calculator?

This calculator gives a full years-months-days breakdown between any two dates. The Days Until Calculator is built specifically around counting down to a single future date from today, including a weeks-and-days view and an already-passed message.

How many total weeks are in exactly one calendar year?

52 weeks and 1 day in a common (365-day) year, or 52 weeks and 2 days in a leap (366-day) year. A week is fixed at 7 days, and 365 ÷ 7 = 52 remainder 1, while 366 ÷ 7 = 52 remainder 2 — so a year is never an exact whole number of weeks.

Sources

Related calculators