EOMONTH
LAATSTE.DAG in Dutch Excel
Returns the last day of the month that lies a given number of months before or after a date.
Last updated: 13 October 2026
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Entry no. | Date | Amount | Period end |
| 2 | 25-0411 | 28 Nov 2025 | €640.00€ 640,00 | |
| 3 | 25-0412 | 12 Dec 2025 | €1,180.00€ 1.180,00 | 31 Dec 202531 Dec 2025=EOMONTH(B3, 0)=EOMONTH(B3; 0) |
| 4 | 25-0413 | 31 Dec 2025 | €395.00€ 395,00 | |
| 5 | 25-0414 | 5 Jan 2026 | €2,050.00€ 2.050,00 |
Swipe sideways to see all columns
Result: 31 Dec 2025
=EOMONTH(B3,0)
=EOMONTH(B3;0)
What EOMONTH does and when to use it
What it does: it returns the last day of the month that lies a given number of months from a date, for example 28 February 2026 for any date in February 2026.
When to use it: for month-end closing dates, payment terms that run from the end of the month, reporting periods and anything prorated by the days in a month. Add 1 to the end of the previous month and you have the first day of a month.
Two main gains:
- Month lengths handled: leap years and months of 30 or 31 days need no table or IF.
- Any month in one step: the second argument moves forward or back, so this month, last month and next month use the same formula.
How Excel evaluates it
Excel works in three steps:
- it reads start_date as a serial number and notes its month and year; the day is ignored
- it cuts months down to a whole number and moves that many calendar months forward, or back when it is negative, rolling over year boundaries as needed
- it returns the serial number of the last day of the month it landed in
The result is a number like 46081, so the cell needs a date format to read as 28 Feb 2026.
Watch out: EOMONTH always lands on a month end. If you need the same day of the month a few months later, for a contract anniversary or a monthly due date on the 15th, EDATE is the right function.
Mental model
A wall calendar: you flip over the number of pages that months tells you, then put your finger on the last square of that page.
Terms used on this page: serial number, argument, cell
EOMONTH(start_date,months)
EOMONTH(start_date;months)
| Argument | Type | Meaning |
|---|---|---|
start_date | Required | The date to start from; only its month and year matter. |
months | Required | Months to move: 0 is this month, -1 last month, 1 next month. |
Return value:The serial number of the last day of the target month
Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).
Worked examples
Beginner
Find the period end for a journal entry
In the XAF auditfile of Veldhuis Installatie BV, every journal line is booked in the period that ends on the last day of its month. For entry 25-0412 you want a cell with that period end, so you can compare it with the closing date of the period in the trial balance, without looking up how many days December has.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Entry no. | Date | Amount | Period end | |
| 2 | 25-0411 | 28 Nov 2025 | €640.00€ 640,00 | ||
| 3 | 25-0412 | 12 Dec 2025 | €1,180.00€ 1.180,00 | 31 Dec 202531 Dec 2025=EOMONTH(B3, 0)=EOMONTH(B3; 0) | |
| 4 | 25-0413 | 31 Dec 2025 | €395.00€ 395,00 | ||
| 5 | 25-0414 | 5 Jan 2026 | €2,050.00€ 2.050,00 | ||
| 6 |
Swipe sideways to see all columns
Formula in D3
=EOMONTH(B3,0)
=EOMONTH(B3;0)
Result: 31 Dec 2025
Step by step
- Excel reads
B3and finds 12 Dec 2025, which it stores as serial number 46003. That is the start_date. - months is 0, so Excel stays in the same month: December 2025. The day, 12, plays no further part.
- December has 31 days, so the last day is the 31st. Excel returns the serial number of 31 Dec 2025: 46022.
D3has a date format, so 46022 is shown as 31 Dec 2025. Without a date format the cell would show 46022.- Copy the formula to
D4:B4is 31 Dec 2025, already a month end, so EOMONTH returns the same date. Change the 0 inD3to -1 and the result becomes 30 Nov 2025.
Watch out: If D3 shows 46022, the formula is right and only the format is missing. Do not retype the date by hand; set the cell to a date format.
More on this example: why it works
Why it works
EOMONTH looks only at the month and year of start_date, so every date in December 2025 leads to the same period end. The calendar knowledge (28 days in February 2026, 29 in 2028) is built in, which is why the formula keeps working on the next year's auditfile.
Intermediate
Due dates on 30 days after month end
You are testing the payables of Veldhuis Installatie BV against the aging list of creditors (ouderdomsanalyse crediteuren). The suppliers invoice on terms of 30 days after the end of the invoice month, and you want a recalculated due date next to every invoice, copied down the list.
Some invoices are in the list before the date has been keyed in, so a blank invoice date must give a blank due date, not a date in 1900.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Supplier | Invoice date | Amount | Due date | Days after month end | 3030 | ||
| 2 | C2001 | 20 Nov 2025 | €1,480.00€ 1.480,00 | 30 Dec 202530 Dec 2025=IF(B2="", "", EOMONTH(B2, 0) + $G$1)=IF(B2=""; ""; EOMONTH(B2; 0) + $G$1) | ||||
| 3 | C2002 | 9 Dec 2025 | €760.00€ 760,00 | |||||
| 4 | C2003 | €2,310.00€ 2.310,00 | ||||||
| 5 | C2004 | 29 Dec 2025 | €515.00€ 515,00 | |||||
| 6 |
Swipe sideways to see all columns
Formula in D2
=IF(B2="","", EOMONTH(B2, 0) + $G$1)
=IF(B2="";""; EOMONTH(B2; 0) + $G$1)
Result: 30 Dec 2025
Step by step
- IF tests whether
B2is empty.B2holds 20 Nov 2025, so the test is FALSE and Excel moves on to the third argument. - EOMONTH(B2, 0) returns the end of November 2025: 30 Nov 2025, serial number 45991.
- Excel adds the 30 days from
$G$1: 45991 + 30 = 46021, which is 30 Dec 2025. December has 31 days, so 30 days after Nov 30 is the 30th. - Copied to
D3, the formula readsB3(9 Dec 2025): the month end is 31 Dec 2025, plus 30 days is 30 Jan 2026. The $ signs keepG1fixed; without themD3would addG2, which is empty, and show Dec 31. - In
D4the test B4="" is TRUE, so IF returns empty text and the cell stays blank. Without the IF, EOMONTH would treat the blank as serial number 0 and the due date would land in 1900.
Watch out: Adding 30 to the invoice date instead of to the month end gives 20 Dec 2025 for C2001: a due date 10 days too early that looks perfectly plausible, and it makes an invoice look overdue in your aging analysis.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
EOMONTH with months 0 moves every invoice to the same anchor, the end of its month, and the term is added to that anchor, not to the invoice date. Keeping the term in G1 with an absolute reference means one change there updates every due date in the list.
More to watch out for
- A due date that falls on a weekend is not moved. If the terms say the next working day, wrap the result in WORKDAY(result - 1, 1).
Variations
=IF(B2="","", EOMONTH(B2, 1))
=IF(B2="";""; EOMONTH(B2; 1))
For terms of 'end of the following month', move one month and add nothing: 31 Dec 2025 for C2001.
Advanced
Recalculate first-month depreciation by days in use
In the fixed asset register (activastaat) of Veldhuis Installatie BV, the first month's depreciation is charged pro rata: an asset is depreciated only for the days from the date it is put into use to the end of that month.
You recalculate the charge for forklift A-102, in use since 18 Sep 2025, at 600 a month, and compare it with the amount the client booked. The formula has to work for months of 28, 30 and 31 days.
| Row | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Asset | Description | In use since | Monthly depreciation | First month | |
| 2 | A-101 | Delivery van | 1 Mar 2025 | €450.00€ 450,00 | ||
| 3 | A-102 | Forklift | 18 Sep 2025 | €600.00€ 600,00 | €260.00€ 260,00=D3 * (EOMONTH(C3, 0) - C3 + 1) / DAY(EOMONTH(C3, 0))=D3 * (EOMONTH(C3; 0) - C3 + 1) / DAY(EOMONTH(C3; 0)) | |
| 4 | A-103 | Laptops | 31 Oct 2025 | €300.00€ 300,00 | ||
| 5 | A-104 | Workshop machine | 10 Feb 2025 | €875.00€ 875,00 | ||
| 6 |
Swipe sideways to see all columns
Formula in E3
=D3 * (EOMONTH(C3,0) - C3 + 1) / DAY(EOMONTH(C3, 0))
=D3 * (EOMONTH(C3;0) - C3 + 1) / DAY(EOMONTH(C3; 0))
Result: €260.00€ 260,00
Step by step
- Excel evaluates the first EOMONTH:
C3is 18 Sep 2025 (serial 45918), and the end of September is 30 Sep 2025 (serial 45930). - It subtracts the in-use date and adds 1: 45930 - 45918 + 1 = 13. The +1 counts the first day itself, so Sep 18 to Sep 30 is 13 days.
- The second EOMONTH returns the same 30 Sep 2025, and DAY takes its day number: 30. That is the number of days in September.
- Excel works left to right: 600 × 13 = 7,8007.800, then 7,8007.800 / 30 = 260.
- Copied to the other rows:
A-101is in use from Mar 1, so 31 of 31 days gives the full 450;A-103is in use from Oct 31, so 1 of 31 days gives 300 / 31 = 9.68.
Watch out: Leave out the + 1 and the result is 600 × 12 / 30 = 240, silently 20 short, and an asset put into use on the 1st is depreciated for one day less than a full month.
More on this example: why it works, 1 more pitfall, 2 variations
Why it works
The month end does double duty: subtracting the start date from it gives the days in use, and DAY of it gives the days in the month. Because both come from the same EOMONTH, February, September and October are all handled without a lookup table of month lengths.
More to watch out for
- DAY(C3) is the day of the in-use date (18), not the length of the month. Using it as the divisor gives 433.33, which looks like a reasonable depreciation charge.
Variations
=D3 * (EOMONTH(C3,0) - C3 + 1) / (EOMONTH(C3, 0) - EOMONTH(C3, -1))
=D3 * (EOMONTH(C3;0) - C3 + 1) / (EOMONTH(C3; 0) - EOMONTH(C3; -1))
Days in the month as the gap between two month ends, 45930 - 45900 = 30. Same result; use it if you find it simpler to read than DAY.
=EOMONTH(C3,-1) + 1
=EOMONTH(C3;-1) + 1
The first day of the month of first use, 1 Sep 2025: the end of the previous month plus one day. Useful when the depreciation period must start on the 1st.
MasterExcel 2021 or later (This example needs Excel 2021 or later)
Fiscal quarter end for a client with a broken fiscal year
Your client's fiscal year starts on May 1, so its quarters end in July, October, January and April. For interim testing you want the fiscal quarter end next to every journal entry you selected, and the same formula must still work if the fiscal year start moves. The start month sits in F1.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Date | Amount | Quarter end | FY starts in month | 55 | |
| 2 | 25-0388 | 27 Jun 2025 | €18,500.00€ 18.500,00 | ||||
| 3 | 25-0402 | 29 Aug 2025 | €7,200.00€ 7.200,00 | ||||
| 4 | 25-0431 | 19 Nov 2025 | €42,000.00€ 42.000,00 | 31 Jan 202631 Jan 2026=LET( entryDate, B4, fyStart, $F$1, monthsToEnd, MOD(fyStart - 1 - MONTH(entryDate), 3), EOMONTH(entryDate, monthsToEnd) )=LET( entryDate; B4; fyStart; $F$1; monthsToEnd; MOD(fyStart - 1 - MONTH(entryDate); 3); EOMONTH(entryDate; monthsToEnd) ) | |||
| 5 | 25-0447 | 31 Dec 2025 | €12,750.00€ 12.750,00 | ||||
| 6 | 26-0003 | 6 Jan 2026 | €9,600.00€ 9.600,00 | ||||
| 7 |
Swipe sideways to see all columns
Formula in D4
=LET( entryDate,B4, fyStart, $F$1, monthsToEnd, MOD(fyStart - 1 - MONTH(entryDate), 3), EOMONTH(entryDate, monthsToEnd) )
=LET( entryDate;B4; fyStart; $F$1; monthsToEnd; MOD(fyStart - 1 - MONTH(entryDate); 3); EOMONTH(entryDate; monthsToEnd) )
Result: 31 Jan 2026
Step by step
- LET names the inputs: entryDate is
B4, 19 Nov 2025, and fyStart isF1, which holds 5 (May). - monthsToEnd starts with MONTH(entryDate) = 11. Then fyStart - 1 - 11 = 5 - 1 - 11 = -7.
- MOD(-7, 3) returns 2, not -1: Excel's MOD always takes the sign of the divisor, so the remainder is 0, 1 or 2. monthsToEnd is 2: two more months to the quarter end.
- EOMONTH(entryDate, 2) moves from November to January and returns 31 Jan 2026, serial 46053. With quarters May to Jul, Aug to Oct, Nov to Jan and Feb to Apr, November belongs to the quarter ending in January.
- Copied to
26-0003(Jan 6): 5 - 1 - 1 = 3, MOD gives 0, and the result is 31 Jan 2026, the same quarter. SetF1to 1 and25-0431gets MOD(-11, 3) = 1, so 31 Dec 2025: calendar quarters.
Watch out: The mirror-image mistake: EOMONTH(entryDate, 3) reads as 'the end of the quarter' but is the end of the month three months later, 28 Feb 2026 here. It is wrong for every entry: the correct offset is always 0, 1 or 2, never 3.
More on this example: why it works, 2 more pitfalls, 1 variation
Why it works
Quarter-end months are the months whose number is one less than fyStart, counted in steps of 3, so MOD finds how far the current month is from the next one, and EOMONTH turns that distance into a real date. LET keeps the rule readable and lets F1 drive every quarter.
Do not use this when your periods do not end on calendar month ends, such as a 4-4-5 retail calendar or 52-week years: keep a period table with start dates and look up the period with XLOOKUP and match_mode -1 instead. The table takes maintenance, but it handles any calendar.
Watch out for
The mirror-image mistake: EOMONTH(entryDate, 3) reads as 'the end of the quarter' but is the end of the month three months later, 28 Feb 2026 here. It is wrong for every entry: the correct offset is always 0, 1 or 2, never 3.
An entry dated in a quarter-end month, such as
26-0003in January, gets the end of the next quarter (30 Apr 2026), which looks plausible; any other entry gets a month end in the middle of a quarter.- Passing a whole range as start_date, such as EOMONTH(B2:B6, 0), returns #VALUE! in many Excel versions instead of spilling. Turn the range into an array first with B2:B6 + 0.
Variations
=EOMONTH(D4,-3) + 1
=EOMONTH(D4;-3) + 1
The first day of the same fiscal quarter: three month ends back from Jan 31 is Oct 31, plus 1 is 1 Nov 2025.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| A five-digit number instead of a date | The formula returns a five-digit number such as 46081 instead of a date. | Nothing is wrong with the serial number: apply a date format to the cell (Home, Number Format, Short Date). |
| The 30th or 31st instead of the same day | Using EOMONTH(d, 1) for 'the same day next month' and getting the 30th or 31st. | Use EDATE(d, 1), which keeps the day number. |
| The last day of the previous month | Writing EOMONTH(d, -1) when you want the first day of the month, and getting the last day of the previous month. | Add 1: EOMONTH(d, -1) + 1 is the first day of the month that d is in. |
| #VALUE! on a date typed as text | The start date was typed as text, for example with a leading apostrophe, and the result is #VALUE!. | Store dates as real dates, or build them with DATE(2026, 2, 12) so the regional setting cannot misread them. |
Used in combinations
- Revenue per month for twelve months in one formulaTotal revenue for each of twelve months with one SUMIFS: SEQUENCE counts the months, EDATE turns each count into the first day of a month, and those dates become the criteria.Excel 2021 or later (This combination needs Excel 2021 or later)