Excel practice › Excel functions › EOMONTH
EOMONTH in Excel: the last day of a month
EOMONTH returns the last day of a month: the month of the date you give it, or a month some number of months before or after. With a move-in date of 1/15/2026 in C2, =EOMONTH(C2,0) gives 1/31/2026.
The second argument counts months: 0 is the same month, 1 the next one, -1 the one before. Add 1 to the result and you have the first day of the following month.
Syntax
=EOMONTH(start_date, months)
start_date- The date to start from: a cell that holds a date, or a date built with DATE. Only its month and year matter, not the day.
months- How many months to move before taking the month's last day:
0stays in the same month, a positive number goes forward, a negative number goes back. Required. A number with decimals is cut down to its whole part.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Unit | Tenant | Move-in | Rent | Month end |
| 2 | 2B | Okafor | 1/15/2026 | 1850 | 1/31/2026 |
| 3 | 4A | Lindqvist | 2/10/2026 | 2100 | |
| 4 | 1C | Ramirez | 3/23/2026 | 1675 | |
| 5 | 3D | Chen | 4/30/2026 | 1950 | |
| 6 | 5A | Novak | 6/8/2026 | 2300 |
0 to 1 for the end of February (2/28/2026), or to -1 for the end of December (12/31/2025).The months argument
For the date 1/15/2026:
=EOMONTH(C2,0)is 1/31/2026: the end of the same month.=EOMONTH(C2,1)is 2/28/2026: the end of the next month.=EOMONTH(C2,-1)is 12/31/2025: the end of the month before, across the year.=EOMONTH(C2,12)is 1/31/2027: the same month a year later.
EOMONTH knows how long each month is, leap years included: starting from a date in January 2028, one month forward gives 2/29/2028.
The first day of a month
A date is a number of days, so adding 1 to a date gives the next day. The day after the end of a month is the first day of the next one:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Unit | Tenant | Move-in | Rent | Next month |
| 2 | 2B | Okafor | 1/15/2026 | 1850 | 2/1/2026 |
| 3 | 4A | Lindqvist | 2/10/2026 | 2100 | |
| 4 | 1C | Ramirez | 3/23/2026 | 1675 | |
| 5 | 3D | Chen | 4/30/2026 | 1950 | |
| 6 | 5A | Novak | 6/8/2026 | 2300 |
=EOMONTH(C2,-1)+1 gives 1/1/2026.Where it goes wrong: a number instead of a date
EOMONTH returns a date the way Excel stores it: a serial number, the count of days with January 1, 1900 as day 1. In a cell that isn't formatted as a date, that number is what you see:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Unit | Tenant | Move-in | Rent | Month end |
| 2 | 2B | Okafor | 1/15/2026 | 1850 | 46053 |
| 3 | 4A | Lindqvist | 2/10/2026 | 2100 | |
| 4 | 1C | Ramirez | 3/23/2026 | 1675 | |
| 5 | 3D | Chen | 4/30/2026 | 1950 | |
| 6 | 5A | Novak | 6/8/2026 | 2300 |
=TEXT(EOMONTH(C2,0),"m/d/yyyy").The other slip is the months argument. EOMONTH(C2,1) is the end of next month, not of this one. For the month the date is in, the argument is 0.
Practice: 3 exercises
Type the formula in the box, press Enter. Clicking a cell inserts its address. Each answer is checked on the data you see and again on changed data, so a typed-in value won't pass.
In E2, return the last day of the month in which the tenant in row 2 moved in (the date in C2).
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Unit | Tenant | Move-in | Rent | Month end |
| 2 | 2B | Okafor | 1/15/2026 | 1850 | |
| 3 | 4A | Lindqvist | 2/10/2026 | 2100 | |
| 4 | 1C | Ramirez | 3/23/2026 | 1675 | |
| 5 | 3D | Chen | 4/30/2026 | 1950 | |
| 6 | 5A | Novak | 6/8/2026 | 2300 |
Show the answer
=EOMONTH(C2,0) gives 1/31/2026.
0 months from the date in C2 is January itself, and EOMONTH returns its last day.
Rent for the first full month is due on the first day of the month after move-in. In E2, return that date for the tenant in row 2.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Unit | Tenant | Move-in | Rent | Rent due |
| 2 | 2B | Okafor | 1/15/2026 | 1850 | |
| 3 | 4A | Lindqvist | 2/10/2026 | 2100 | |
| 4 | 1C | Ramirez | 3/23/2026 | 1675 | |
| 5 | 3D | Chen | 4/30/2026 | 1950 | |
| 6 | 5A | Novak | 6/8/2026 | 2300 |
Show the answer
=EOMONTH(C2,0)+1 gives 2/1/2026.
Adding 1 to the last day of January gives the first day of February. The formula never needs to know how long the month is.
The first month is prorated: the tenant pays for every day from move-in through the end of that month, move-in day included. In E2, return that number of days for row 2.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Unit | Tenant | Move-in | Rent | Days billed |
| 2 | 2B | Okafor | 1/15/2026 | 1850 | |
| 3 | 4A | Lindqvist | 2/10/2026 | 2100 | |
| 4 | 1C | Ramirez | 3/23/2026 | 1675 | |
| 5 | 3D | Chen | 4/30/2026 | 1950 | |
| 6 | 5A | Novak | 6/8/2026 | 2300 |
Show the answer
=EOMONTH(C2,0)-C2+1 gives 17.
January 31 minus January 15 is 16 days, and the move-in day itself makes 17. The same formula gives 19 for a February 10 move-in, because EOMONTH knows that February 2026 has 28 days.
Questions people ask
Why does EOMONTH return a number like 46053 instead of a date?
The number is the date. Excel stores every date as a serial number of days, and EOMONTH returns that number. Format the cell as a date (Ctrl+1, then Date) and 46053 shows as 1/31/2026.
How do I get the first day of the month in Excel?
Take the end of the previous month and add one day: =EOMONTH(A2,-1)+1. For the first day of the next month, =EOMONTH(A2,0)+1. =DATE(YEAR(A2),MONTH(A2),1) also returns the first day of the date's own month.
How do I get the number of days in a month?
Ask for the day number of the month's last day: =DAY(EOMONTH(A2,0)). For any date in February 2026 it returns 28.
What is the difference between EOMONTH and EDATE?
Both move a date by a number of months. EDATE keeps the day of the month: from 1/15/2026, =EDATE(A2,1) is 2/15/2026. EOMONTH always lands on the last day of the month: =EOMONTH(A2,1) is 2/28/2026.