EOMONTH
Returns the last day of the month, n months in past or future.
=EOMONTH(start_date, months)This static page keeps the function indexed for search, while the spreadsheet app handles interactive exploration and saved formulas.
What the function does
Overview
Returns the last day of the month, n months in past or future.
The EOMONTH function returns the serial number for the last day of the month that is a specified number of months before or after a ate. It is indispensable for financial modeling to determine maturity dates, due dates, or reporting periods. It handles varying month lengths (28, 30, 31 days) and leap years automatically. A key best practice is ensuring the ate is a valid Excel date; otherwise, the function returns #VALUE!. When using it for current month calculations, use 0 for the months argument; negative values move backward in time, while positive values move forward. Note that if the months argument is not an integer, it is truncated. Because EOMONTH returns a serial number, the result cell must be formatted as a 'Date' to be human-readable.
Quick reference
Syntax
=EOMONTH(start_date, months)
Inputs
Arguments
Example: A2
Example: 1
Formula patterns
Examples
Calculate the end of the current month
=EOMONTH(A2, 0)Determine the end of the previous quarter
=EOMONTH(A2, -3)Projecting a project deadline six months out
=EOMONTH(A2, 6)Avoid these issues
Common Errors
#VALUE!
Cause: The start_date argument is not a valid date or is a text string that Excel cannot interpret as a date.
Fix: Ensure the source cell contains a valid date or use the DATE(year, month, day) function to generate the start_date.
#NUM!
Cause: The resulting date falls outside of Excel's supported date range (January 1, 1900, to December 31, 9999).
Fix: Verify that the months argument is not excessively large or negative, pushing the date out of bounds.
Platform support
Compatibility
Source: Microsoft Support
Common questions
Frequently Asked Questions
Returns the last day of the month, n months in past or future.
ate: Base date months: Months to add (positive) or subtract (negative)
#VALUE!: Ensure the source cell contains a valid date or use the DATE(year, month, day) function to generate the ate. #NUM!: Verify that the months argument is not excessively large or negative, pushing the date out of bounds.