Add or Subtract Time From a Date
Move a date forward or back by years, months, weeks, and days, all at once, and get the result with the weekday it falls on. The month-overflow rule is stated in the open, because it is where these answers disagree.
A date, and how far to move
Starts at today. Clear it to come back to today.
All four amounts move the same way. Enter them as positive numbers.
Counted with the months as one step, so a 29 February start clamps at most once.
A day of the month with no counterpart in the target month is pulled back to that month’s last day.
Applied as seven days each, after the years and months.
Calendar days, weekends and holidays included. Applied last.
Wednesday. That is 90 days after January 1, 2026.
- Result date
- April 1, 2026
- In ISO form
- 2026-04-01
- Day of the week
- Wednesday
- Days moved
- 90 days forward
- After the years and months
- January 1, 2026
- Day of month clamped
- No — the day of the month exists in the target month
- Years and months are applied first, together, and weeks and days after them. The order changes the answer: from 30 January, one month then two days is 2 March, while two days then one month is 1 March.
- A month step that overshoots the end of the month clamps down — 31 January plus one month is 28 February, or 29 in a leap year. Adding a month and then subtracting one is therefore not always where you started.
- Every day counted here is a calendar day. Weekends, public holidays, and business-day conventions are not applied.
The whole problem is “one month after 31 January”
Adding days to a date is arithmetic: pick a start, count forward, done. Adding monthsis not, because the answer can be a date that does not exist. There is no 31 February, so “one month after 31 January” has no answer the calendar supplies — it has only conventions, and three of them are in active use.
31 Jan + 1 month → 28 Feb (clamp) • 1 Mar (roll) • 3 Mar (overflow)- Clamp — used here
- Pull back to the last day the target month has: 28 February, or 29 in a leap year. ISO 8601 duration arithmetic, the TC39 Temporal default, and most legal systems that have ruled on it
- Roll forward
- Continue into 1 March. Used in some accounting and billing systems, and it keeps the arithmetic invertible at the cost of leaving the month you asked for
- Overflow
- What JavaScript’s own
setMonthdoes: 31 February becomes 3 March. It makes “a month later” land after “a month and two days later”, which nobody means
Clamping has one consequence worth stating plainly: adding a month and then subtracting a month does not always return you to where you started. Add one month to 31 January and you get 28 February; subtract one month from 28 February and you get 28 January. That looks like a bug and is not one. Twenty-nine distinct January days would have to map onto twenty-eight February days for the operation to be reversible, and no rule can do that. Anyone treating “+1 month” and “−1 month” as inverses is relying on something the calendar does not provide.
The second rule is order. This calculator applies the years and months first, as one combined step, and only then the weeks and days. It matters, and not marginally: from 30 January 2026, one month then two days lands on 2 March, while two days then one month lands on 1 March. Combining the years and the months rather than doing years first matters for the same reason — 29 February 2024 plus thirteen months is 29 March 2025, but plus a year (clamped to 28 February 2025) plus a month is 28 March. One clamp is honest; two clamps compound a convention into an error.
Everything after the month step is exact. Weeks become seven days each, the day count is added at midnight UTC — which has no daylight saving, so a date 90 days out is 90 × 24 hours away rather than 89 days and 23 hours because a clock went forward in between — and the weekday is read straight off the result.
Ninety days on from 30 July 2026
Start on Thursday 30 July 2026 and add 90 days. One day finishes July, then 31 in August, 30 in September, and the remaining 28 land on Wednesday 28 October 2026. No months were asked for, so nothing clamped and the intermediate date is the start date itself. Ninety days is not three months: three months from 30 July would be 30 October, two days later, because August and October have 31 days each.
Now the case that separates methods. Start on 31 January 2026 and add one month. February 2026 has 28 days and the 31st does not exist in it, so the day is clamped back and the answer is Saturday 28 February 2026— a “one month” step that moved only 28 days, which the days-moved row shows outright. Subtract one month from that result and you get 28 January, three days short of where the round trip began.
And the order. Start on 30 January 2026, add one month and two days. The month step clamps 30 January to 28 February, and two days later is Monday 2 March 2026, 31 days from the start. Run the same amounts the other way round — two days to 1 February, then one month — and 1 February needs no clamp at all, so you land on 1 March. One day apart, from identical inputs, because of nothing but sequence.
The leap-year version is sharper still. 29 February 2024 plus one year and one month: combined, that is thirteen months to March 2025, which has a 29th, so the answer is 29 March 2025 and nothing clamped. Done a year at a time, the year step clamps to 28 February 2025 and the month step then gives 28 March — a day lost to an intermediate nobody asked for.
What this calculator assumes
- Month and year steps clamp down to the last valid day of the target month. A system that rolls forward to the 1st will disagree with this tool by one to three days on those dates.
- Years and months are applied together, first; weeks and days after them. A different order gives a different date, and any tool that does not say which it uses is hiding a decision.
- Every day is a calendar day. Weekends and public holidays are not skipped, and no deadline is rolled forward to the next business day.
- Amounts are whole and non-negative; the direction field carries the sign. That is deliberate — it removes the four different ways to write “subtract three months”.
- All arithmetic is done in UTC on whole calendar days, so times of day, time zones, and daylight saving never move a result.
- Dates from 1583 through 2200 only. The Gregorian calendar began in October 1582, and a result outside that window is refused rather than answered.
- The start date defaults to today, read from your own device in UTC. Late in the evening in a time zone well behind UTC it can already show tomorrow — change it if it does.
Adding and subtracting time FAQ
What date is one month after 31 January?
This calculator says 28 February, or 29 February in a leap year. There is no 31 February, so the question has no answer the calendar supplies — only a convention, and three are in circulation. JavaScript's own date arithmetic overflows into the next month and returns 3 March, which nobody means and which makes “a month later” arrive after “a month and two days later”. Some systems roll forward to 1 March. This tool clamps down to the last day the target month actually has, which is what ISO 8601 duration arithmetic does, what the TC39 Temporal proposal does by default, and what most jurisdictions that have ruled on notice periods and limitation dates have settled on.
Why isn't adding a month and then subtracting a month back where I started?
Because clamping loses information, and it has to. Add one month to 31 January and you land on 28 February; subtract one month from 28 February and you land on 28 January, not the 31st. There are 29 January days that could plausibly map onto February's 28, so no clamping rule can be one-to-one, and the other two conventions lose the same information in uglier places. This is not a bug in the tool or in your reasoning — it is a property of the calendar, and it is worth knowing about before you write “one month after” into a contract that both sides will read later.
Does the order matter — are months applied before days?
Yes, and it changes the answer. This calculator applies the years and months first, as a single combined step, then the weeks and days. From 30 January 2026, one month then two days lands on 2 March: 30 January clamps to 28 February, and two days later is 2 March. Two days then one month lands on 1 March: 30 January plus two days is 1 February, which needs no clamp, and one month later is 1 March. Same inputs, one day apart. Years and months are combined for the same reason — 29 February 2024 plus thirteen months is 29 March 2025, while a year at a time clamps to 28 February 2025 first and never recovers, giving 28 March.
What date is 90 days from today?
Leave the start date at today and the days field at 90, which is how this page loads, and the answer is on the right with its weekday. Ninety calendar days is the span most returns windows, probation periods, and payment terms are written in — but check whether your document says 90 days or three months, because they are different lengths and diverge by up to two days depending on which months the span crosses. If it says three months, put 3 in the months field instead.
How do I add business days instead of calendar days?
You cannot, here. Every day this tool counts is a calendar day, weekends and public holidays included, because skipping non-working days needs a country — often a state or province — and a year's holiday list. That belongs to the business-days calculator. One thing worth knowing about deadlines: US federal practice under Rule 6(a) of the Federal Rules of Civil Procedure counts calendar days for periods of seven days or more, then rolls a deadline that lands on a Saturday, Sunday, or legal holiday forward to the next business day. This tool gives you the calendar date; the roll-forward, if your rules have one, is a step you do afterwards.
How does this handle 29 February?
As a starting date, 29 February clamps to 28 February when the target year is a common year — one year after 29 February 2024 is 28 February 2025 — and stays on the 29th when the target year is a leap year. As a destination it needs no special case at all: adding days to 28 February 2024 lands on 29 February because the calendar has one. The only place leap years change an answer is the month step, and the result panel tells you outright when the day of the month was clamped.
Sources and review notes
- TC39 Temporal proposal,
Temporal.PlainDate— date arithmetic with an explicitoverflowoption, whose default"constrain"is the clamping rule used on this page - ISO 8601-1:2019 — the standard that defines the
YYYY-MM-DDcalendar date and the rules for adding a duration to one - Federal Rules of Civil Procedure, Rule 6(a) (Cornell Legal Information Institute) — how United States federal deadlines count calendar days and roll a due date off a weekend or legal holiday
There is no dataset behind this page to go stale. The leap-year rule has been fixed since 1582 and the month lengths since Julius Caesar; the only thing that moves is the start date, which your own device supplies.