EOMONTH Function in Excel: Last Day of a Month

EOMONTH Function in Excel: Last Day of a Month featured illustration

πŸ“Ž This article includes 2 downloadable practice files ↓

⏱ 2 min readUpdated 28 September 2026

Date & TimeLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Example 3
  6. EOMONTH in practice
  7. Where you will use it
  8. Worked example
  9. Mistakes people make
  10. Related functions
  11. Continue learning

EOMONTH returns the last day of the month, a number of months away from a date.

Advertisement

Syntax

=EOMONTH(start_date, months)
Argument What it means
start_date A date.
months 0 = this month, 1 = next, βˆ’1 = last.

Examples

Example 1

=EOMONTH(A2, 0)

Month-end of the invoice date.

Example 2

=EOMONTH(A2, -1)+1

First day of A2’s month.

Example 3

=DAY(EOMONTH(A2, 0))

Number of days in the month.

EOMONTH in practice

Where you will use it

  • Month-end dates for reports and accruals
  • Invoice due at end of next month
  • Days in a month: DAY(EOMONTH(d,0))

Worked example

DateMonthsFormulaResult
10-Feb-20260=TEXT(EOMONTH(A2,B2),"dd-mmm-yyyy")28-Feb-2026
04-Oct-20261=TEXT(EOMONTH(A3,B3),"dd-mmm-yyyy")30-Nov-2026
01-Feb-20240=TEXT(EOMONTH(A4,B4),"dd-mmm-yyyy")29-Feb-2024

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
Forgetting the months argumentEOMONTH(d,0) is required for this month
Month startEOMONTH(d,-1)+1 gives the first day

EDATE Β· DATE Β· NETWORKDAYS

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

⬇ Download all 2 files (ZIP Β· 37 KB)

  • πŸ“—
    Date scenarios workbookMonth maths, financial-year start, working days with holidays β€” with PASS/FAIL checks and the 2 most common date mistakes.
    ⬇ XLSX Β· 8 KB
  • πŸ“—
    Practice workbook: Dates & times22 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 34 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free Β· AI can be wrong