Days Between Two Dates
Absolute number of days between any two calendar dates.
Calculator
Enter two dates above to count the days between them.
How it works
The calculator parses both dates as midnight UTC, computes the absolute difference of their unix timestamps, and divides by the number of seconds in a 24-hour period to obtain a whole-day count. Because both dates are anchored at the same time of day in the same time zone, the difference is always a clean integer regardless of leap-second adjustments, and there is no off-by-one drift across daylight-saving transitions.
When this is useful
Day counts come up constantly in real life. Hotels and rental contracts price by night — which is one less than the number of days between check-in and check-out, but the day-count is what shows up in spreadsheets and confirmation emails. Project managers convert task durations into business-day equivalents starting from a calendar-day count. Visa overstays, contractual notice periods, and prescription expirations are all anchored to day counts. Even casual planners use it for trip length and counting down to events.
FAQ
Does the order of the two dates matter?
No. The result is the absolute difference, so swapping the two dates always returns the same count. If you need a signed count (positive when the second date is later, negative when earlier), this calculator does not provide that — it answers the most common question, which is the magnitude of the gap.
Are the start and end dates included in the count?
Neither is double-counted, and the result is the number of midnight boundaries crossed. Concretely: from January 1 to January 2 is one day; from January 1 to January 3 is two days. If you need an inclusive count (how many days does the period span?), add one to the result.
How are leap years handled?
Spans that cross February 29 are counted accurately. A year span that includes February 29 returns 366 days, and one that does not returns 365. Spans across century boundaries respect the rule that years divisible by 100 but not by 400 are not leap years.
Can I count business days instead of calendar days?
This calculator returns calendar-day counts. Business-day calculations require a list of public holidays, which differ by country and even by region — so they are out of scope here. As a rough estimate, multiply the calendar-day count by 5/7 and subtract a few days for major holidays in the relevant period.
What is the largest date range supported?
Any range your browser can parse, including spans of multiple millennia. Internally the math uses 64-bit integers, so overflow is not a practical concern.