FxFormula Drills

NETWORKDAYS with holidays

NETWORKDAYS(start, end, holidays) counts Monday-to-Friday dates from the start date through the end date, including both ends when they are workdays, then removes any holiday in the list that falls on a workday. A Saturday or Sunday holiday does not reduce the count a second time. With no holiday list, 2 January 2024 through 12 January 2024 is 9 workdays. Removing Monday 8 January leaves 8.

Syntax

NETWORKDAYS

NETWORKDAYS(start_date, end_date, [holidays])

Weekends are Saturday and Sunday. holidays can be one cell or a range. Dates in the holiday range that sit outside the start and end, or that fall on a weekend, do not change the count.

NETWORKDAYS.INTL

NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])

The same count with a weekend code or a seven-character weekend string. Weekend code 1 is Saturday and Sunday, the same weekend NETWORKDAYS uses. Excel 2010 and later, and Google Sheets.

Comparison

QuestionNETWORKDAYSNETWORKDAYS without holidaysNETWORKDAYS.INTL
Which days countMonday through FridayMonday through FridayWhatever the weekend argument says
Start and endIncluded when they are workdaysIncluded when they are workdaysIncluded when they are workdays
Holiday listOptional third argumentOmittedOptional fourth argument
Holiday on SaturdayNo extra reductionNot in the count anywayNo extra reduction if Saturday is already a weekend
VersionsExcel and Google SheetsExcel and Google SheetsExcel 2010 and later, Google Sheets

Worked examples

A Monday holiday inside the window

2 January 2024 is a Tuesday and 12 January 2024 is a Friday. The span has 9 weekdays. 8 January 2024 is a Monday and is listed as a holiday.

Start, end, and one holiday.
RowABCD
1StartEndHoliday
22024-01-022024-01-122024-01-08
32024-01-062024-01-07
42024-03-012024-03-152024-03-082024-03-11
  • =NETWORKDAYS(A2,B2) → 9
  • =NETWORKDAYS(A2,B2,C2) → 8
  • =NETWORKDAYS(A3,B3) → 0

Without the holiday the count is 9, and both the Tuesday start and the Friday end are included. Passing C2 removes that Monday, leaving 8. The third row is Saturday 6 January through Sunday 7 January. Neither day is a workday, so the count is 0. Subtracting the serial numbers would not have told you any of this, because it would count weekend days and it would not include the end in the same way.

Two holidays, both on weekdays

1 March 2024 is a Friday and 15 March 2024 is a Friday. With no holidays that is 11 workdays. 8 March is a Friday and 11 March is a Monday. Both are in the holiday cells.

Two holiday cells, C4 and D4.
RowABCD
1StartEndHoliday
22024-01-022024-01-122024-01-08
32024-01-062024-01-07
42024-03-012024-03-152024-03-082024-03-11
  • =NETWORKDAYS(A4,B4) → 11
  • =NETWORKDAYS(A4,B4,C4:D4) → 9

Each weekday holiday inside the window reduces the count by one. 11 minus Friday 8 March minus Monday 11 March is 9. A holiday range can be a column of company dates. Dates in that range which fall on Saturday or Sunday, or which fall outside the start and end, do not subtract an extra day.

When to use which

Use NETWORKDAYS for a deadline in ordinary business days

Time from a request to a due date, when Saturday and Sunday are off and a short list of holidays should be skipped. The deadline drill uses one holiday per row.

Pass a range when the company has a holiday calendar

C4:D4 in the second example is the small version of a calendar column. Point every NETWORKDAYS formula at that column. Do not type the holiday dates into the formula.

Use NETWORKDAYS.INTL when the weekend is not Saturday and Sunday

A shop closed on Sunday only, or on Friday and Saturday, needs the weekend argument. Code 1 reproduces NETWORKDAYS. Other codes are listed in Excel's help for NETWORKDAYS.INTL. Do not use INTL if the default weekend is already correct.

Common mistakes

Forgetting that both ends count

People subtract the dates and then wonder why they are one day short, or why a Friday-to-Friday span is not 14. NETWORKDAYS is inclusive. 2 January through 12 January is 9 weekdays before holidays, not 8.

Listing a weekend date and expecting the count to drop

A holiday on Saturday is already outside the workweek. Adding it to the holiday range does not subtract 1. Only a holiday that would otherwise have been counted changes the result.

Text that looks like a date

NETWORKDAYS needs real dates. A label typed as January 2 may be text, and the function then returns #VALUE!. The examples use dates the engine stores as dates and displays as 2024-01-02.

Holidays typed inside the formula

A hardcoded DATE inside every row is painful to update next year. Keep the calendar in cells and pass the range.

Versions and compatibility

NETWORKDAYS is in Excel and in Google Sheets, with the same inclusive weekday count and the same optional holiday argument. The weekend is Saturday and Sunday in both.

NETWORKDAYS.INTL is in Excel 2010 and later and in Google Sheets. Use it only when the weekend string or code is different from the default.

Excel for the web and Microsoft 365 calculate these the same way as desktop Excel. The function does not require a dynamic-array build of Excel.

Practice on Formula Drills

Free drills are open with no account. Premium drills show the problem to everyone and grade the sheet for subscribers.

Free exercises

Premium exercises

Function pages

FAQ

Does NETWORKDAYS include the start date?

Yes, when the start date is a workday and is not in the holiday list. The end date is included on the same rule. A Saturday start does not add a day.

What if the end date is before the start date?

NETWORKDAYS returns a negative count of the workdays between them. Swap the dates if you wanted a positive duration.

How do I exclude a whole holiday calendar?

Put the dates in a column and pass that range as the third argument. One range serves every formula on the sheet.

Can I count weekend days instead?

NETWORKDAYS will not do that. The total days minus NETWORKDAYS is not quite the weekend count either, because holidays remove weekdays. For a custom weekend, start from NETWORKDAYS.INTL and a weekend code that matches the shop.