Back to Articles

Excel NETWORKDAYS Function: Ultimate Guide to Calculate Workdays

Function Definition

The NETWORKDAYS function calculates the number of working days between two dates, automatically excluding weekends and specified holidays.

Parameters

* Recommended date format: DATE(year,month,day) e.g. DATE(2023,12,25)

Basic Syntax Example

=NETWORKDAYS("2024-01-01", "2024-01-31")

Calculates workdays in January 2024 excluding Saturdays/Sundays

Here is a sample table of test data used for the NETWORKDAYS formula calculation:

Start Date	End Date	Formula	Result	Explanation
2024-01-01	2024-01-31	=NETWORKDAYS("2024-01-01", "2024-01-31")	21	Calculates working days in January 2024 (excludes weekends: 5 Saturdays & 5 Sundays)
Breakdown:
Note: This calculation excludes custom holidays as no holiday range is specified in the formula.

Holiday Exclusion Example

=NETWORKDAYS(DATE(2023,11,1), DATE(2023,11,30), C2:C4)

Where C2:C4 contains:
2023-11-23 (Thanksgiving)
2023-11-24 (Black Friday)

Here's an example table with test data for the formula =NETWORKDAYS(DATE(2023,11,1), DATE(2023,11,30), C2:C4):

Start Date	End Date	Holiday List (C2:C4)	Formula	Result	Explanation
2023-11-01	2023-11-30	2023-11-10	=NETWORKDAYS(DATE(2023,11,1), DATE(2023,11,30), C2:C4)	19	Calculates working days in November 2023, excluding:
2023-11-22			- Weekends: 8 days (Saturdays: 4th, 11th, 18th, 25th; Sundays: 5th, 12th, 19th, 26th)
2023-11-24			- Specified holidays: 3 days (10th, 22nd, 24th)
Total days in period: 30 → 30 - 8 weekends - 3 holidays = 19 working days
Notes:
  • The DATE(2023,11,1) and DATE(2023,11,30) functions define the date range as November 1-30, 2023.
  • C2:C4 references 3 custom holidays within the period, all of which fall on weekdays (not weekends) to avoid double-counting.
  • The result reflects actual working days after excluding both weekends and the specified holidays.

Return Value

Returns integer representing net workdays, including the start date if it's a workday. Example:
From 2023-12-18 (Monday) to 2023-12-22 (Friday) returns 5 days

Important Notes

  1. Default weekend: Saturday-Sunday (use NETWORKDAYS.INTL for custom weekends)
  2. Holidays must be valid date values
  3. Returns #VALUE! error for invalid dates
  4. Negative result when start_date > end_date

Practical Use Cases

Project Management:
Calculate deadline durations excluding public holidays

HR Applications:
Track employee service days or probation periods

Error Troubleshooting

ErrorSolution
#VALUE!Verify date formats in all arguments
Inaccurate countCheck for hidden characters in holiday ranges

Pro Tips

Create dynamic holiday calendars:
1. Use named ranges for holiday lists
2. Combine with data validation dropdowns
3. Link to official holiday calendars via Power Query