Days Between Dates
Calculate the exact number of days between any two dates
About This Tool
Calculates the number of days between two dates, with options to include or exclude the start and end days. Output is given in days, weeks (with remainder), and months/years (using the Gregorian convention of variable month length).
Leap years are handled correctly. Date inputs accept ISO 8601 (YYYY-MM-DD) or locale formats. Cross-timezone calculations use UTC by default to avoid hour-of-day rounding errors.
Date arithmetic is deceptively complex. The Gregorian calendar's irregular month lengths (28/29/30/31 days), leap-year rule (divisible by 4, except centuries not divisible by 400), and the 1582 calendar reform that removed 10 days when transitioning from Julian to Gregorian all produce edge cases. A simple "subtract dates" works for date pairs in the same year on the same calendar; spanning year boundaries, leap years, and historical dates introduces complications.
The leap-year rule itself produces year-length variation. Most years have 365 days. Years divisible by 4 have 366 (leap year). Years divisible by 100 but not 400 are not leap years (so 1900 was not a leap year despite being divisible by 4). Years divisible by 400 are leap years (so 2000 was a leap year despite being divisible by 100). The rule keeps the average year length at 365.2425 days, close to the tropical year of 365.2422 days; the residual drift is about 26 seconds per year, accumulating to one day every 3,300 years.
A worked example: days from 2020-02-15 to 2024-02-15. Naive expectation: 4 years × 365 = 1,460 days. Correct count: 1,461 days, because 2020 was a leap year. Days from 1900-01-01 to 2000-01-01: 36,524 days, accounting for leap-year exceptions at 1900 (not leap) and 2000 (leap). Days from 1582-10-04 (last Julian date in regions adopting Gregorian immediately) to 1582-10-15 (first Gregorian date) is 1 day, despite the labels appearing to skip 10 days. This is the Gregorian transition; ten dates between October 5 and October 14, 1582 simply did not exist in those regions.
Date difference in human-meaningful units (months, years) is genuinely ambiguous. From January 15 to February 15 is "one month" but is 31 days. From February 15 to March 15 is "one month" but is 28 (or 29) days. The calculator reports both: literal day count for arithmetic precision, calendar-month count for natural-language description. Legal contracts often specify "calendar days" vs "business days" to avoid this ambiguity; the calculator can apply weekend exclusion as an option.
Limitations: the calculator uses the proleptic Gregorian calendar, which extends Gregorian rules backward indefinitely. Dates before 1582 in this system do not match contemporary records that used Julian dates. A historical document dated "March 1, 1500" referred to a Julian date; the proleptic Gregorian equivalent is March 11, 1500. For genealogical or historical research, this offset matters. The calculator does not auto-convert between calendar systems; the user must apply the offset when working with pre-1582 records.
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.