Skip to content

CAL · From → to

Days between two dates.

From
To

Pick both dates.

Times are optional and use the 24-hour clock — 18:30, not 6:30 pm. Leave them blank to count whole calendar days.

How it counts

With dates alone, the result is the number of days from the first to the second — the nights between them, not the calendar squares touched. 1 January to 2 January is one day. If you are counting something where both ends are occupied, like nights in a hotel against days of a trip, add one.

Add a time to either side and the question changes. It stops being "how many days on the calendar" and becomes "how long", so the answer is measured as a duration and broken into days, hours and minutes. Those are genuinely different sums, and a tool that uses one for both is wrong somewhere — which is why this one switches.

Why the arithmetic is fussier than it looks

Subtracting two timestamps and dividing by 86,400 is the obvious way to do this, and it is wrong twice a year. When the clocks change, one of the days in the span is 23 or 25 hours long, so the division lands on the wrong side of a whole number and the answer is out by one — in spring, on exactly the dates people are usually counting. This compares calendar dates directly, so a day is always a day whatever the clocks did in between.

That distinction is also why times are optional rather than assumed to be midnight. A calculator that quietly defaults both sides to 00:00 looks like it is counting days while actually counting a duration, and the two disagree twice a year.

Months get the same treatment. A month is not 30.44 days: one month after 31 January is 28 February, and any tool that says otherwise is averaging where it should be counting. The years, months and days line below the total is worked out on the calendar.

Questions

Does it count the first day, the last day, or both?

Neither end is counted twice: the result is the number of nights between the two dates. 1 January to 2 January is one day. If you need both ends included — booking a hotel, say — add one.

Does it handle leap years?

Yes. The dates are compared on the calendar rather than by multiplying an average year length, so 29 February is counted when it exists and skipped when it does not.

What about the clocks changing?

It is unaffected. Working in milliseconds would give the wrong answer for any span crossing a daylight-saving transition, because one of the days in it is 23 or 25 hours long. This compares calendar dates, so a day is always a day.

Do I have to enter a time?

No. Leave both blank and it counts whole calendar days. Fill in either one and it switches to a duration, answering in days, hours and minutes.

Can I use a date in the past?

Yes. Put the later date second and it counts forward; put it first and it tells you how long ago the other one was.