Skip to tool
ecech.
🕑 Date, Time & Timezone

31 January Plus One Month Is 28 February, and Minus One Month Is Not 31 January

Days are exact. Months clamp to the end of a shorter month and never come back, which is why monthly billing drifts after its first February.

Result

Working

Advertisement

How the calculation works

Month arithmetic does not round-trip 31 Jan 2026 where you started +1 month 28 Feb 2026 clamped, no 31st exists −1 month 28 Jan 2026 3 days lost Every date library behaves this way, and none can do better. There is no correct answer for “the 31st of February” — only a convention.

How to Use This Tool

Pick a starting date, choose add or subtract, and fill in any mix of years, months, weeks and days. The working underneath shows each step in order, because the order changes the answer.

Days are exact, months are a convention

Adding days is unambiguous: 30 days after any date is 30 days later, and subtracting 30 brings you back to exactly where you were. Weeks are just days in sevens, so they behave the same way.

Months do not, because they are different lengths. Asked for one month after 31 January, every date library gives 28 February, because 31 February does not exist and the convention is to clamp to the last day of the target month. Ask for one month before 28 February and you get 28 January.

So add one month and subtract one month, and you land three days from where you started. That is not a bug in any particular library — it is the arithmetic. There is no correct answer, so everyone picked the same reasonable one.

Why this matters for anything monthly

A subscription that starts on 31 January bills on 28 February. What happens in March depends on a design decision the software made:

  • Anchor on the original date. March bills on the 31st, April on the 30th, May on the 31st. The date wobbles but always returns to the intended day.
  • Anchor on the last billed date. March bills on the 28th, and every month afterwards is the 28th. The subscription has permanently moved.

Both are defensible and they diverge permanently after the first February. If you are building something that recurs monthly, pick one deliberately and write it down — this is the sort of thing that gets discovered a year later by a confused customer.

31 Jan + 1 month + 1 day, two orders months first 31 Jan → 28 Feb → 1 Mar days first 31 Jan → 1 Feb → 1 Mar Agreeing here is luck. Try 30 Jan and the two orders give 2 Mar and 28 Feb. The convention almost everyone uses is years, then months, then days.
Because months clamp, the order of operations is part of the answer.

The order of operations is part of the answer

Because clamping loses information, applying the parts in a different order can give a different date. The near-universal convention, and the one used here, is years, then months, then days — the coarse units first, so any clamping happens before the fine adjustment rather than after it.

Worth knowing if you are comparing this against a spreadsheet or a database: most follow the same order, but not all, and the disagreements only show up at month ends.

Working days

Ticking working days counts only Monday to Friday, so five working days from a Monday is the following Monday. Public holidays are not included, because they differ by country, by region within a country, and by year — a built-in list would be wrong somewhere without telling you where.

For contractual deadlines, check the wording carefully: "within 10 days" and "within 10 business days" are different, and some jurisdictions exclude the start date while others include it.

Advertisement

Frequently Asked Questions

What is one month after 31 January?
28 February, or 29 in a leap year. The 31st of February does not exist, so every date library clamps to the last day of the target month. It is a convention rather than a fact — there is no correct answer.
Why doesn't adding and subtracting a month get me back to the same date?
Because clamping loses information. 31 January plus one month is 28 February, and 28 February minus one month is 28 January — three days from where you started. No library can do better, since the intermediate date no longer records that you meant the 31st.
How should monthly billing handle the 31st?
Pick one of two designs and document it. Anchoring on the original date bills the 31st, then 28th in February, then 31st again in March. Anchoring on the last billed date moves to the 28th permanently. Both are defensible and they diverge for good after the first February.
Does the order matter when adding years, months and days?
Yes, at month ends. Because months clamp, applying days before months can give a different date from months before days. The near-universal convention, used here, is years, then months, then days.
How do I count working days from a date?
Tick the working-days option and only Monday to Friday are counted, so five working days from a Monday is the following Monday. Public holidays are not included — they vary by country, region and year, so a built-in list would be quietly wrong somewhere.
Is adding 30 days the same as adding a month?
Only in a 30-day month. Adding days is exact and reversible; adding months clamps and is not. If a deadline is written in days, count days — substituting a month changes the answer by up to three days depending on the time of year.

Related tools in Date, Time & Timezone

Browse all Date, Time & Timezone tools
The person who builds ecech., at the desk where the tools are written.

Made by one person

ecech. is not a content farm. Every tool here is written and checked by hand, one at a time, by someone who wanted the tool to exist and could not find a version that showed its working.

No accounts and no sign-in, and nothing you type reaches a server — every calculation on this page runs inside your browser. The ads are served by Google and do set their own cookies, which is set out in full on the privacy page. More about the site.