Date add / subtract
Add or subtract days, weeks, months or years from a calendar date.
Gregorian calendar, years 0001–9999. Up to 4,000,000 whole units; output must stay within the date range.
Runs in your browser. Inputs are not uploaded or saved.
How to use
Choose a mode, enter values or load the example, then copy or download your result.
Rules and worked example
Adding one month to 2024-01-31 gives 2024-02-29. The original day is clamped to the last valid day of the target month. Adding one year to 2024-02-29 gives 2025-02-28. Weeks contain exactly seven calendar days.
Questions and answers
Why might adding and subtracting a month not reverse each other?
Month-end clamping loses a day that does not exist in the target month. January 31 plus one month, then minus one month, may return January 28 or 29. Each calculation starts from the date you enter. Date-only arithmetic uses UTC internally, so daylight saving changes do not add or remove days.