Difference and arithmetic on dates

Subtract, add, compare.

Compute the duration between two dates in years, months, days, hours, minutes, seconds. Add or subtract N days/weeks/months/years. Pure browser; no login.

Years

0

Months

11

Days

30

Hours

0

Minutes

0

Seconds

0

Add / subtract

→ 2026-11-02

Counting days between dates, and adding to a date

How many days until a deadline, how long ago an invoice was sent, what date is 90 days after signing a contract: date questions come up constantly, and months of different lengths and leap years make them easy to get wrong in your head.

This calculator does two things. It measures the time between two dates in months and days plus total seconds, and it adds or subtracts days, weeks, months or years from a base date.

How to use it

  1. To measure a span, pick the From date and the To date and read the difference.
  2. To shift a date, pick the Base date, type an Amount and choose the Unit: days, weeks, months or years.
  3. Use a negative amount to go back in time, for example -30 days.
  4. Read the resulting date in year-month-day format.

Example: until Christmas, and a month after 31 January

Input
From 2026-10-26 to 2026-12-25
2026-01-31 + 1 month
Output
1 month, 29 days
2026-02-28

There is no 31 February, so adding a month to 31 January lands on the last day of February instead of spilling over into March.

How month arithmetic works

Adding months keeps the day of the month whenever it exists. When it does not, because the target month is shorter, the result is the last day of that month: 31 January plus one month is 28 February, or 29 February in a leap year. Adding a year to 29 February gives 28 February. This is how spreadsheet functions such as EDATE and most programming libraries handle it, and how contracts usually read.

Days and weeks are plain calendar steps: adding 7 days always gives the same weekday a week later, across month and year ends.

Counting days in deadlines

Whether the first or last day counts depends on the rule you follow. Many legal deadlines start counting the day after the event and include the last day; a stay from Monday to Friday is four nights but five days. This calculator counts the distance between the two dates, so from Monday to Friday gives 4 days. Add one if both ends should count.

Business days

The calculator counts calendar days. For working days, skip weekends and the public holidays of your country or state, which differ widely; a spreadsheet's NETWORKDAYS function or your HR system does that with a holiday list.

Questions

Does it handle leap years?

Yes. Dates come from the browser's calendar, which knows that 2024 and 2028 have a 29 February and 2100 will not.

Do time zones matter?

Both dates are read as midnight in your own time zone, so a daylight-saving change between them does not shift the count.

Is anything sent to a server?

No. All date arithmetic happens in your browser.