Excel EOMONTH Function

HomeExcel FunctionsExcel EOMONTH Function (Example + Sample File)

What is EXCEL EOMONTH FUNCTION

The Excel EOMONTH Function is listed under Microsoft Excel's Date Functions category. It returns the end of the month date which is the number of months in the future or the past. You can use a positive number for a future date and a negative number for the past month’s date.

How to use it

To learn how to use the EOMONTH function in Excel, you need to understand its syntax and arguments:

Syntax

EOMONTH(start_date,months)

Arguments

  • start_date: A valid date from where you want to start your calculation.
  • months: The number of months you want to calculate before and after the start date.

Notes

  • If the start date which you have provided is not a valid date it will #NUM!.
  • After adding or subtracting months from the start date, if that date is invalid then it will return #NUM!.
  • EOMONTH is smart enough to check the total number of days while giving the last day of a month. It doesn’t matter if there is 30 days, 31 days or 29 days in a month.

Example

To master EOMONTH function we need to try it out in an example, so make sure to check out the below one:

In the below example, we have used EOMONTH with different types of arguments:

  1. We have mentioned 01-Jan-2016 as the start date and 5 months for getting a future date. As June is exactly 5 months after January, it has returned 30-Jun-2016 in the result.
  2. As I have already mentioned, EOMMONTH is smart enough to evaluate the total number of days in a month.
  3. If you mention a negative number, it simply returns a past date which is the number of months back you have mentioned.
  4. In the fourth example, we have used a date which is in text format and it has returned the date without returning any errors.

Related functions

This tutorial is the part of our Excel Functions with Examples (Function Guide) and below are some of the related functions:

About the Author

Puneet Gogia

Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can find him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.