Date Calculator

Count the days between two dates, or add and subtract days, weeks, months, and years.

Mode

Result

Days between

—

Years, months, days

—

Results appear here

How it works

Pick Difference to count the days between two dates, or Add or subtract to shift a date by days, weeks, months, or years. Enter the dates, select Calculate, and the result appears below — everything runs in your browser.

Counting the days between dates

The difference is an exclusive day count: January 1 to January 2 is one day, and the same date is zero. Reversed dates give the same answer — the count is always absolute.

Below the day count, the result also breaks the span into whole calendar years, months, and days, using the same month arithmetic as the add or subtract mode.

Adding and subtracting time

Days and weeks add exact day counts, so they are unaffected by month lengths. Months and years move whole calendar months and clamp to the last valid day of the target month: January 31 + 1 month is February 28, or February 29 in a leap year.

Enter a negative amount to subtract: March 31 − 1 month is February 28, or February 29 in a leap year, with the same clamping applied backwards.

Assumptions and edge cases

  • Dates are treated as plain calendar dates — 2026-03-01 — with no time of day and no timezone, so daylight-saving changes can never shift a result.
  • Amounts are whole numbers; negative amounts subtract. Fractional amounts are rejected with an inline message.
  • The result includes the weekday of the resulting date in the add or subtract mode.
  • Month-end clamping applies wherever months or years are moved: August 31 + 1 month is September 30, and February 29, 2024 + 1 year is February 28, 2025.
  • Supported dates run from 0001-01-01 to 275759-12-31; results outside that range are rejected with an inline message instead of an invalid date.
  • Nothing is uploaded: the calculation runs entirely in your browser.
Esc