EOMONTH Function – Google Sheets

Function help for EOMONTH

EOMONTH is a function in Google Sheets that returns the ending day of a specified month. If you have many dates in your spreadsheet, this formula lets you quickly find the last day of the month in an automated fashion.

Once you have the last day of the month, see here if you want to show that date as a month name only.

Remember when using the EOMONTH function that dates behave differently than numbers; therefore, you cannot type the date directly into the formula. Because of this, you will need to use quotes, the DATE function, or a reference to a cell containing a valid date value.

Purpose

Returns the end date of a month a specified number of months away from a starting date.

Syntax

=EOMONTH(start_date, number_of_months)

start_date Any day in the month in the starting month of the calculation. For example, 1/3/2022 and 1/6/2022 would both give the same output.

number_of_months The number of months to go forward or backward

Tip: The value for the number of months will be truncated instead of rounded if you use a decimal. For example, the function will change 3.7 to 3 instead of 4.

Similar Functions

DATEDIF – Returns the number of days, months, or years between two days

EDATE – Adds or subtracts months from a date

MONTH – Returns a date’s month value as a number

app icon for TIMEDIF with a calendar and clock
TIMEDIF – Google Sheets Add-On

Calculate any duration in:

  • Years
  • Months
  • Weeks
  • Days
  • Hours
  • Minutes
  • Seconds
  • Milliseconds

Examples

Example 1 – Plain and Simple

Following are a few examples of the EOMONTH function. Notice that the values returned are at the end of each month. On the other hand, if you want to increment by month and stay on the same day of the month, consider using the EDATE function.

FormulaDescriptionResult
=EOMONTH("5/17/2017",13)Returns the last day of the month 13 months after May 17, 20176/30/2018
=EOMONTH("5/17/2017",-13)Returns the last day of the month 13 months before May 17, 20174/30/2016

The examples show EOMONTH increasing and decreasing the month.

Example 2 – Calculating Employment Benefit Start Dates

Benefits often start after employees are at a company for a specified number of calendar months. It does not matter when during a month the employees started, only how many whole months have elapsed. This table calculates the day after which the employees became eligible for benefits.

ABC
1Hire DateFormulaDay after which eligibility starts
21/13/2017=EOMONTH(A2,3)4/30/2017
31/30/2017=EOMONTH(A3,3)4/30/2017
412/21/2016=EOMONTH(A4,3)3/31/2017

Even though the three employees started within days of each other, they have different eligibility dates.

Live Examples in Sheets

Go to this spreadsheet for examples of the EOMONTH function shown above that you can study and use anywhere you want.

Video Explanation

YouTube player