NETWORKDAYS counts the whole working days in the interval from start_date to end_date,
excluding weekends and any dates supplied in holidays. The weekend is fixed at Saturday and
Sunday and cannot be changed — that limitation is the entire reason
NETWORKDAYS.INTL exists.
The computation is a filtered count: enumerate the days of the interval, drop those falling on
Saturday or Sunday, drop those appearing in holidays, and return how many remain.
Two properties of that count matter and are not settled by the documentation page:
Inclusivity. The catalogue description is "the number of whole workdays between two dates",
and the function's ordinary use — counting the working days of a month by passing the first and
last of it — depends on both endpoints being counted. The Microsoft page linked below does not
state the rule either way. It is recorded here as the expected behaviour, unverified.
Reversed intervals. Whether an end_date before start_date gives a negative count, a
positive one, or an error is likewise not stated on that page. The .INTL sibling's page is no
more explicit. Unverified here.
Both are one-line experiments, and both are listed below.
Arguments
NETWORKDAYS(start_date, end_date, [holidays]) — two required arguments and one optional.
start_date — "a date that represents the start date".
end_date — "a date that represents the end date".
holidays — optional: "an optional range of one or more dates to exclude from the working
calendar, such as state and federal holidays and floating holidays. The list can be either a range
of cells that contains the dates or an array constant of the serial numbers that represent the
dates."
Three things about holidays that the sentence above implies and readers routinely miss:
It is a range or array argument in a function whose other arguments are scalars. That makes
NETWORKDAYS an aggregate-shaped call in its third position; see
the call pipeline for how such positions are prepared.
Duplicate holidays should not double-count, since the operation is set exclusion rather than
subtraction — but the documentation does not say so.
Holidays falling on a weekend are already excluded and should contribute nothing, for the
same reason. Also not documented.
Microsoft's page carries the category's standard warning that "problems can occur if dates are
entered as text" and recommends DATE or formula results instead.
Try it
Quirks
Result and edge cases
Returns a Number: a count of working days.
A same-day interval (start_date equal to end_date) is 1 if that day is a working day and
0 otherwise — under the inclusive reading above.
An interval containing no working days returns 0.
Holidays outside the interval are irrelevant and should be ignored.
Empty cells inside a holidays range raise the ordinary Empty-versus-Missing question
described in the value universe; whether they are skipped or
treated as serial 0 (which is inside the representable range and would be a "holiday") is not
documented and not checked here. It is a real hazard, because holiday ranges are usually sized
generously and left partly blank.
Fractional serials — whether time components are truncated before counting is undocumented.
Errors
As documented on the Microsoft page:
#VALUE! "if any argument is not a valid date".
Note the contrast with the generalized sibling: NETWORKDAYS.INTL's page
documents #NUM! when a date is out of range for the date-base value and #VALUE! only for an
invalid weekend string. Two functions computing the same thing, documented with different error
values for an out-of-range date. This Handbook does not harmonize the two; the divergence is
recorded, and resolving it against a running Excel is one of the experiments listed below. See
claim language, rule 5.
An empty cell as a first date is serial 0, but a logical in that cell is #VALUE!
A reference to an empty cell as the first date of these functions reads as serial 0 and gives a normal answer: NETWORKDAYS(B1,5) is 4 and WORKDAY(B1,2) is 3. YEARFRAC(B1,5,0) is 5/360. TRUE in the same cell gives #VALUE!, as a direct TRUE does, so a blank is not treated as the logical FALSE either.
Formula
Excel
Mathematical value
=NETWORKDAYS(B1,5) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: (empty cell)
4 0x4010000000000000
—
=NETWORKDAYS(B1,5) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: TRUE
#VALUE!
—
=WORKDAY(B1,2) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: (empty cell)
3 0x4008000000000000
—
=WORKDAY(B1,2) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: TRUE
#VALUE!
—
=NETWORKDAYS.INTL(B1,5,1) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: (empty cell)
4 0x4010000000000000
—
=WORKDAY.INTL(B1,2,1) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: (empty cell)
3 0x4008000000000000
—
=YEARFRAC(B1,5,0) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Number supplied through a cell.
B1: (empty cell)
0.013888888888888888 0x3f8c71c71c71c71c
—
=TBILLEQ(B1,5,0.1) Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZAInputs and reference value
Do not enumerate day by day for large intervals. The closed form is
7·⌊d/7⌋-style arithmetic on whole weeks plus a small table for the partial week at each end;
an implementation that loops will be correct and unusably slow for century-scale intervals,
which are reachable given the serial range.
Normalize holidays to a set first, filtering out weekend dates and out-of-interval dates,
so that duplicates and stray blanks cannot affect the count.
Decide the reversed-interval policy explicitly, and note that whatever NETWORKDAYS does,
.INTL must do the same or the equivalence above fails.
Share the weekday kernel with WEEKDAY so that the documented pre-March-1900
phase behaviour is inherited rather than reinvented.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
No implementation has been published with a Handbook test suite for this function.
Version differences
The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.
Excel 16.0 build
Platform and CPU
Captured inputs
20430
Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics
2,400
The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.
Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA
=NETWORKDAYS(B1,5) returned 4 (0x4010000000000000). =NETWORKDAYS(B1,5) returned #VALUE!. Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.
Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics
2,400 captured inputs are indexed for this environment. Capture dates: 2026-09-24 to 2026-09-25. This is a reading count, not a comparison with another build.
Alternatives
Relationships
NETWORKDAYS.INTL — the generalization. NETWORKDAYS(a, b, h)
should equal NETWORKDAYS.INTL(a, b, 1, h), since weekend code 1 is documented as
Saturday/Sunday. That equivalence is the cleanest cross-function test in this family and is
not verified here. NETWORKDAYS is not a Compatibility-category function and Microsoft has
not superseded it; both remain current, with the .INTL form recommended when the weekend is not
Saturday/Sunday.
WORKDAY — the inverse operation: given a start and a count of working
days, find the date. NETWORKDAYS and WORKDAY should compose, and their inclusivity
conventions differ (see that page), which is the classic off-by-one in scheduling formulas.