NETWORKDAYS
Returns the number of weekday business days between two dates, inclusive.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=NETWORKDAYS(start_date, end_date, [holidays])
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
start_date | number | Required | — |
end_date | number | Required | — |
holidays | any | Optional | — |
Remarks
- A date argument may be text holding a date or time (
"10/26/1999","1999-10-26 14:05"), read as its serial; text that is neither a number nor a date returns#VALUE!. - Weekends are fixed to Saturday and Sunday.
- If
start_date > end_date, the result is negative. - Optional
holidaysarguments are excluded from the count and may be provided as scalars, inline arrays, or ranges of date values, serials, or date text. - Serials are interpreted with the workbook's date system (Excel 1900 or Excel 1904); the weekend days depend on the calendar dates the serials denote, which differ per system.
Examples
Count working days across a full Monday-to-Sunday week.
Formula =NETWORKDAYS(DATE(2024,1,1),DATE(2024,1,7))
Expected result 5
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Remove the Wednesday holiday from the weekday count.
Formula =NETWORKDAYS(DATE(2024,1,1),DATE(2024,1,7),A1)
| A | |
|---|---|
| 1 | 45294 |
Expected result 4
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A single Saturday contributes no working days.
Formula =NETWORKDAYS(DATE(2024,1,6),DATE(2024,1,6))
Expected result 0
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The start of the interval must be a date.
Formula =NETWORKDAYS("invalid",DATE(2024,1,7))
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Count weekdays in a range
Formula =NETWORKDAYS(45292, 45299)
Expected result 6
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Holiday exclusions reduce the count
Formula =NETWORKDAYS(45292, 45299, 45293)
Expected result 5
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Can I exclude custom holidays in NETWORKDAYS?
Yes. Additional arguments can provide holiday serials or date text, as scalars, arrays, or ranges, to exclude from the weekday count.