EOMONTH Function
Returns the last day of the month offset by n months.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| start_date | The starting date serial. | Required |
| months | The number of months to move. Positive moves forward, negative moves backward. The value is truncated to an integer. | Required |
Basic Example
Last day of the same month
=EOMONTH(DATE(2024, 1, 15), 0)Zero months offset returns the end of January 2024, which is Jan 31 (serial 45321).
Advanced Examples
Example 1: Last day of the next month in a leap year
Computing February month-endOne month forward lands on Feb 29 in 2024
=EOMONTH(DATE(2024, 1, 15), 1)Example 2: Last day of the previous month
Finding the prior period endA negative months value goes backward
=EOMONTH(DATE(2024, 1, 15), -1)How EOMONTH Works
EOMONTH first moves start_date by the supplied number of months, then returns the serial number of the final day of that resulting month. It is often combined with DATE to build the first day of a month (e.g. EOMONTH(...)-DAY(...)+1).
Important Notes & Limitations
The months argument is truncated to an integer (1.9 becomes 1).
Negative months go backward in time.
The result is a serial number and needs a date format to be readable.
Common Errors & Fixes
#VALUE!The start_date is not a valid date serial.Fix: Pass a real date value or DATE(...) expression.
Unexpected month shownMisreading the offset sign.Fix: Remember positive months move forward, negative move backward.
Download Practice File
EOMONTH
eomonthPractice EOMONTH with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the EOMONTH function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps