
π This article includes 2 downloadable practice files β
In this article
EOMONTH returns the last day of the month, a number of months away from a date.
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
| Date | Months | Formula | Result |
|---|---|---|---|
| 10-Feb-2026 | 0 | =TEXT(EOMONTH(A2,B2),"dd-mmm-yyyy") | 28-Feb-2026 |
| 04-Oct-2026 | 1 | =TEXT(EOMONTH(A3,B3),"dd-mmm-yyyy") | 30-Nov-2026 |
| 01-Feb-2024 | 0 | =TEXT(EOMONTH(A4,B4),"dd-mmm-yyyy") | 29-Feb-2024 |
Results calculated in Excel.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| Forgetting the months argument | EOMONTH(d,0) is required for this month |
| Month start | EOMONTH(d,-1)+1 gives the first day |
Related functions
π Part of the free Excel course: Beginner β Expert Β· Try it in the Formula Lab or ask the AI Helper.
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.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time β plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul βBuild this skill next
This page is a quick function reference. Use it for syntax, then practise the function in a broader workflow.
Stuck on a step? Ask a question and the AI answers using this article.