Calculators & everyday math
Why Month Lengths Make Date Math Tricky
Most date arithmetic is easy until a month runs out of days. What is one month after January 31? There are two reasonable answers, and different tools pick different ones. This guide explains the problem and the rule the Looty Tools calculators follow.
Ready to try the tool this guide describes?
Months are different lengths
Seven months have 31 days, four have 30, and February has 28, or 29 in a leap year. Adding a month in the middle of a month is easy — March 10 plus one month is April 10 — but near the end of a month, the same day may not exist in the next one.
Two ways to handle a missing day
- Clamp: move back to the last day of the shorter month. January 31 plus one month is February 28 (or 29). Spreadsheet functions such as EDATE work this way, as do many date libraries.
- Roll over: carry the extra days into the following month. January 31 plus one month becomes March 3 in a non-leap year, because the nonexistent February 31 is 3 days past February 28.
What clamping means for differences
In the examples below, January 28 and January 31 both reach February 28 in exactly one month — that is the price of clamping. The total day count still tells them apart: 31 days versus 28.
| From | To | Difference with the last-day rule |
|---|---|---|
| January 31, 2026 | February 28, 2026 | 1 month |
| January 28, 2026 | February 28, 2026 | 1 month |
| January 31, 2026 | March 30, 2026 | 1 month, 30 days |
| January 31, 2026 | March 31, 2026 | 2 months |
| February 28, 2026 | March 31, 2026 | 1 month, 3 days |
Leap years add another wrinkle
Because February has 29 days in leap years, the same calculation can give a different answer in a different year: January 31, 2024 plus one month is February 29, 2024, while January 31, 2026 plus one month is February 28, 2026.
How to avoid surprises
- Count whole months from the original start date rather than adding one month repeatedly. January 31 → February 28 → March 28 drifts; January 31 plus two months is March 31.
- Check a month-end case when comparing tools.
- Use a day count when you need an answer everyone agrees on.
Month Lengths and Date Math FAQ
- What is one month after January 31?
- It depends on the rule: February 28 (29 in a leap year) with the last-day rule, or early March if extra days roll over.
- Which rule do the Looty Tools calculators use?
- The last-day rule: a missing day moves back to the last day of the month.
- Why does adding one month twice give a different date than adding two months?
- Each step clamps to the shorter month, so January 31 → February 28 → March 28, while adding two months at once gives March 31.
- Does this affect day counts?
- No. Counting days is exact; only months have variable lengths.
- What about February 29 birthdays?
- The same rule applies: in years without February 29, the birthday falls on February 28.
Related guides
- Months vs. DaysWhen to describe a span in calendar months and when to count days, why three months can be 89 to 92 days, and how to choose between them.
- Difference Between DatesWork out the time between two dates in years, months, and days by hand, check it with a day count, and avoid the usual off-by-one mistakes.
Open the tool
Jump into Date Difference Calculator when you are ready to process your files.
