Date difference calculator

Find the exact gap between two dates in years, months, and days, plus the total number of days.

Difference: -

Enter both dates.

Formula and algorithm

Worked examples

Across years

Input: 2000-01-01 to 2026-06-07

Output: 26y 5m 6d

9,654 total days between the two dates.

One week

Input: 2026-06-01 to 2026-06-08

Output: 0y 0m 7d

7 total days.

Reversed input

Input: 2026-06-07 to 2000-01-01

Output: 26y 5m 6d

Order is ignored; same result as the forward direction.

FAQ

Does it include both end dates?

The total days is the count between the dates; it does not add an extra day for the end date.

Are leap years handled?

Yes. February 29 and leap years are counted correctly using a UTC calendar.

Why UTC?

Using UTC avoids off-by-one errors that local time zones and daylight saving can introduce.

Updated: June 7, 2026