Date and time functions

NETWORKDAYS

Matches all 3,616 recorded answers

Recorded: 3,600 in the answer bank and 16 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicNETWORKDAYS
BulgarianNETWORKDAYS
CzechNETWORKDAYS
DanishANTAL.ARBEJDSDAGE
GermanNETWORKDAYS
GreekNETWORKDAYS
English (Australia)NETWORKDAYS
English (United Kingdom)NETWORKDAYS
English (United States)NETWORKDAYS
SpanishDIAS.LAB
EstonianNETWORKDAYS
FinnishTYÖPÄIVÄT
FrenchNB.JOURS.OUVRES
HebrewNETWORKDAYS
CroatianNETWORKDAYS
HungarianÖSSZ.MUNKANAP
IndonesianNETWORKDAYS
ItalianNETWORKDAYS
JapaneseNETWORKDAYS
KoreanNETWORKDAYS
LithuanianNETWORKDAYS
LatvianNETWORKDAYS
NorwegianNETWORKDAYS
DutchNETTO.WERKDAGEN
PolishDNI.ROBOCZE
Portuguese (Brazil)NETWORKDAYS
Portuguese (Portugal)DIATRABALHOTOTAL
RomanianNETWORKDAYS
RussianЧИСТРАБДНИ
SlovakNETWORKDAYS
SlovenianNETWORKDAYS
Serbian (Latin)NETWORKDAYS
SwedishNETTOARBETSDAGAR
ThaiNETWORKDAYS
TurkishTAMİŞGÜNÜ işlevi
UkrainianNETWORKDAYS
VietnameseNETWORKDAYS
Chinese (Simplified)NETWORKDAYS
Chinese (Hong Kong)NETWORKDAYS
Chinese (Traditional)NETWORKDAYS

Names from Microsoft's support site.

What it does

NETWORKDAYS(start_date, end_date, [holidays])

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:

  1. 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.
  2. 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

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

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.

FormulaExcelMathematical 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-ZA
Inputs 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-ZA
Inputs 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-ZA
Inputs 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-ZA
Inputs 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-ZA
Inputs 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-ZA
Inputs 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-ZA
Inputs 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-ZA
Inputs and reference value

Number supplied through a cell.

B1: (empty cell)

0.10152990264255911
0x3fb9fddd1b6a757f
—

Inputs, build details and evidence

How to implement

Notes for implementers

  1. 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.
  2. 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.
  3. Decide the reversed-interval policy explicitly, and note that whatever NETWORKDAYS does, .INTL must do the same or the equivalence above fails.
  4. 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.

NETWORKDAYS · 3 lines · calc-func/src/catalogue/dates.rs on GitHub
21 networkdays_fn "NETWORKDAYS" (2, 3) [V "start_date", V "end_date", R "holidays"] |s, a, sv| {
    networkdays(s, a, sv, false)
}

Kernels shared with other functions

Argument and result plumbing

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 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, AMD Ryzen 7 4800H with Radeon Graphics2,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.

Recorded environments and comparison details.

Excel 16.0.20527.20088

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.

Observed formulas and results
  • =NETWORKDAYS(B1,5) → 4
    0x4010000000000000 (cell-value2)
  • =NETWORKDAYS(B1,5) → #VALUE! (cell-value2)

Excel 16.0 build 20430

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.
  • DAYS — the unfiltered calendar count.
  • WEEKDAY — the underlying notion of "which day is Saturday", and the function Microsoft documents as returning incorrect values before 1 March 1900.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents