# EOMONTH in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/eomonth/

EOMONTH gives the last day of the month that falls a set number of months from a start date. With 0 it stays in the same month. It is the quick way to find month ends, due dates and month lengths.

## Syntax

```
EOMONTH(start_date, months)
```

## Arguments

- `start_date` (date, required: yes): The starting date.
- `months` (number, required: yes): Months to move. 0 stays in the same month, 1 is next month, -1 is the previous one.

## Examples

The examples use this table, starting in A1:

| Item | Date |
|---|---|
| Invoice | 46037 |
| Leap year | 46793 |
| Deadline | 46112 |

```
=TEXT(EOMONTH(B2, 0), "yyyy-mm-dd")
```

Result: `2026-01-31`

Last day of the month that contains the date. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=TEXT(EOMONTH(B2, 1), "yyyy-mm-dd")
```

Result: `2026-02-28`

Last day of the next month. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=TEXT(EOMONTH(B2, -1) + 1, "yyyy-mm-dd")
```

Result: `2026-01-01`

First day of the current month: end of the previous month plus one day. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=DAY(EOMONTH(B3, 0))
```

Result: `29`

How many days the month has. February 2028 has 29. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=TEXT(EOMONTH(B4, 3), "yyyy-mm-dd")
```

Result: `2026-06-30`

Three months after 2026-03-31, always counted to the month end. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- The result is always a month end, never the same day number. EOMONTH(2026-03-31, 3) gives 30 June, not 31 June.
- The cell shows the date in the locale's format: 1/31/2026 in en_US, 31.01.2026 in Romania. Wrap EOMONTH in TEXT when you need a fixed format.
- A decimal months value is cut, not rounded: 1.9 moves one month.
- Text that is not a date returns #VALUE!, and a missing months argument returns #N/A.

## Compared with Excel

Same syntax in Excel.

## Questions and answers

### How do I get the first day of the month in Google Sheets?

Take the end of the previous month and add 1: =EOMONTH(A2, -1) + 1.

## Related functions

- [EDATE](https://goingstellar.ro/reference/sheets/edate/)
- [DATE](https://goingstellar.ro/reference/sheets/date/)
- [DAY](https://goingstellar.ro/reference/sheets/day/)
- [MONTH](https://goingstellar.ro/reference/sheets/month/)
- [DATEDIF](https://goingstellar.ro/reference/sheets/datedif/)
- [WORKDAY](https://goingstellar.ro/reference/sheets/workday/)

## Sources

- [EOMONTH (Docs Editors Help)](https://support.google.com/docs/answer/3093044)

