Days Between Dates Calculator
Free days between dates calculator — type two dates and get the exact number of calendar days between them. Works in your browser, no sign-up.
Type a start date and an end date. The calculator returns the number of calendar days between them.
How it works
Both dates are parsed as midnight UTC and subtracted. The result is the difference in milliseconds divided by 86,400,000 (the number of milliseconds in a day). Using UTC avoids the local daylight-saving traps that would otherwise turn a normal day into 23 or 25 hours.
Inclusive or exclusive
Exclusive of the start, inclusive of the end. Jan 1 → Jan 2 = 1 day. If you need an inclusive-both-ends count (e.g. the number of vacation days you get if you take Jan 1 and Jan 2 off), add 1.
Leap years
Automatic. Feb 29 is just another day on the calendar. A span that includes a Feb 29 returns 366 days for the year; otherwise, 365.
Direction
If the end is before the start, the count is negative. That makes “How many days ago was X?” easy: pick X as start, today as end, read the positive number.
What this doesn’t do
- Clock-time duration (9:00 → 17:30): use the time-duration calculator.
- Age (in years/months/days, from a birthdate): use the age calculator.
- Business days only (skip weekends and holidays): not yet — that one needs region-specific holiday data.
Worked examples
-
January 1 to December 31, 2026
364 days between the two dates.
-
Christmas 2025 to Christmas 2026
365 days between the two dates.
Frequently asked questions
How is the difference calculated?
The calculator parses both dates as midnight UTC and subtracts. The difference in milliseconds is divided by 86,400,000 (the number of milliseconds in a day) to get the day count. Doing this in UTC sidesteps daylight-saving boundaries that would otherwise add a spurious 23- or 25-hour day.
Inclusive or exclusive?
Exclusive of the start, inclusive of the end. January 1 to January 2 returns 1 day — you start on the 1st, end on the 2nd, one day has passed. For "inclusive on both ends" counts (e.g. the number of *days off* on a vacation that spans Jan 1 and Jan 2), add 1.
Does it handle leap years?
Yes — automatically. The math is just the time difference in milliseconds, so February 29 is just another day. A year that includes a leap day returns 366 days; a regular year returns 365.
Reversed dates?
If the end is earlier than the start the result is negative — e.g. January 10 to January 1 returns −9 days. Useful for "how many days ago" calculations: pick the past date as the start, today as the end, and you get a positive day count.
How about hours, minutes, business days?
This one is calendar days only. For a clock-time duration (e.g. 9:00 to 17:30) use the time-duration calculator. We'll add a business-days (workdays-only) calculator in a future version — that one needs region-specific holiday handling.
Related calculators
Age Calculator
Free age calculator — type a birthdate and a reference date and get exact age in years, months and days. Defaults to today. Runs in your browser.
EverydayTime Duration Calculator
Free time duration calculator — type a start time and end time and get the hours and minutes between them. Handles times that cross midnight. Works in your browser.