EOMONTH
Returns the serial for the last day of the month at a month offset from a start date.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=EOMONTH(start_date, months)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
start_date | number | Required | — |
months | number | Required | — |
Remarks
- A date argument may be text holding a date or time (
"10/26/1999","1999-10-26 14:05"), read as its serial; text that is neither a number nor a date returns#VALUE!. monthsis truncated to an integer before offset calculation.- The returned date is always the month-end date for the target month.
- Serials are interpreted and returned using the workbook's date system (Excel 1900 or Excel 1904).
Examples
Move forward one month from January 31 into leap-year February.
Formula =EOMONTH(DATE(2024,1,31),1)
Expected result 45351
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Use a negative month offset to go backward.
Formula =EOMONTH(DATE(2024,3,15),-1)
Expected result 45351
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Apply a zero-month offset in the middle of February.
Formula =EOMONTH(DATE(2024,2,15),0)
Expected result 45351
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The month offset must be numeric.
Formula =EOMONTH(DATE(2024,2,15),"one")
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Get end of current month
Formula =EOMONTH(44927, 0)
Expected result 44957
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Get end of month two months ahead
Formula =EOMONTH(45322, 2)
Expected result 45382
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Does EOMONTH always return a month-end date?
Yes. Regardless of the start day, EOMONTH returns the final calendar day of the target month after offset.