Date

EOMONTH

Definition

EOMONTH returns the last day of the month that is a given number of months before or after a start date.

Syntax

=EOMONTH(start_date, months)

Arguments

Argument Meaning
start_date The date to shift from, or the cell holding it.
months How many months to move before taking the month's last day. 0 stays in the start month.

Worked example

A billing sheet needs the last day of the month after each start date. Starts are in A2:A4. Format the result as a number to see the serial.

A: Start
10 Feb 2023
8 Mar 2023
20 Oct 2023

Formula: =EOMONTH(A2,1)

Result: 45016. One month after 10 February 2023 is March, and the last day of March 2023 is serial 45016.

Practice

Cell A2 holds the date 15 January 2024. In B2, write a formula that returns the last day of that same month.

  1. In B2, write an EOMONTH formula that returns the last day of the month of A2 with 0 months added.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

DATEDIF can then count complete months from a start date to that month end. TODAY can be the start date when you need the last day of this month or a later one.

Common mistake

Using 1 for the current month: months 0 is this month's last day, and 1 is the last day of the next month.

Related functions

These links are related functions.