EOMONTH Function in Microsoft Excel: Formula, Examples & Troubleshooting
Learn the EOMONTH formula in Microsoft Excel: find the final calendar day of an offset month, with reproducible examples, expected answers and compatibility cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: Use EOMONTH to find the final calendar day of an offset month. The example below supplies exact inputs and independently calculated expected results, so you can check your formula before replacing the demonstration values with real workbook data.
Verification: The function is covered by a vendor reference or its published formula catalogue. The worked outputs here are independently reasoned, not screenshots or native test results from Microsoft Excel. Check release-specific support and argument details in the referenced vendor help.
Availability and version history
- Introduced: Introduction version not established by the official history reviewed.
- Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official EOMONTH reference. Documentation check, not a new native test; existing example-verification notes retain their scope.
Syntax and arguments
=EOMONTH(start_date, months)
Start date value and whole-month offset. In formula syntax, square brackets mark optional arguments; do not type square brackets into an ordinary formula unless the particular function requires array notation. The separator shown is for the example locale and might change with spreadsheet settings.
When to use it: Add 1 to EOMONTH of previous month for a reliable first-of-month boundary.
Prepare the example inputs
Enter the self-contained DATE-based formulas in unused cells. Keep source dates as actual date values, and inspect the formula bar if the displayed answer differs. Format the date-valued output as a date; the calendar result shown below is a display, not text returned by the function.
Worked example: exact formula and expected output
=EOMONTH(DATE(2026,2,4),0)
Expected result: 28 Feb 2026. February 2026 has 28 days.
- Select an unused output cell (for example H2 if the practice table occupies A1:F9).
- Enter the formula exactly as shown, including the opening equals sign and quoted text.
- Compare the displayed answer to the expected result, then inspect the source cells if it differs.
For a range formula, the row numbers include data rows only unless the example explicitly refers to headers. A result that looks plausible may still be wrong if it references the wrong column.
Second example: a different input
=EOMONTH(DATE(2024,2,4),0)
Expected result: 29 Feb 2024. February 2024 has 29 days because 2024 is a leap year.
This second check uses the same function with a different input, helping you identify whether the first result was coincidental or caused by a shifted reference.
EOMONTH chooses the target month’s last date
Both arguments are required. Positive months move forward and negative months move backward; zero selects the starting date’s own month. Microsoft documents truncation when months is not an integer.
For an anchor of October 15, 2026:
| Formula | Expected calendar date |
|---|---|
| =EOMONTH(DATE(2026,10,15),-1) | 2026-09-30 |
| =EOMONTH(DATE(2026,10,15),0) | 2026-10-31 |
| =EOMONTH(DATE(2026,10,15),1) | 2026-11-30 |
| =EOMONTH(DATE(2026,10,15),3) | 2027-01-31 |
The start day of 15 does not become the output day. For a same-day calendar-month shift, consult EDATE and its separate short-month caveats.
Advanced example: expose fractional-month truncation
=EOMONTH(DATE(2026,10,15),2.9)
=EOMONTH(DATE(2026,10,15),-2.9)
Expected results are 2026-12-31 and 2026-08-31. Truncation uses two and negative two; it does not round to three or floor negative 2.9 to negative three.
Use integer input validation when fractional months are unintended. Formatting 2.9 to display no decimal places does not establish that the stored offset became a different integer.
Advanced example: create first-of-month boundaries
For A2 containing =DATE(2026,10,11):
=EOMONTH(A2,-1)+1
=EOMONTH(A2,0)+1
Expected dates are 2026-10-01 and 2026-11-01. The first is the start of the current month; the second is the start of the next. Their difference is 31 calendar days.
The same pattern works across the end of a year: with a December 2026 anchor, the second boundary is January 1, 2027. The +1 means one calendar day after a month end, not one month after it.
Advanced example: include the whole final day in timestamp criteria
Create this independent H1:I5 table. Display column H as a date and time, while keeping its values numeric:
| Row | H · Timestamp formula | I · Amount |
|---|---|---|
| 2 | =DATE(2026,10,1) | 10 |
| 3 | =DATE(2026,10,31)+0.5 | 20 |
| 4 | =DATE(2026,11,1) | 30 |
| 5 | =DATE(2026,10,31) | 40 |
The fraction 0.5 represents noon within a day. Microsoft documents fractional-day time storage in its date-system and time-value guidance.
=SUMIFS(I2:I5,H2:H5,">="&DATE(2026,10,1),H2:H5,"<"&(EOMONTH(DATE(2026,10,11),0)+1))
Expected result: 70, from 10+20+40. The November 1 value is excluded. Replacing the upper test with "<="&EOMONTH(DATE(2026,10,11),0) produces 50 on this dataset because the noon record is later than the date serial for October 31 at midnight.
Use the next-month boundary exclusively when the requirement is to include all times on the last day. This is a numeric date-time comparison, not a timezone conversion or a guarantee that imported timestamps are parsed correctly.
Advanced check: derive the month’s length
=DAY(EOMONTH(DATE(2024,2,4),0))
=DAY(EOMONTH(DATE(2026,2,4),0))
Expected counts are 29 and 28. The function first returns the last date; DAY then extracts its day number. Keep the date and the count in appropriately formatted cells so those different output types remain clear.
Errors and remaining limits
Microsoft documents #NUM! for an invalid start date or a start-date/month combination that yields an invalid date. This differs from EDATE’s stated invalid-start error. These source rules do not establish every malformed-text, blank, Boolean or out-of-range coercion case.
Use explicit DATE-based modern controls before depending on a migrated workbook’s date system, old raw serials or a native error display. The examples are independently calculated expectations; they are not recorded Excel execution.
Important edge cases and a common mistake
Watch out: The result is a date serial and needs a date display format; it is not text.
If this formula needs to work in older Excel releases, consult the Microsoft version markers first; the function’s presence in a Microsoft 365 workbook does not establish Excel 2013 support.
Troubleshooting in Microsoft Excel
Microsoft documents Formulas → Evaluate Formula for Excel for Windows. If that command is unavailable in your client, put the component expressions in separate helper cells and compare their results; also check whether numeric-looking source values are stored as text. #NAME? suggests a misspelling or an unavailable new function. #VALUE! often indicates a wrong argument type; #SPILL! on array functions often means output cells are occupied.
If you get the wrong answer but no error, try these checks in order: (1) evaluate the simplified first example; (2) confirm the cell values and data types; (3) check the exact row and column boundaries; (4) verify quoted text, comparison operators and separators; (5) only then add more criteria or nested functions.
For a reproducible comparison with another spreadsheet product, use the same input values in both applications and record the installed version and locale. Different default matching behavior or handling of empty values can be a migration issue rather than a mathematical disagreement.
Moving this formula between spreadsheet programs
Excel generally uses commas in English-language help formulas; LibreOffice and Collabora Calc commonly use semicolons. An identically named function may still have different matching defaults, dynamic-array behavior or version support.
Related guides already published for this function: LibreOffice Calc | ONLYOFFICE Spreadsheet Editor | Apple Numbers | Zoho Sheet
If a comparison tool says Not researched here, that means we do not yet have a checked guide for that software. It does not mean the software lacks this function. See the 12-program comparison tool for a guide-coverage matrix.
Official reference and editorial verification
Evidence level: Vendor-published function catalogue / formula overview, checked for this editorial batch on October 11, 2026; example outputs verified by direct reasoning/arithmetic where applicable. No execution in Microsoft Excel was performed. Some platform-, language- and release-specific edge cases remain for native testing.
October 14, 2026 review scope
The complete guide and all original formulas were reviewed against the direct Microsoft EOMONTH reference. Added expectations use independently computed modern Gregorian calendars, explicit component rules and narrowly documented errors. The latest approved lifecycle section and Windows-specific troubleshooting scope are retained. No native Excel execution, historical serial certification or complete input-conversion matrix is claimed.