Date Calculator

Work out the span between two dates, or add and subtract from a date with correct calendar handling.

Difference

2 months, 29 days

ISO 8601 duration: P90D

90

Days

64

Weekdays

12

Weeks

2

Months

2,160

Hours

129,600

Minutes

  • Month arithmetic clamps rather than overflows: 31 January plus one month is 28 or 29 February, not 2 or 3 March.
  • The month count is calendar-aware — it counts whole months rather than dividing days by an average month length.
  • Weekdays counts Monday to Friday only, and takes no account of public holidays.

Your Data Never Leaves Your Device

Every tool runs entirely in your browser. Nothing you type is uploaded, stored, or logged on our servers.

100% Client-Side

The Date Calculator answers the two questions that come up constantly: how long is it between these dates, and what date is it a given span from now. The difference view breaks the gap into years, months and days, and also gives running totals in days, weekdays, weeks, months, hours and minutes, plus the ISO 8601 duration string that databases and schedulers expect.

Both directions use calendar-aware arithmetic, which matters more than it sounds. Adding a month to 31 January clamps to the end of February rather than overflowing into March, and the month count between two dates counts whole calendar months rather than dividing by an average month length — the naive version reports “about a month” between 31 January and 28 February, when the answer is zero months and 28 days. Leap years are handled throughout, and everything runs in your browser.

The ISO 8601 duration tab parses strings such as P1Y2M3DT4H5M6S, P2W or PT36H into their components, rejects malformed input, and applies the duration to a start date. Years and months are applied on the calendar and are never converted to 30 or 365 days, so the totals cover only the weeks, days and time part.

FAQ

As whole calendar months, not by dividing days by an average month length. From 31 January to 28 February is 0 months and 28 days, because the day-of-month has not been reached yet — dividing by 30.44 would wrongly report roughly one month.

The result clamps to the last day of the target month. 31 January plus one month is 28 or 29 February, never 2 or 3 March. Naive date arithmetic overflows here, which is a classic source of off-by-days bugs in billing and scheduling.

Yes. Day counts cross 29 February correctly, and adding a year to 29 February clamps to 28 February in a non-leap year.

Monday to Friday. Public holidays are not considered, since those vary by country and region — treat the figure as working days before holiday adjustments.

It is the machine-readable form of a span, like P2DT3H4M5S for two days, three hours, four minutes and five seconds. Databases, schedulers, and APIs frequently expect durations in this format.

The full PnYnMnWnDTnHnMnS form, such as P1Y2M3DT4H5M6S, plus week durations like P2W, time-only durations like PT36H, and an optional leading minus sign (-P1D). A decimal fraction, with a dot or comma, is accepted on the last component only, so PT1,5S is valid but P1.5Y2M is not. Incomplete input such as P, PT or P1DT is rejected.

Because it has no fixed length. A month is 28 to 31 days and a year is 365 or 366, so the duration calculator applies years and months on the calendar and only totals the weeks, days and time part. P1M added to 31 January 2024 gives 29 February 2024, not a date 30 days later.

Years and months first, with the day clamped to the end of the target month, then weeks and days, then hours, minutes and seconds. P1Y on 29 February 2024 gives 28 February 2025.

Date inputs are interpreted in your local timezone, which is what you want for calendar questions like "how many days until". Nothing is sent to a server.