Calculate a due date N months from a start date
Get the last day of a month N months out from any start date — for invoice due dates or renewal dates — without counting days by hand.
Last updated
Fill in the blanks
Assembled in your browser — nothing you type is stored or sent anywhere.
Your formula
Works in both Excel and Google Sheets unless the fine print below says otherwise.
Why it's built this way
- →EOMONTH jumps straight to the last calendar day of the target month, whatever that day is — the 28th, 30th or 31st — which beats adding a fixed number of days that only works for some months.
- →months_out picks which month it lands on: 0 means the end of the current month, a positive number moves forward that many months, and a negative number moves back.
- →Adding 1 to the result gives the first of the FOLLOWING month instead — a common variant when a due date should start the next cycle rather than end this one.
The fine print
- →EOMONTH returns a date serial number; if the cell shows a large integer instead of a date, apply a date number format to it.
- →months_out should be a whole number — a decimal is truncated toward zero rather than rounded.
- →Works identically in Excel and Google Sheets.
Part by part
- =EOMONTH(
- Returns the last day of a month, offset by a number of months from a start date. It handles month lengths and leap years without any arithmetic on your part.
- {{months_out}}
- How many months forward. Zero gives the end of the start date's own month, and negative values go backwards.
Common mistakes
=B2+30Adds thirty days rather than a month, so the result drifts through the calendar — a January start lands on 31 January, and by December the same offset has slipped several days off the month end.
=EOMONTH(B2, 1)=DATE(YEAR(B2), MONTH(B2)+1, DAY(B2))Preserving the day number breaks on month ends: 31 January plus one month becomes 31 February, which Excel rolls forward into March. EOMONTH exists precisely to avoid that.
=EOMONTH(B2, 1) formatted as a numberThe result is a date serial, so an unformatted cell shows a five-digit number. It is correct and unreadable — apply a date format, which is the most common confusion with every date function.
Questions
How do I get the first day of the following month instead?
Add one to the end of the current month: =EOMONTH(B2, 0) + 1. That is more reliable than constructing a date, since it cannot produce an invalid day number.
What does a negative offset do?
Goes backwards — minus one gives the end of the previous month. Useful for period-close reporting, where the reference is usually the last day of the month just ended.
Does it account for weekends and holidays?
No, it returns a calendar date whatever day of the week that falls on. If invoices must be due on a working day, pass the result through WORKDAY to shift it.
Why does it sometimes give a date in the wrong year?
It does not — it rolls over correctly, so EOMONTH for December plus one returns the end of January in the following year. A wrong-looking year is nearly always a two-digit-year import problem in the source cell.