Working days and due dates: Excel interview question
Invoices due at the end of next month, and the working days a client has to pay: the date task interviewers set, solved with EOMONTH and NETWORKDAYS, plus a sheet that grades yours.
EOMONTH returns the last day of a month, a number of months before or after a date: =EOMONTH(A2,0) is the end of A2's month, and =EOMONTH(A2,1) the end of the next one.
Available in Excel 2007 and later, Excel for the web and Google Sheets=EOMONTH(start_date, months)| Argument | Required | What it means |
|---|---|---|
start_date | Yes | Any date in the month to start from. |
months | Yes | 0 for the same month, 1 for the next, -1 for the one before. A decimal part is dropped. |
Months set to 0 stays in the same month. April has 30 days.
| Row | A | B |
|---|---|---|
| 1 | Invoice date | Month end |
| 2 | 17 Apr 2026 | 30 Apr 2026 |
=EOMONTH(A2,0) → 30 Apr 2026Months set to 1 jumps to the end of the next month, here across the new year.
| Row | A | B |
|---|---|---|
| 1 | Issued | Due |
| 2 | 20 Dec 2026 | 31 Jan 2027 |
=EOMONTH(A2,1) → 31 Jan 2027The end of last month, plus one day.
| Row | A | B |
|---|---|---|
| 1 | Date | Month starts |
| 2 | 23 Jun 2026 | 1 Jun 2026 |
=EOMONTH(A2,-1)+1 → 1 Jun 2026DAY of a month's last day is the number of days in it. 2028 is a leap year, so February has 29.
| Row | A | B |
|---|---|---|
| 1 | Month | Days |
| 2 | 10 Feb 2028 | 29 |
=DAY(EOMONTH(A2,0)) → 29New data, so you can't copy the answer above. We check the number your formula returns, then change the data to make sure it still holds.
Your task: Benefits start on the first day of the month after someone is hired. In B2, return that date for the hire date in A2.
Graded live| Row | A | B |
|---|---|---|
| 1 | Hired | Benefits start |
| 2 | 18 Mar 2026 |
Write the formula in the bar above, then press Check or Enter.
EOMONTH(A2,0) is the last day of A2's month. The day after it is the first of the next month.
=EOMONTH(A2,0)+1 Any formula that returns the same result passes.
=EOMONTH(A2,-1), or =EOMONTH(TODAY(),-1) for the month before today's.
=DAY(EOMONTH(A2,0)): the day number of the month's last day is how many days it has.
EOMONTH when you want month ends: due dates, reporting periods. EDATE when you want the same day of the month, such as a contract that ends on the 15th.
Worked problems with practice sheets.
Invoices due at the end of next month, and the working days a client has to pay: the date task interviewers set, solved with EOMONTH and NETWORKDAYS, plus a sheet that grades yours.
Practise EOMONTH and the functions around it in a live grid that grades your result and explains your mistakes.
Runs in your browser · Graded on your result · No install