Lesson 88 of 92 · Free Excel Course
Excel · Excel function reference
Excel NETWORKDAYS Function: Syntax, Examples and Common Errors
How the Excel NETWORKDAYS function counts working days between two dates, with holidays, custom weekends (NETWORKDAYS.INTL), pro-rated pay and fixes.
The NETWORKDAYS function counts the whole working days between two dates. It skips Saturdays and Sundays, skips any holidays you list, and counts both the start date and the end date when they are weekdays. The answer is a plain number, such as 22. NETWORKDAYS is in Excel for Microsoft 365 (Windows and Mac), Excel for the web, and Excel 2024, 2021, 2019 and 2016. Its sister function, NETWORKDAYS.INTL, does the same count with a weekend you choose.
Syntax
=NETWORKDAYS(start_date, end_date, [holidays])
=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
- start_date (required): the first date of the period. Use a cell with a real date or a function such as
DATE(2026,12,1)orTODAY(). Typed text like "Dec 1" can fail. - end_date (required): the last date of the period. It can be earlier than the start date; the result is then negative.
- holidays (optional): dates to leave out, as a range of cells (
$G$2:$G$7) or an array constant of date serial numbers. Omit it and only weekends are skipped. The order of the dates doesn't matter. - weekend (optional, NETWORKDAYS.INTL only): which days are off. Leave it out (or use 1) for Saturday and Sunday. Other numbers: 2 Sunday-Monday, 3 Monday-Tuesday, 4 Tuesday-Wednesday, 5 Wednesday-Thursday, 6 Thursday-Friday, 7 Friday-Saturday, and 11 to 17 for a single day off (11 Sunday only, 12 Monday only, up to 17 Saturday only). You can also give a 7-character text string, Monday first, where 1 is a day off and 0 is a working day:
"0000011"means Saturday and Sunday off.
Any time part of a date is ignored, so 12/1/2026 6:00 PM counts as 12/1/2026.
Examples
Microsoft's example. A project runs from 10/1/2012 to 3/1/2013, with three holidays in A4:A6. These are the same dates and results as Microsoft's own page.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Date | Description | Formula | Result | |
| 2 | 10/1/2012 | Start date of project | =NETWORKDAYS(A2,A3) | 110 | |
| 3 | 3/1/2013 | End date of project | =NETWORKDAYS(A2,A3,A4) | 109 | |
| 4 | 11/22/2012 | Holiday | =NETWORKDAYS(A2,A3,A4:A6) | 107 | |
| 5 | 12/4/2012 | Holiday | |||
| 6 | 1/21/2013 | Holiday |
Working days left in a month. Pair NETWORKDAYS with EOMONTH, which returns the last day of a month. On Monday 11/23/2026, with Thanksgiving (11/26/2026) in the holiday list, five working days are left, counting the 23rd itself.
| A | B | |
|---|---|---|
| 1 | Item | Value |
| 2 | Today | 11/23/2026 |
| 3 | Last day of month | 11/30/2026 |
| 4 | Holiday | 11/26/2026 |
| 5 | Working days left | 5 |
Pro-rating a salary. A new hire starts on Wednesday 12/9/2026 on $4,500 a month. December 2026 has 23 weekdays, 22 after Christmas Day. The new hire works 16 of them, so the first paycheck is 16 ÷ 22 × $4,500. EOMONTH(B2,-1)+1 is the first day of the start month.
| A | B | |
|---|---|---|
| 1 | Item | Value |
| 2 | Start date | 12/9/2026 |
| 3 | Monthly salary | $4,500.00 |
| 4 | Holiday | 12/25/2026 |
| 5 | Working days in December | 22 |
| 6 | Days worked | 16 |
| 7 | Pro-rated pay | $3,272.73 |
The same idea works for leave: someone off from 12/21/2026 to 1/4/2027 uses =NETWORKDAYS(B2,C2,holidays) = 9 days of leave once Christmas Day and New Year's Day are skipped (11 without them). Check your company's own pay and leave rules; this is only the arithmetic.
Custom weekends with NETWORKDAYS.INTL. All of December 2026 (12/1 to 12/31), with three different work weeks:
| A | B | C | |
|---|---|---|---|
| 1 | Work week | Formula | Working days |
| 2 | Monday to Friday | =NETWORKDAYS.INTL($E$1,$F$1) | 23 |
| 3 | Six days, Sunday off | =NETWORKDAYS.INTL($E$1,$F$1,11) | 27 |
| 4 | Mon, Wed, Fri only | =NETWORKDAYS.INTL($E$1,$F$1,"0101011") | 13 |
Common errors
- #VALUE! — a date argument isn't a valid date, usually text that only looks like a date (for example imported "2026.12.01"). Fix it with
DATE(2026,12,1)or convert the column with Text to Columns. In NETWORKDAYS.INTL, a weekend string that isn't exactly 7 characters of 1s and 0s also gives #VALUE!. - #NUM! — in NETWORKDAYS.INTL, a start or end date outside Excel's date range (for example a negative number).
- An error from the weekend number — only 1–7 and 11–17 are valid codes; 8, 9, 10 or 18 aren't, and Excel returns an error instead of a count. Pick a code from the list above or use a 7-character string.
- A negative number — the start date is after the end date. Microsoft's own example
=NETWORKDAYS.INTL(DATE(2006,2,28),DATE(2006,1,31))returns -21. Swap the dates. - One day more than expected — NETWORKDAYS counts both ends. Monday to Friday of one week is 5, not 4. If you want "days between", start the next day.
- Holidays not subtracted — the holiday range moved when you copied the formula down, or it points at the wrong cells. Lock it with
$G$2:$G$7, and make sure the holiday cells hold real dates, not text that only looks like a date. - A date instead of a number — Excel sometimes copies the date format into the result cell, so 22 shows as 1/22/1900. Set the cell to General or Number.
- An all-1s weekend string (
"1111111") always returns 0, because no day is a working day (Microsoft notes this too).
Related functions
- WORKDAY function works the other way: a start date plus a number of working days gives the end date.
- Dates and times in Excel covers how dates are stored, DATEDIF, EDATE and WEEKDAY.
- Gantt chart and project tracking uses NETWORKDAYS for task durations and % done.
- TODAY function supplies today's date for live "days left" counts.
- Our free date calculator is a quick way to double-check a count.
Try it yourself
Download the practice workbook. The Practice sheet has six yellow cells: Microsoft's holiday example, working days left in November, a Monday/Wednesday/Friday schedule, a pro-rated paycheck, leave days, and dates entered backwards. The Answers sheet shows each working formula.
Frequently asked questions
Does NETWORKDAYS include the start and end date?
Yes. Both dates are counted when they fall on a working day. =NETWORKDAYS(A2,A2) returns 1 if A2 is a weekday and 0 if it's a Saturday or Sunday. If you want to leave out the start day, subtract 1 or start from the next day.
How do I exclude holidays from NETWORKDAYS?
Type the holiday dates in a range, one per cell, and give that range as the third argument: =NETWORKDAYS(B2,C2,$G$2:$G$12). Use absolute references ($) so the range doesn't move when you copy the formula down. A holiday that lands on a weekend isn't subtracted twice.
How do I count working days with a different weekend, such as Friday and Saturday?
Use NETWORKDAYS.INTL, which adds a weekend argument: =NETWORKDAYS.INTL(B2,C2,7) treats Friday and Saturday as the weekend. You can also give a 7-character string of 1s and 0s starting on Monday, where 1 is a day off: "0000011" is the normal Saturday-Sunday weekend.
Why does NETWORKDAYS return a negative number?
The start date is later than the end date. Excel still counts the working days, but shows the result as negative (Microsoft's example returns -21). Swap the two dates, or wrap the formula in ABS if the order doesn't matter to you.
How do I count the working days left in this month?
Combine it with TODAY and EOMONTH: =NETWORKDAYS(TODAY(),EOMONTH(TODAY(),0)). EOMONTH(...,0) returns the last day of the current month. The count includes today if today is a weekday; use TODAY()+1 as the start to count only the days after today.