Date Difference Calculator

The exact number of days, weeks, months and years between any two dates.

Inputs

Result

Difference
864 days
2y 4m 13d

Visual breakdown

Days
864
Weeks
123.4
Months
28.4
Years
2.37
2024-01-012026-05-14
864 days elapsed864

Formula

Days = ⌊(to − from) ÷ 86,400,000 ms⌋. Years/months/days use real calendar arithmetic.

Example

1 Jan 2024 → 14 May 2026 = 864 days (≈ 2.37 years).

Frequently asked

Are both endpoints included?

We count the elapsed days between them — neither endpoint counts as a separate day. To include both, add 1.

Does it handle dates in the past?

Yes. Swapping order shows the same difference, marked as reverse.

Are leap years handled?

Yes — calculations use real calendar days, so 29 Feb is counted in leap years.

Related calculators