Function guides · Date
EOMONTH function
Returns the last day of the month, a given number of months before or after a date.
Syntax
=EOMONTH(start_date, months)
| Argument | What it is |
|---|---|
start_date | The starting date. |
months | Months to move. 0 is the same month, 1 the next, -1 the previous. |
What EOMONTH does
EOMONTH returns the last day of a month. You give it a starting date and a number of months to move, and it returns the month-end that results.
With 0 it stays in the same month. With 1 it jumps to the end of the next, and with -1 to the end of the previous one. It handles different month lengths and leap years for you. Month-ends are how finance works: invoices due at month-end, accrual periods, reporting dates.
Add 1 to the previous month’s end and you get the first day of the current month.
For date windows in SUMIFS, EOMONTH removes the need to type dates. If the month of interest is in a cell, the window is ">="&EOMONTH(A2,-1)+1 for the start and "<="&EOMONTH(A2,0) for the end. Change the cell and every result moves with it.
EOMONTH accepts large month offsets, so EOMONTH(A2,12) is the end of the same month next year. It returns a serial number, and a date format is needed for it to be readable.
EOMONTH examples
1. End of the current month
| A | B | |
|---|---|---|
| 1 | Invoice date | |
| 2 | 2/10/2026 | 02/28/2026 |
With 0 months, EOMONTH returns the last day of the month the date falls in. It knows month lengths and leap years, so you never have to remember that February has 28 days.
2. Due at the end of next month
| A | B | |
|---|---|---|
| 1 | Invoice date | |
| 2 | 3/14/2026 | 04/30/2026 |
A term of "due at the end of next month" is EOMONTH with 1 month. An invoice dated March 14 is due April 30. This is not "net 30", which is 30 days from the invoice date and is plain addition.
3. First day of the month
| A | B | |
|---|---|---|
| 1 | Order date | |
| 2 | 3/14/2026 | 03/01/2026 |
Add one day to the end of the previous month. EOMONTH with -1 returns the last day of last month, and adding 1 moves to the first day of this month. It is shorter than rebuilding the date with DATE.
Common EOMONTH mistakes
- Result shows as a number. EOMONTH returns a serial number, so format the cell as a date.
- Expecting it to return the same day. It returns the last day of the month. For the same day in another month, use EDATE.
- Using it in Excel 2003. It needed an add-in then. In every modern version it is built in.
- Text dates. A start date stored as text returns #VALUE!. Convert it first.
EOMONTH on Excel job tests
Month-end dates are phrased as "the last day of the month", "end of next month" or "the first day of the following month". Payment terms, accrual periods and report headings all use them.
EOMONTH also builds the windows for SUMIFS. For the month of the date in A2, the start is EOMONTH(A2,-1)+1 and the end is EOMONTH(A2,0). Format the result as a date; 46081 is correct and unreadable.
Related functions
EOMONTH questions
- What does EOMONTH do?
- It returns the last day of a month, counted from a start date plus or minus a number of months.
- How do I get the first day of the month?
=EOMONTH(A2,-1)+1.- What is the difference between EDATE and EOMONTH?
- EDATE keeps the same day number. EOMONTH always returns the last day.
- How does EOMONTH handle leap years?
- Correctly: EOMONTH of any date in February 2028 returns February 29.
Practice EOMONTH
Try it in a working grid: the free lesson DATE, YEAR, MONTH and DAY (module 10 of Everyday Excel) has checked EOMONTH exercises.
Practice this function