How to Add Months and Years to a Date
Adding a calendar month or year is not the same as adding a fixed number of days. Short months and leap days require an explicit rule.
Why months are not fixed durations
Calendar months have different lengths. One month after 1 March is 1 April, a span of 31 calendar days; one month after 1 April is 1 May, a span of 30. A fixed number of days answers a different question from the same day in a later month.
Choose the unit that matches the real requirement. A service agreement may specify calendar months, while a return window may specify a number of days. Read the actual wording and avoid replacing one with the other just because an average month has a familiar length.
What happens to 31 January?
February has no 31st day, so “one month after 31 January” needs a policy. Some applications clamp to the final day of February. Others reject the operation or use a different rollover rule. None of those policies can be assumed universally.
The site's date add and subtract calculator clamps to the last day of the destination month when necessary. Thus one month after 31 January 2026 is 28 February 2026, while the same calculation in 2024 gives 29 February. The result is a date, not a local clock time.
Leap days and annual dates
A year after 29 February 2024 has no matching 29 February in 2025. Under a clamp-to-month-end policy, the result is 28 February 2025. Another organization may use 1 March for a particular anniversary or legal purpose. The correct policy depends on the context.
Leap years follow the Gregorian divisibility rules, including the century and 400-year exceptions. See What Is a Leap Year? for examples and the distinction between calendar rules and legal treatment of birthdays.
Adding and subtracting may not reverse
Month-end adjustment can lose the original day. If 31 January becomes 28 February after adding a month, subtracting one month from 28 February under the same policy gives 28 January, not 31 January. This is expected because the intermediate result no longer carries the original day.
For a recurring schedule that should always use the last day of each month, store that rule explicitly. Repeatedly adding a month to the previously adjusted date can drift away from the intended month-end pattern. A recurrence rule and a one-time calculation are different operations.
Dates, time zones and deadlines
Date-only arithmetic does not specify a time of day or determine an instant. If an appointment also has a local clock time and named zone, apply the relevant zone rules when resolving each occurrence. A daylight-saving transition can make some local readings missing or repeated.
The calculator counts calendar days and does not apply holiday or business-day calendars. For important deadlines, follow the applicable organization's rules. Continue to calendar versus elapsed time and business days.
A small reference table
These results use the end-of-month clamping rule, the same rule used by this site's date calculator, Excel's EDATE and PostgreSQL's date + interval '1 month':
- 2026-01-29 + 1 month → 2026-02-28
- 2026-01-30 + 1 month → 2026-02-28
- 2026-01-31 + 1 month → 2026-02-28
- 2028-01-31 + 1 month → 2028-02-29 (2028 is a leap year)
- 2026-03-31 + 1 month → 2026-04-30
- 2026-08-31 + 6 months → 2027-02-28
Three different start dates land on the same result. That is why adding a month and then subtracting one does not always bring you back.
How common tools behave
Not every tool clamps. JavaScript's Date rolls over instead: new Date(2026, 0, 31) followed by setMonth(1) asks for 31 February, which becomes 3 March 2026. Python's standard library has no "add months" operation at all. The popular dateutil.relativedelta package clamps, like EDATE. If two systems in one workflow use different rules, the same contract date can come out differently in each.
Chaining versus counting from the anchor
A monthly payment that starts on 31 January can be scheduled two ways. Chaining adds one month to the previous result: 31 Jan → 28 Feb → 28 Mar → 28 Apr. The date drifts to the 28th and stays there. Counting from the anchor adds n months to the original date: 28 Feb, 31 Mar, 30 Apr. The second approach keeps the customer's "last day of the month" intent, and it is what most billing systems mean.
Common questions
What is one year after 29 February 2028?
With clamping it is 28 February 2029, because 2029 has no 29 February. Some legal and administrative rules use 1 March instead, so check the rule that applies.
What is one month before 31 March?
28 February in a common year and 29 February in a leap year, under the clamping rule.
Does adding 12 months equal adding one year?
With the usual clamping rule, yes. Both move the date to the same day in the following year, with the same end-of-month adjustment.