Add or Subtract Dates
Add or subtract a whole number of days, weeks, months, or years from a calendar date. Month and year steps clamp to the last real day.
Processed entirely in your browser — nothing you enter here is ever uploaded.
Result
About this tool
The base field opens on today, written from the local calendar as YYYY-MM-DD and then read as a UTC date. Adding days calls setUTCDate with that many days. Adding weeks multiplies the amount by 7 and does the same. 1 January 2026 plus 45 days is Sunday 15 February 2026. 1 January 2026 plus 30 days is Saturday 31 January 2026. 1 March 2026 minus 1 day is Saturday 28 February 2026. 1 January 2026 plus 2 weeks is Thursday 15 January 2026. The weekday is formatted in the page language with the UTC zone, and the detail line is the ISO date. Subtract flips the sign of the amount before the same function runs.
Months and years are not a fixed number of days. The original day number is saved, the date is parked on day 1, the month or the year is shifted, and the day is set to the smaller of the original day and the length of the landing month. 31 January 2024 plus 1 month is Thursday 29 February 2024, because 2024 is a leap year and February has 29 days. 31 January 2025 plus 1 month is Friday 28 February 2025. 31 January 2026 plus 1 month is Saturday 28 February 2026. 29 February 2024 plus 1 year is Friday 28 February 2025. The day is not left on an overflow such as 31 February, and it is not rolled into March.
A value that is not an integer, or a base that is not a real YYYY-MM-DD date, shows the invalid-date line and does not invent a result. 31 April is not a date, so it is rejected by the same check that builds the UTC date and then asks whether the year, month, and day survived. The amount is not limited to a small range. Preset pages set the operation, the amount, and the unit, and leave the base on today, which is why a 30-day preset changes answer after midnight. The arithmetic does not consult a holiday list, a time zone offset, or a time of day. It is a date, not a timestamp.
Example. 31 January 2024 plus 1 month is Thursday 29 February 2024. 29 February 2024 plus 1 year is Friday 28 February 2025. 1 January 2026 plus 45 days is Sunday 15 February 2026.
Limit. The amount must be an integer. Months and years clamp to the last real day. The math is a UTC calendar date, not a timestamp and not a holiday calendar.
Frequently asked questions
What is one month after 31 January?
In 2024, Thursday 29 February, because February has 29 days. In 2025, Friday 28 February. The original day is kept only when that day exists in the landing month.
What is 45 days after 1 January 2026?
Sunday 15 February 2026. Thirty days after that New Year is Saturday 31 January 2026. Two weeks after it is Thursday 15 January 2026. A week is seven UTC days.
What happens to 29 February plus one year?
Friday 28 February 2025. The date is parked on day 1, the year is incremented, and the day is the smaller of 29 and the length of February 2025.
Which inputs are rejected?
A base that is not a real YYYY-MM-DD date, including 31 April, and an amount that is not an integer. The base field opens on today's local calendar date, read as UTC.