Date difference calculator

The gap between two dates can be an exact number of days or a calendar count of months and days. This page shows both.

By default the end date is not included, which is the number of days you move forward to reach it. Include the end date when you want both endpoints, such as the number of days a stay lasts.

Calculator

Required fields are marked with *.

Use a comma or a dot for the decimal, as in 12.5 or 12,5. Type thousands as 1000 or 1 000. A single comma or dot is the decimal mark, so 1,000 means 1.

Adds one day so both endpoints count.

Results

The result will appear here.

How to use this calculator

  1. Enter the two dates. If they are reversed, the earlier one is used as the start and a note says so.
  2. Leave “include the end date” off for the gap, or turn it on to count both ends.
  3. Read the total days first, then the weeks and the calendar months.

Formula

Total days are the UTC difference between the two civil dates, divided by 24 hours. A leap day inside the span is an ordinary day, so 1 January 2024 to 1 March 2024 is 60 days, not 59.

Months and years advance the start day and clamp it to the last valid day of the month. That clamp is not the birthday rule used on the age page. From 29 February 2020 to 28 February 2021 is one calendar year under this clamp.

Including the end date adds one day before the span is counted.

Worked example

1 January 2024 to 1 March 2024

2024 is a leap year, so February has 29 days. From 1 January to 1 March is 31 + 29 = 60 days.

That is 8 weeks and 4 days, and exactly 2 calendar months. Counting the end date as well makes 61 days.

60 days, which is 8 weeks and 4 days, or 2 months.

Questions

Does “include the end date” add a day even across a month boundary?

Yes. The extra day is added first, then the months and days are counted. A span that ended on the last day of a month can gain a day in the next month.

Why can the month count differ from dividing days by 30?

Calendar months have 28 to 31 days. The page counts whole months by the calendar, then reports the leftover days separately.

Are times of day included?

No. Only the calendar date is used, and the day count is computed in UTC so daylight saving time cannot change it.

Sources

Last reviewed November 1, 2026