Advertisement

Date to date calculator

Enter a start and an end date. The page reports the number of days between them and can also show the same span in weeks, months or years.

Calculator

Without this option the gap is end minus start, so the two dates on the same day give zero.

Days between
364
Time between
364

Advertisement

How this calculator works

Each date becomes its day number in the proleptic Gregorian calendar and the start is subtracted from the end. The optional end-date count adds one, turning the gap between boundaries into a count of days that includes both endpoints. The time output is the same number of days expressed as seconds, so the unit selector can show it as days, weeks, months or years without any separate rounding.

Formula

days = O(end_date) - O(start_date) + 1 if the end date is included, otherwise O(end_date) - O(start_date). The time output is days x 86400 seconds. Weeks use 604800 seconds, months 2629800 seconds and years 31557600 seconds.

Worked example

From 2026-01-01 to 2026-12-31 is 364 days without the end date and 365 days with it. The same span is 52 weeks or 11.96 average months.

Advertisement

Frequently asked questions

Which endpoint convention should I use?

Use the boundary gap when you are measuring elapsed time, and include the end date when you are counting days that each count as a day. A hotel stay from the 1st to the 3rd is usually two nights, while a three-day event on the 1st, 2nd and 3rd includes both endpoints.

Why are months and years averages in the unit selector?

The selector converts a fixed number of seconds to one unit. A real calendar month varies from 28 to 31 days. For exact month counting on the calendar, use the month counter.

Does the time of day matter?

No. Both inputs are civil dates, so the result is a whole number of days. Daylight saving and time zones cannot add or remove a day on this scale.

Can the dates be reversed?

Not in this tool. An end before the start is reported as an error rather than as a negative number, because most date-to-date questions expect a forward span.

Sources

Advertisement