Date Difference Calculator

Enter two dates as year, month and day. The count excludes the end date unless you choose to include it. Or add or subtract days from a date to find a deadline.

Days

358

Weeks

51 weeks, 1 day

Months

11 months, 24 days

Years

0 years, 11 months, 24 days

Weekdays (Mon–Fri)

256

Start date

2026-01-01 (Thursday)

End date

2026-12-25 (Friday)

How it works

Each date is turned into a day number, the count of days since a fixed reference day, using UTC so that daylight-saving changes can never add or lose an hour and shift the result. The difference between the two day numbers is the number of days between the dates.

By default the end date is not counted: January 1 to January 2 is one day, the way a hotel counts nights or a lease counts days. Choose "Include the end date" when both ends count, as for a trip from Monday to Friday that lasts five days.

Months and years are not fixed lengths, so they are counted on the calendar: the earlier date is stepped forward one month at a time for as long as it does not pass the later date, and whatever is left over is reported in days. A step that lands on a day the month does not have, such as the 31st of February, uses the last day of that month.

Weekdays counts Mondays through Fridays in the range. Public holidays are not known to the calculator and are not removed.

The offset question goes the other way: it adds or subtracts a number of days from the start date and reports the date it lands on, with the full breakdown of the interval between the two.

Formula

day number = days since 1970-01-01 (UTC)
days = day number(end) − day number(start)      (+1 when including the end date)
weeks = ⌊days ÷ 7⌋, remainder in days
months: step start forward while start + (n + 1) months ≤ end; remainder in days
years = ⌊months ÷ 12⌋, remainder in months
leap year: divisible by 4, except centuries not divisible by 400

Example

From January 1, 2026 to December 25, 2026 is 358 days, which is 51 weeks and 1 day, or 11 months and 24 days. There are 256 weekdays in that span. Including the end date makes it 359 days and 257 weekdays.

From January 1, 2024 to January 1, 2025 is 366 days, because 2024 was a leap year: exactly 1 year, or 52 weeks and 2 days, with 262 weekdays.

90 days after January 1, 2026 is April 1, 2026: the 31 days of January, 28 of February and 31 of March add up to 90.

Assumptions and limitations

  • Dates follow the Gregorian calendar, applied back to the year 1000 even though many countries adopted it later. Dates before the year 1000 or after 9999 are not accepted.
  • A day is a calendar day; times of day and time zones are ignored, so two dates in different time zones compare as written.
  • Weekdays are Monday to Friday. Public holidays, company holidays and half-days are not deducted.
  • When the end date is earlier than the start date the day and weekday counts are negative; the week, month and year breakdowns describe the size of the span.

Frequently asked questions

Should I include the end date?

It depends on what you are counting. Nights in a hotel, days until a deadline and interest periods exclude the end date. Days of a trip, days of a rental where both the pickup and return days are charged, and inclusive counts in contracts include it. The two answers always differ by exactly one day.

Why is January 31 to February 28 one month but January 31 to March 1 one month and one day?

Stepping January 31 forward one month lands on the last day of February, because February has no 31st. That reaches February 28 exactly. March 1 is one day past it, so the span is one month and one day.