Date Difference Calculator

MDN Date & Time Tools

Countבס״ד

Count the days between two calendar dates, and see the same gap expressed in weeks, months and years. This is plain calendar arithmetic: no time zone, no clock and no daylight saving enters the result.

Days between two dates

Result

0 days

Weeks and days
—
Calendar breakdown
—
Start date
—
End date
—
Counting both dates
—
Direction
—

Month and year parts count whole anniversaries of the start date, using the same rule as the add and subtract tool. If the start day does not exist in a later month, the anniversary is the last day of that month.

Why the answer is exact

A calendar date is not a moment. It has no hour, so it has no offset, so it cannot be shifted by daylight saving. The page converts each date to a whole number of days since a fixed reference point, subtracts the two numbers and converts the result back. Nothing in that path can round, drift or lose an hour, and the answer for 8 March 2026 is the same whether you are in Los Angeles or Tokyo.

That is also why a date difference and a duration are not the same thing. If an event starts at 23:00 on one day and ends at 01:00 two days later, the calendar difference between the two dates is two days, while the elapsed time may be 26 hours, because one night was an hour longer than the other.

Including or excluding the end date

By default the count measures the distance between the two dates: Monday to Wednesday is two days. Tick the box and the same span becomes three days, because both ends are counted. Both readings are common, which is why the choice is explicit rather than hidden inside the tool.

Common questions

Is a leap day handled?

Yes. February has 29 days in 2024 and 2028, and 28 days in 2026. A century year is a leap year only when it divides by 400, so 2000 was a leap year and 1900 was not.

Can the result be negative?

If the end date is earlier than the start date, the tool says so and shows the size of the gap in the other direction. The day count is never silently flipped without a label.

How do I count working days instead?

The business day calculator counts only working days, with the weekends and the excluded dates you choose.