EOMONTH

Return the month end, a number of months before or after a date.

Syntax

EOMONTH(start_date, months)
Argument Required Description
start_date Required The date to start from.
months Required How many months to shift before taking the month end. 0 means this month.

Examples

Every example below was executed against VisiGrid engine 0.35.0 — not transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.

Formula Result Notes
=EOMONTH(DATE(2024,2,10),0) 45351 The end of February 2024, from any date within it.
=DAY(EOMONTH(DATE(2024,2,10),0)) 29 Which is also how many days that month had.
=EOMONTH(DATE(2024,1,15),1) 45351 One month on, then the month end.

Period ends without a calendar

Any date in a month gives that month’s end, so a report can derive its own boundaries from a single input date:

=EOMONTH(A1, 0)       month end
=EOMONTH(A1, -1) + 1  the first of this month
=EOMONTH(A1, 0) + 1   the first of next month

The middle one is the idiom worth remembering — there is no SOMONTH, and “end of last month plus a day” is how everyone spells the start of the current one.

Leap years are handled, so February needs no special case.

Against DAY(EOMONTH(…))

Pairing it with DAY gives the number of days in a month, which is the usual way to pro-rate a monthly figure across a partial period.

Excel compatibility

Matches Excel.

Related functions

Last updated