The Excel EOMONTH Function

Related Function:
EDATE

Function Description

The Excel Eomonth function returns the last day of the month, that is a specified number of months before or after an initial supplied start date.

The syntax of the function is:

EOMONTH( start_date, months )

where the arguments are as follows:

start_date - The initial date.
months - The number of months (positive or negative) to add to the start_date, before returning the last day of the resulting month.

Date Arguments

Note that it is advised that you do not type dates directly into functions, as Excel interprets text representations of dates differently, depending on the date interpretation settings on your computer.

Therefore the start_date argument for the Eomonth function should be input as either:

or

Eomonth Function Examples

Column B of the following spreadsheet shows several examples of the Eomonth function.

 Formulas:
  A B
1 01-Jan-2012 =EOMONTH( A1, 9 )
2 01-Jan-2012 =EOMONTH( A2, -12 )
3 01-Jan-2012 =EOMONTH( A3, 0 )
4 29-Feb-2012 =EOMONTH( A4, 12 )
5 28-Feb-2011 =EOMONTH( A5, 12 )
 Results:
  A B
1 01-Jan-2012 31-Oct-2012
2 01-Jan-2012 31-Jan-2011
3 01-Jan-2012 31-Jan-2012
4 29-Feb-2012 28-Feb-2013
5 28-Feb-2011 29-Feb-2012

The above examples show that:


For further examples of the Excel Eomonth function, see the Microsoft Office website.


Eomonth Function Errors

If you get an error from the Excel Eomonth function this is likely to be one of the following:

Common Errors
#NUM! -

Occurs if either:

  • The supplied start_date is not a valid Excel date
or
  • The supplied start_date plus the value of the months argument is not a valid Excel date.
#VALUE! - Occurs if any of the supplied arguments are non-numeric.