Days Between Dates
Count the exact days between any two dates — perfect for countdowns, project timelines, and age-in-days math.
How it works
Both dates are converted to midnight UTC and subtracted; dividing the millisecond difference by 86,400,000 (the milliseconds in a day) gives the exact day count. Using UTC instead of your local timezone avoids off-by-one errors around daylight saving changes. The result also breaks down into whole weeks plus leftover days, and approximates months (using the average 30.44-day month) and years (365.25 days, which accounts for leap years).
How to use
- Pick the start date and the end date from the two date pickers.
- The exact day count appears immediately, with a breakdown into whole weeks plus leftover days.
- Read on for the approximations in months (using the average 30.44-day month) and years (365.25 days, which accounts for leap years).
- Use it for countdowns (“how many days until the trip?”), project timelines, or age-in-days math. For age-in-days, set the start date to a birthday and the end date to today.
Frequently asked questions
Is the count inclusive or exclusive?
Exclusive: it is the difference between the two midnights, so January 1 to January 2 is 1 day. If you need to count both endpoints (for example, nights in a hotel), add one. A same-day start and end gives 0 days.
Why does it convert dates to UTC first?
Both dates are converted to midnight UTC before subtracting, which avoids off-by-one errors when a daylight-saving change falls between them. The millisecond math itself is exact — 86,400,000 ms per day, no rounding involved.
How are months approximated?
By dividing the day count by 30.44 — the average month length (365.25 ÷ 12). It is an approximation, since calendar months run from 28 to 31 days.
And years?
Days divided by 365.25, which accounts for leap years. Four years including one leap day is 1461 days, which shows as exactly 4 years. For example, 730 days shows as just under 2 years (730 ÷ 365.25 ≈ 1.9986).