Date Difference Calculator (days between dates)
Count the exact time between two dates in years, months, and days, plus total days and weeks — correctly handling leap years and month lengths.
Counting time between two dates
Working out the gap between two dates sounds trivial until you try it by hand. Months have different lengths, leap years add a day every four years (but not every century, except every fourth century), and "one month later" isn't a fixed number of days. This calculator handles all of that exactly.
Two different answers, both correct
There are two valid ways to express a gap. The calendarbreakdown — years, months, and days — matches how people talk, but the "months" in it are variable-length. The total days figure is an exact count with no ambiguity. Both are shown, and they answer slightly different questions: "how long ago?" versus "how many days?".
The leap-year rules
A year is a leap year if it's divisible by 4 — except century years, which must be divisible by 400. So 1900 was not a leap year but 2000was. That exception catches out a lot of hand calculations and quite a lot of software, and it's why counting days across long spans is best left to a tool.
Worked example
From 1 January 2000 to 15 March 2024 is 24 years, 2 months, and 14 days — or 8840 days in total, which is about 1263 weeks. Those 24 years included six leap days, and the year 2000 counted as one of them thanks to the divisible-by-400 rule.
Related
To work out an age and the next birthday specifically, use theage calculator; to convert a plain duration between units, see the time converter.
Common questions
- Does this include the end date in the count?
- It counts the days between the two dates, so 1 March to 3 March is 2 days rather than 3. If you need the inclusive count — the number of days a period covers, for booking or billing — add one. Getting this wrong by a day is the classic off-by-one error in date arithmetic, and which convention you want depends entirely on the question you are asking.
- How are leap years handled?
- Exactly, using the full Gregorian rule: a year is a leap year if divisible by 4, except centuries, unless divisible by 400. So 2000 was a leap year and 1900 was not. The calculation walks the real calendar rather than assuming 365.25 days, so a span crossing 29 February counts that day properly.
- Why does the number of months not match my own count?
- Because months are not equal, so "one month" has no fixed length. From 31 January, a month later could reasonably be 28 February, 2 March, or 3 March, and different systems make different choices. This calculator reports whole calendar months plus leftover days, which is usually what people mean — but if you need an exact duration, work in days.
- Can I use this for age?
- You can, but the age calculator is the better tool for it — it reports years, months and days the way ages are actually stated, and handles the 29 February birthday case explicitly. Use date difference when you want a raw span, and the age calculator when you want somebody's age.