Skip to main content

Date formula page

Workdays Between Dates Formula

Use NETWORKDAYS when weekends and optional holidays should be excluded from the day count.

Best for

Count workdays between dates in Excel or Google Sheets.

What it returns

The formula counts weekdays from A2 through B2, excluding holidays listed in H2:H10.

Copy formulas

Excel formula
=NETWORKDAYS(A2, B2, H2:H10)
Google Sheets formula
=NETWORKDAYS(A2, B2, H2:H10)
Excel / Google Sheets difference

Excel and Google Sheets use NETWORKDAYS to count inclusive weekdays between two dates. The optional holiday range removes listed dates from that count.

Example data

Start DateEnd DateHolidayResult
2026-01-012026-01-312026-01-1930
2026-02-102026-03-1230
1990-05-202026-05-2036
What it returns

The formula counts weekdays from A2 through B2, excluding holidays listed in H2:H10.

How the formula works

  • A2 is the start date.
  • B2 is the end date.
  • H2:H10 is an optional holiday list.
Syntax pieceRole in the formula
A2The inclusive start date.
B2The inclusive end date.
H2:H10An optional range of real holiday dates excluded from the workday count.

Verified examples

Five weekdays in one workweek
=NETWORKDAYS(A2,B2)

Excel: Set A2 to 2026-01-05 and B2 to 2026-01-09; leave holidays empty. Returns: 5

Exclude a Wednesday holiday
=NETWORKDAYS(A2, B2, H2:H10)

Google Sheets: Use the same dates and put 2026-01-07 in H2. Returns: 4

Reverse the date boundaries
=NETWORKDAYS(A2,B2)

Excel: Set A2 to 2026-01-09 and B2 to 2026-01-05 with no holidays. Returns: -5

Common errors and fixes

IssueLikely causeFix
NETWORKDAYS returns #VALUE!A2, B2, or a holiday cell contains text rather than a real date serial.Convert all date inputs and holiday entries to real spreadsheet dates.
A listed holiday does not reduce the resultThe holiday is stored as text, falls outside H2:H10, or includes an unexpected time value.Use date-formatted holiday serials in the referenced range and include the complete holiday list.
The result uses the wrong weekend patternNETWORKDAYS assumes Saturday and Sunday are weekends.Use NETWORKDAYS.INTL when the workweek has custom weekend days.

When not to use this formula

  • Do not use NETWORKDAYS when calendar days, rather than working days, should be counted.

Alternatives

AlternativeWhen to use it
Days Between Dates FormulaUse when weekends and holidays should remain included.
Next Business Day FormulaUse when the required output is one future or previous workday, not a count.

Related formulas

Official references

FAQ

Are the start and end dates included?

Yes. If an endpoint is a workday, NETWORKDAYS counts it; reversing the endpoints returns the negative count.

How can I use a custom weekend?

Use NETWORKDAYS.INTL and provide the weekend pattern required by the work schedule.