What Date Do You Get When You Add a Month to January 31st?
Published 2026-09-14
A question with no clean answer
Adding a day, a week or a year to a date is unambiguous. Adding a month is not, because months don't all have the same length. "One month after January 31st" has no date that satisfies the naive rule "same day number, next month" — February has at most 29 days.
The two common resolutions
Software generally does one of two things: clamp to the last valid day of the target month (January 31st + 1 month = February 28th, or the 29th in a leap year), or overflow into the following month (January 31st + 1 month = March 3rd, treating the invalid "February 31st" as 3 days past February's end). Neither is more "correct" than the other — they're just different conventions, and different programming languages and libraries genuinely disagree on which one to use by default.
Why this matters more than it seems
For a one-off calculation the difference is a few days, easy to shrug off. But for anything computed repeatedly — monthly billing cycles, recurring deadlines calculated by repeatedly adding a month — picking the overflow behavior instead of the clamping behavior (or vice versa) can cause dates to slowly drift later in the month over several cycles, in a way that's surprising if you didn't know which rule your tool uses.
What this calculator does
Our Date Calculator uses JavaScript's built-in date arithmetic for the "add/subtract months or years" mode, which follows the clamping-to-native-behavior convention of the browser's Date object (effectively rolling over into the next month rather than clamping) — consistent and predictable, even if it's worth knowing about if you're chaining month-additions across several calculations.