Excel functions / Dates
EOMONTH
Returns the last day of a month, a given number of months away.
Syntax
=EOMONTH(start_date, months)Arguments
start_date | Any date in the starting month. |
|---|---|
months | 0 for the same month, 1 for next month, -1 for last month. |
How it works
EOMONTH handles the fiddly fact that months have different lengths. It is used for payment due dates, month-end reports and billing periods.
The first day of next month is one day after the end of this one: =EOMONTH(B2,0)+1.
Example
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Task | Start | End | ||
| 2 | Design | 2026-01-01 | 2026-01-15 | 2026-01-31 | |
| 3 | Build | 2026-01-15 | 2026-02-14 | ||
| 4 |
Result: 2026-01-31. The last day of the month the Design task starts in.
Tips
- The result is a date number, so format the cell as a date.
Practise EOMONTH
Try it yourself in a real spreadsheet, with instant feedback on every answer.