Date Add/Subtract Calculator

Start from one calendar date, then add or subtract years, months, weeks, and days to get the exact resulting date.

Examples

Add 1 month and 14 days to a notice date to find the exact end date.

Result date
May 2, 2026
Weekday
Saturday
Net shift
45 days

Was this useful?

Examples

How It Works

Formula

exactDayDelta=7w+d\text{exactDayDelta} = 7w + d

netShiftDays=tfinaltbase86400000\text{netShiftDays} = \dfrac{t_{final} - t_{base}}{86400000}

Variables

ww

Whole weeks in the exact-day portion of the offset

dd

Extra exact days in the offset

tbaset_{base}

Base date anchored at UTC midnight

tfinalt_{final}

Final result date anchored at UTC midnight

Use one base date, one direction, and four integer offsets. The calculator applies the year/month portion first under strict Gregorian calendar arithmetic, clamps month-end dates when the target month is shorter, then adds the week/day portion as exact day steps. The hero answer is the final date, with the weekday and net calendar-day shift shown as quick checks.

Stepwise Gregorian calendar offset:

  1. Parse the base date as one exact ISO calendar date.
  2. Convert the direction into a sign: add is positive, subtract is negative.
  3. Apply signed years and months first by moving to the target year/month while keeping the original day-of-month as the goal.
  4. If that target month does not contain the original day, clamp to the last valid day of that month. This is why 2025-01-31 + 1 month = 2025-02-28 and 2024-02-29 + 1 year = 2025-02-28.
  5. Convert weeks and days into an exact-day increment with exactDayDelta=7w+d\text{exactDayDelta} = 7w + d and apply it after the clamp-aware year/month step.
  6. Derive the final weekday from the result date and derive the net day shift from the distance between the base and final UTC dates.

Frequently Asked Questions

01What order does the calculator use?
The order is fixed: first apply years and months under Gregorian calendar rules, clamp to the last valid day of the target month if needed, then add weeks and days as exact day increments.
02Why can Jan 31 + 1 month become Feb 28 or Feb 29?
Because February does not always contain a 31st day. The calculator lands on the last valid date of the target month first, then continues with any week/day offsets that remain.
03What happens to Feb 29 in a common year?
If a leap-day date shifts into a common year, the calculator clamps that step to Feb 28. Example: 2024-02-29 + 1 year becomes 2025-02-28.
04How is this different from Date Difference, Day of Week, and Weekdays Calculator?
This page transforms one known date into a new date. Date Difference measures the span between two known dates, Day of Week labels one known date, and Weekdays Calculator counts selected weekdays inside a range.
05What date format should I use?
Use the built-in ISO-safe date entry so the base date stays unambiguous across locales. The arithmetic is the same in every locale.

All calculators