utility.diy

Date difference calculator

Calendar days

Choose two dates
Full weeks
...
Remaining days
...

Gregorian calendar. The difference is shown as a positive number.

How days between dates are counted

Choose a start and end date to count the calendar-day gap. The result also shows complete seven-day weeks and the leftover days. Count both dates adds one day when you want to include the two endpoints.

Elapsed days or inclusive days?

The usual difference measures the gap between the dates. The same date has a gap of zero days. Inclusive counting treats that same date as one day and adds one to every interval.

Inclusive days = Calendar-day gap + 1

  1. Choose the two dates.
  2. Leave Count both dates off to measure the day gap.
  3. Turn it on to count both endpoints.

From 1 March to 3 March is a gap of 2 days. Counting 1, 2 and 3 March inclusively gives 3 days.

Leap years and calendar accuracy

The calculator uses the Gregorian calendar. February has 29 days in a leap year. Years divisible by 100 are not leap years unless they are also divisible by 400.

Leap year: divisible by 4, except centuries not divisible by 400

  1. The year 2024 is a leap year.
  2. The year 1900 is not a leap year, while 2000 is.
  3. Months retain their actual lengths; they are not treated as 30-day blocks.

From 28 February to 1 March 2024 is 2 days. In 2023, the same month-and-day interval is 1 day.

Weeks, reversed dates and limits

Full weeks are complete groups of seven days; the remainder is from zero to six days. Reversing the dates keeps the same positive gap and displays a note. Dates are compared as calendar dates, so changing clocks for daylight saving does not change the result.

Days = Full weeks × 7 + Remaining days

  1. Use dates from year 0001 through 9999.
  2. All weekdays, weekends and holidays count. This is not a business-day calculator.
  3. For historical dates, the Gregorian rules are extended backwards; local historical calendar changes are not modelled.

A 17-day interval is 2 full weeks and 3 remaining days. Counting both dates changes it to 18 days: 2 weeks and 4 days.