Add months to a date

Add or subtract any number of months. The tape flags when a month is too short for your day number and shows which rule decided the answer.

Loading…

Two rules for short months

Adding months is easy until the start day doesn't exist in the target month. Spreadsheets (EDATE), databases and ISO 8601 date libraries clamp to the last day of the month. JavaScript's built-in Date and PHP's strtotime overflow: 31 January + 1 month becomes "31 February", which rolls on to 3 March. If two systems disagree about a renewal date, this is usually why. The add days to a date page steps through clamping month by month.

Months from today

Mixing months with days

For "1 month and 10 days" or "2 years 3 months", use the main date calculator, which applies years and months first and then days. For schedules that repeat every month, the recurring date generator computes each date from the start so month-end dates don't drift.

Questions people ask

How do you add months to a date?
Move the month forward by the number of months, keep the same day number, and if that day doesn't exist in the new month, use the month's last day. 15 March + 3 months = 15 June; 31 August + 1 month = 30 September.
What is 31 January plus 1 month?
28 February in a common year and 29 February in a leap year, under the ISO 8601 / Excel EDATE rule. Some programming languages (JavaScript's Date, PHP's strtotime) instead spill the extra days over and give 3 March (2 March in a leap year); the calculator lets you compare both.
How do I add months to a date in Excel or Google Sheets?
Use =EDATE(A1, 3) to add 3 months, or a negative number to subtract. Format the cell as a date. EDATE uses the same last-day-of-month rule as this calculator.
Is 6 months the same as 180 days?
No. Six calendar months are 181 to 184 days depending on the months covered. If a rule says "6 months", add months; if it says "180 days", add days.
How do I subtract months from a date?
Choose "Subtract months". 31 May − 3 months is 28 February (or 29 in a leap year), because February is shorter.
What about adding months in SQL, Python or Power Query?
Oracle ADD_MONTHS, SQL Server DATEADD(month, …), Python dateutil relativedelta and Power Query Date.AddMonths all clamp to the end of the month like EDATE (Oracle also maps a month-end start to a month-end result).

Other date calculators