# EOMONTH function in Excel

> EOMONTH returns the last day of the month a number of months before or after a date.

Source: https://spreadsheetpractice.com/functions/eomonth · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** 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)
- **Available in:** Every current version
- **Category:** [Date functions](https://spreadsheetpractice.com/functions/category/date)
- **Returns:** The date of the last day of that month, as a serial number.
- **Google Sheets:** Works the same in Google Sheets.

## What it does

EOMONTH returns the last day of the month a number of months before or after a date. 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.

## 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 was calculated by running the formula on the sample sheet.

| 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 |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C |
|---|---|---|---|
| 1 | Invoice date |  | Result |
| 2 | 2/10/2026 |  | 2/28/2026 |
| 3 | 11/20/2026 |  | 12/31/2026 |
| 4 | 6/5/2026 |  | 6/1/2026 |

## 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.

## Related functions

- [EDATE](https://spreadsheetpractice.com/functions/edate): EDATE returns the date a given number of months before or after a start date, keeping the same day of the month.
- [DATE](https://spreadsheetpractice.com/functions/date): DATE builds a real date from a year, month and day.
- [DAY](https://spreadsheetpractice.com/functions/day): DAY returns the day of the month from a date, as a number from 1 to 31.

## 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.

## Practice

A graded EOMONTH exercise ("Bill at month-end") is on [the EOMONTH page](https://spreadsheetpractice.com/functions/eomonth). It is checked instantly, then re-checked on changed data.

Lessons that use EOMONTH:

- [Lesson 24: EDATE, EOMONTH & NETWORKDAYS](https://spreadsheetpractice.com/learn/edate-eomonth-networkdays) (Pro)

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
