EOMONTH Function in Google Sheets: Syntax and Examples

EOMONTH returns the last day of a month before or after a starting date. Use zero for the current month, a positive offset for later months and a negative offset for earlier months.

EOMONTH function syntax

=EOMONTH(start_date, months)
  • start_date: actual date value, date serial or a date-producing formula.
  • months: whole-month offset; decimal portions are truncated.

Set up the example data

Enter this small dataset starting in A1. The first row contains headers. Keep the formula output separate from the input cells.

Start dateMonths
=DATE(2026,1,15)0
=DATE(2024,2,10)1

Enter the DATE expressions as formulas, then apply a date format to those cells. They create actual dates rather than locale-dependent date text.

Find the last day of the same month

Enter this formula in A10. January 15 becomes January 31. Format the output as a date; the underlying result is a date serial.

=EOMONTH(A2,0)

Result: 2026-01-31.

EOMONTH example in Google Sheets, showing 2026-01-31 in the selected output.

Move to a future month-end

An offset of one gives the end of February. EDATE instead shifts by months while retaining the day where possible.

=EOMONTH(A2,1)

Result: 2026-02-28.

Move to an earlier month-end

Negative one returns the previous month-end, crossing into the preceding year here.

=EOMONTH(A2,-1)

Result: 2025-12-31.

Find the calendar quarter-end

MOD computes the months remaining to the calendar-quarter boundary. January needs two months to reach March. This formula is for calendar quarters, not every fiscal calendar.

=EOMONTH(A2,MOD(-MONTH(A2),3))

Result: 2026-03-31.

Count the days in a month

The last day number is also the number of days in that month. February 2024 has twenty-nine days.

=DAY(EOMONTH(A3,0))

Result: 29.

Find the first day of the next month

Adding one to the month-end gives the next month’s first day. Use this as an exclusive upper bound when filtering date-time values.

=EOMONTH(A2,0)+1

Result: 2026-02-01.

Other Google Sheets articles you may also like