Using the EOMONTH Function

The EOMONTH function is used to return the serial number value for the last day of any particular month, past, present, or future. The syntax for the function is as follows:

=EOMONTH(base, offset)

The base value is a date from which the function should do its calculations, and the offset is a number that indicates how many months from the base date should be used. For instance, an offset of 0 would indicate that EOMONTH should return the last day of the month represented in base, whereas an offset of 4 would be four months after base, and ?2 would be two months before.

As an example, the following are typical uses of EOMONTH. The first line can be used to return the last day of the current month, and the second line returns the last day of the month six months later than the date in A1:


Remember that EOMONTH returns a serial number. Excel does not automatically format the serial number as a date. In other words, you will need to explicitly format the cell as a date.