- Home
- Date & Calendar Math
- Date Calculator
Date Calculator
Add or subtract calendar time from a date. Choose calendar units (which respect month length) or fixed days (which never do), and pick how a target day that doesn't exist in the resulting month should be handled.
Want to learn more?
Worked example
January 31, 2027, plus 1 calendar month constrains to February 28, since February has no 31st that year. The same date in 2028, a leap year, plus 1 month instead gives February 29, since that month has 29 days in a leap year. Adding 30 fixed days instead of a calendar month, regardless of month length, to that same January 31, 2027, lands on March 2, a different date entirely from either calendar-month result.
Common mistakes
- Assuming calendar months and fixed days always land on the same date. They only coincide by chance, and diverge as soon as a crossed month is not exactly 30 days long.
- Not choosing a month-end rule deliberately. Constrain and preserve end-of-month only disagree when the base date is itself the last day of its month, but that case is common enough to matter.
Constrain versus preserve end-of-month
Both rules only differ when the base date is itself the last day of its month. Constrain always lands on the resulting month's last valid day for an out-of-range target. Preserve end-of-month goes further, keeping the result on the last day of its month even across a chain of additions, so a monthly end-of-month schedule stays anchored to month-end throughout, not just on the first step.
Limitations
This is calendar arithmetic only. It does not determine a contractual or billing due date, so the actual governing document should always be checked for its own specific convention.
Frequently asked questions
- What is the difference between calendar months and fixed days?
- A calendar month respects the target month's actual length, while a fixed number of days always moves the same distance regardless of which months it happens to cross.
- When do the two month-end rules actually produce different results?
- Only when the base date is itself the last day of its month. Any other starting day produces the same result under either rule.