Date Calculator

Find the duration between two dates, or add and subtract days, weeks, months and years from a date.

The formula behind it

duration = calendar difference (Y, M, D) · new date = start ± amount
Y/M/D
whole years, months, then remaining days
±
add or subtract days, weeks, months or years

Calendar durations are counted hierarchically: whole years first, then whole months, then leftover days — borrowing uses each month’s true length. Date arithmetic adds calendar months with day clamping (Jan 31 + 1 month = Feb 28/29), and day counts include leap days because they are walked on the real calendar.

How to use this calculator

  1. 1

    Choose a mode: “Duration between dates” or “Add / subtract from a date”.

  2. 2

    For durations, enter both dates — the later date must be the same as or after the start.

  3. 3

    For date arithmetic, pick add or subtract, the amount, and the unit.

  4. 4

    Press Calculate for the result with the working shown, including weekday and leap-day handling.

Worked examples

Project deadline

From March 1, 2026 to June 15, 2026: 3 months and 14 days, or 106 total days — 76 of them weekdays.

Warranty expiry

Bought a laptop on August 31, 2025 with a 12-month warranty: adding 12 months lands on August 31, 2026 exactly.

Month-end clamping

Adding 1 month to January 31, 2026 gives February 28, 2026 — the calculator clamps to the month’s real length instead of spilling into March.

Frequently asked questions

Explore more categories

Command Palette

Search for a command to run...