Date Add / Subtract Calculator
Add or subtract years, months, weeks and days from any date, with the month-end behaviour that makes date arithmetic non-reversible.
Adding months twice is not the same as adding two
Every date library clamps: if the target month is too short, land on its last day. It is the only sensible convention, and it quietly destroys information. Starting from 31 January 2026:
| Operation | Result |
|---|---|
| + 1 month | 2026-02-28 |
| + 2 months | 2026-03-31 |
| + 3 months | 2026-04-30 |
| + 1 month, then + 1 month again | 2026-03-28 |
| + 2 months in one step | 2026-03-31 |
Once the 31st has become the 28th it has forgotten it was ever the 31st, so the next step starts from the wrong place. The same reason makes subtraction fail to undo addition: of the 365 start dates in 2026, 7 do not survive +1 month followed by −1 month.
Rare enough to be a bug, common enough to happen
Sweeping every date in 2026, the two routes disagree on 7 of 365 — about 1.9%. Every one of them is the 29th or later, since that is the only way clamping can bite. Every date on the 28th or earlier is perfectly well behaved.
Under two per cent is exactly the frequency that makes something a bug rather than a known limitation: too rare to show up while you are testing, common enough that anything billing or renewing monthly will meet it within the year.
The practical rule is to always compute from the original date rather than stepping. “Six months from the start” is well defined; “one month later, six times” is a different question with a different answer, and only one of them is what a subscription means.
How to use
- Enter your starting date.
- Set what to add or subtract.
- Read the resulting date.
- Check month-end cases carefully.
Frequently asked questions
What happens when adding a month to 31 January?
There is no 31 February, so a convention is needed. Most systems clamp to the last day of the target month, giving 28 or 29 February. Some overflow into March instead. Neither is wrong, but they differ, which is why date libraries document this behaviour prominently.
Why is adding a month then subtracting one not always reversible?
Because of that clamping. Adding a month to 31 January gives 28 February; subtracting a month from 28 February gives 28 January. Information is lost at the month end, so the operations do not undo each other — a genuine surprise the first time it causes a bug.
Does the order of operations matter?
Yes. Adding a month and then a day can differ from adding a day and then a month, again because of month-end clamping. Most libraries add larger units first for this reason, and it is worth knowing which convention yours follows.
How should I add a year to 29 February?
By the same clamping logic, giving 28 February in non-leap years. The alternative of 1 March is used in some legal contexts. As with birthdays, the convention is a decision rather than a fact.
Is adding 30 days the same as adding a month?
Only in a month with 30 days. Contracts and terms of business often specify days precisely to avoid this ambiguity, since a period expressed in months can vary by three days depending on where it starts.
What about daylight saving?
Adding a day across a clock change adds a calendar day, not 24 hours — the actual elapsed time is 23 or 25 hours. Which one you want depends on whether you mean the same clock time tomorrow or exactly a day from now, and they are different questions.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.