Date Difference Calculator

Counting days between two dates by hand is error-prone because months differ in length and leap years add a day. This calculator does it exactly: it converts each date to a day number on the Gregorian calendar and subtracts, so February 29 and varying month lengths are handled automatically. It reports the precise number of days, plus the equivalent in weeks, approximate months and approximate years, so you can measure project spans, anniversaries, deadlines or ages with confidence.

0.00
0.00
0.00
0.00

Date difference formula

Days = |end date (in days) - start date (in days)|
Weeks = days / 7
Approx. months = days / 30.4375
Approx. years = days / 365.25

Each date is mapped to a serial day number on the Gregorian calendar so leap days are included. The day count is exact. Months use the average month length of 30.4375 days, and years use 365.25 days, which both account for leap years over a 4-year cycle.

Calendar context

  • The Gregorian calendar is the international civil standard, defined by leap years every 4 years.
  • Century years are leap years only if divisible by 400: 2000 was, 1900 and 2100 are not.
  • The average year length is 365.2425 days; this tool uses 365.25 for the year approximation.
  • A common year has 365 days; a leap year has 366.
  • The exact day count is always reliable; month and year figures are approximations.

Date difference: frequently asked questions

How does the calculator count days between two dates?

It converts each date to a count of days since a fixed reference using the proleptic Gregorian calendar, then subtracts. This handles leap years automatically: 2024 and 2028 have 366 days, most other years 365. The result is the exact whole number of days from the start date to the end date.

Are both the start and end dates included?

The plain difference counts the nights between, so the start date is day zero and the end date is the last day. For example, 1 January to 2 January is 1 day. If you want both endpoints counted (an inclusive span), add one to the day result.

How are months and years calculated?

Because months vary from 28 to 31 days, the calculator reports approximate months as days divided by 30.4375 (the average month length over a 4-year cycle) and approximate years as days divided by 365.25. The day count is always exact; months and years are convenient approximations.

Does it handle leap years correctly?

Yes. The day count uses the actual Gregorian calendar, so February 29 in leap years (years divisible by 4, except centuries not divisible by 400) is included automatically. You do not need to adjust anything.

What if the end date is before the start date?

The calculator returns the absolute number of days, so the order of the two dates does not change the magnitude of the result. Whether you enter the earlier or later date first, you get the same positive day count between them.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.