Going Stellar

Home/Google Sheets reference

Google Sheets function · Date

EOMONTH in Google Sheets: syntax and examples

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

ArgumentTypeRequiredWhat it does
start_datedateyesThe starting date.
monthsnumberyesMonths 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:

ItemDate
Invoice46037
Leap year46793
Deadline46112
=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 .

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

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

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

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

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.

Sources

  1. EOMONTH (Docs Editors Help)

Markdown version · All functions