Formulas that return the last or first day of a month

Article translations Article translations
Article ID: 214101 - View products that this article applies to.
This article was previously published under Q214101
Expand all | Collapse all


This article describes how to create a formula that returns the last or first day of the current month in Microsoft Excel.


You can use the EOMONTH function to return the last day of the current month. For example, the following formula
returns the last day of the current month. Because the second argument (the MONTHS argument) is 0 (zero), the function assumes that the month that you want to use is the current month. If the second argument is 1, the function returns the last day of the following month.

To find the first day of the following month, use the following EOMONTH function:

This function is part of the Analysis ToolPak add-in. If you do not click Tools, and then click Add-ins to install and enable the Analysis ToolPak add-in, the formula will return a #VALUE error. You will also receive a #NAME error if either of the function arguments is nonnumeric.

*The workbook functions from the Analysis ToolPak (ATP) are incorporated into the core set of functions in Office Excel 2007. The EOMONTH function is built in to Office 2007 and Office 2010.

 Changes in Office Excel 2007
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.


Article ID: 214101 - Last Review: February 16, 2012 - Revision: 1.0
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 97 Standard Edition
  • Microsoft Excel 2001 for Mac
  • Microsoft Excel 98 for Macintosh
kbhowto KB214101

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from