Skip to content

Month-End Roll Calculator

When adding months lands on a day that doesn't exist in the target month, there are three defensible ways to handle it. Compare all three side by side for your exact dates.

Ready to apply one rule directly? See Date Calculator.

Worked example

January 31, 2027 plus 1 month gives the same answer under both the constrain rule and the preserve-end-of-month rule, February 28, since January 31 is itself the last day of its month. January 30, 2027 plus 1 month also constrains to February 28, because February has no 30th, but the preserve-end-of-month rule does not apply here at all, since January 30 is not the last day of January, which has 31 days. That distinction only starts to matter once a second addition is chained on top of the first result.

Why three rules exist

Constrain is simplest and most common. Preserve end-of-month matters for a recurring schedule that should always land on month-end, such as a billing cycle, so the schedule does not drift off month-end after the first non-31-day month it crosses. Reject flags the ambiguity outright rather than silently picking a rule, useful when a system needs a human to confirm the intended behavior before proceeding.

Common mistakes

  • Assuming a single rule applies everywhere. A billing system and a simple date picker often pick different rules for the exact same month-end overflow case, which is why comparing all three side by side matters before relying on either one.
  • Not noticing when preserve-end-of-month silently stops applying. Once a base date is not itself a month-end date, that rule has nothing to preserve, and the result quietly falls back to behaving like the constrain rule.

Limitations

This compares three defined rules. It does not determine which rule a specific billing system, contract, or software product actually applies, so the source system should be checked directly when the choice of rule has financial consequences.

Frequently asked questions

Which rule does WhenMath use by default?
Constrain to the last valid day, unless a specific engine offers and states a different option. See the Methodology page for the full convention.