EOMONTH function
Quick answer
EOMONTH returns the last day of the month a number of months before or after a date.
- Syntax
=EOMONTH(start_date, months)- Most common use
=EOMONTH(A2,0)returns 2/28/2026 (Last day of the same month: February 28)
Use it for month-end reporting, end-of-month payment terms, and, with a +1, the first day of a month. A months value of 0 means the same month as the start date.
- Available in
- Every current version
- Category
- Date functions
- Returns
- The date of the last day of that month, as a serial number.
- Google Sheets
- Works the same in Google Sheets.
Syntax
=EOMONTH(start_date, months)
| Argument | Required? | What it is |
|---|---|---|
start_date | Required | The date to start from. |
months | Required | How many months away. 0 is the same month, 1 is next month, -1 is last month. |
Examples
Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| C2 | =EOMONTH(A2,0) | 2/28/2026 | Last day of the same month: February 28 |
| C3 | =EOMONTH(A3,1) | 12/31/2026 | End of next month, for "end of month plus one" terms |
| C4 | =EOMONTH(A4,-1)+1 | 6/1/2026 | First day of the invoice's month: end of last month plus one |
Try it live
This is the sample sheet. Change any number or text, or edit a formula, and the results update.
Show the sample data as a table
| Invoice date | Result | |
| 2/10/2026 | 2/28/2026 | |
| 11/20/2026 | 12/31/2026 | |
| 6/5/2026 | 6/1/2026 |
Practice EOMONTH
From lesson 24, EDATE, EOMONTH & NETWORKDAYS. Graded instantly, then re-checked on changed data.
Bill at month-end
E2, return the last day of each contract's start month. Fill down to E6.Common mistakes
| What you see | Why, and how to fix it |
|---|---|
| A five-digit number instead of a date | EOMONTH returns a serial number. Format the cell as a date. |
| Leaving out the months argument | Unlike some functions, months is required. Use 0 for the end of the same month. |
| Grouping by month-end shifts dates into the next month | EOMONTH(A2,1) is next month's end. For the month a date belongs to, use 0. |
Tips
- Group transactions by month with a helper column of =EOMONTH(A2,0); every date in a month maps to the same value.
Questions
How do I get the last day of the month in Excel?
Use =EOMONTH(A2,0). It returns the last day of the month that contains the date in A2.
How do I get the first day of the month?
Add one to the end of the previous month: =EOMONTH(A2,-1)+1.
Does EOMONTH handle leap years?
Yes. EOMONTH of any date in February 2028 returns February 29, 2028.
Lessons that use EOMONTH
Answers that use EOMONTH
In other languages
EOMONTH is FIN.MES in Spanish Excel and MONATSENDE in German Excel. Each page has the syntax with semicolons, the examples and the exercise in that language. For other functions and languages, use the Function Translator.
Updated Checked by running: every formula on this page was run by our formula engine on .