Skip to main content

EOMONTH in Excel

Last updated

EOMONTH returns the last day of a month, a number of months before or after a date. For example, =EOMONTH(B2,1) returns February 28, 2025 for an invoice dated January 17, 2025: the end of the following month. Use 0 for the end of the same month.

EOMONTH syntax

=EOMONTH(start_date, months)

start_date
The date to start from: a cell such as B2, TODAY(), or DATE(2025,1,17).
months
How many months to move: 0 for the same month, 1 for the next one, -1 for the previous one. It can come from a cell, like C2.

Practice EOMONTH here

Type your formula straight into the sheet. It’s checked like real Excel, and you can write it with commas or semicolons.

Exercise 1 of 1

Find the last day of the month

In C2, return the last day of the month of the invoice date in B2 with EOMONTH.

InvoiceInvoice dateMonth end
INV-310714/02/2025

How to use EOMONTH, step by step

  1. Click the cell for the result and type =EOMONTH(.
  2. Select the start date, then type a comma.
  3. Type the number of months to move: 0 for this month’s last day, 1 for next month’s.
  4. Close the parenthesis and press Enter. If the cell shows a number such as 45716, give it a date format.

EOMONTH examples

End of this month

=EOMONTH(B2,0)

February 14, 2025 gives February 28, 2025.

End of next month

=EOMONTH(B2,1)

An invoice from December 22, 2025 is due January 31, 2026.

1st of next month

=EOMONTH(B2,0)+1

A sign-up on March 31, 2025 is first billed on April 1, 2025.

Contract end with EDATE

=EDATE(B2,C2)

January 31, 2025 plus 1 month gives February 28, 2025.

Common EOMONTH errors and how to fix them

ErrorCauseFix
45716EOMONTH returns a date serial number, and the cell has the General format.Apply the Short Date format to the cell: 45716 is February 28, 2025.
#VALUE!The start date is text that Excel can’t read as a date.Use a real date (it aligns to the right) or build one with DATE(year,month,day).
#NUM!The start date plus the months lands outside the dates Excel supports, for example before the year 1900.Check the months argument: a value like -12000 is usually a typo.
#NAME?The name is misspelled, for example EOMONTHS or ENDMONTH.Type the name in full: EOMONTH, for “end of month”.

EOMONTH vs EDATE and DATE

EOMONTH always lands on the last day of a month, which suits due dates and month-end reports. EDATE moves a date by whole months and keeps the day: =EDATE(B2,6) is six months later, and stops at the last day when the day doesn’t exist, as January 31 plus one month gives February 28. =DATE(YEAR(B2),MONTH(B2)+1,0) also returns the end of the month, because day 0 means the day before the 1st, but EOMONTH says what it does. Adding 30 days to a date drifts away from month ends, because months have 28 to 31 days.

Frequently asked questions

How do I get the first day of the month?

Take the end of the previous month and add one day: =EOMONTH(B2,-1)+1.

How many days are in a month?

Return the day of its last date: =DAY(EOMONTH(B2,0)) gives 28 for February 2025.

What is the difference between EOMONTH and EDATE?

EOMONTH returns the last day of the month you land on. EDATE keeps the day of the month, so it suits contract end dates and renewals.

How do I calculate “end of next month” payment terms?

Use =EOMONTH(B2,1), with the invoice date in B2. Put the number of months in a cell to give each customer their own terms.

Keep practising

All 5 EOMONTH exercises, with explanations and progress tracking.

Open the EOMONTH practice set