NETWORKDAYS Function in Excel Tutorial

Excel Tutorial

Introduction

The NETWORKDAYS function in Excel calculates the number of working days between two dates. It automatically excludes Saturdays and Sundays and can also exclude specified holidays. This function is useful for employee attendance, payroll calculations, project planning, and business working-day reports.

What Is the NETWORKDAYS Function in Excel?

The NETWORKDAYS function counts the working days between a starting date and an ending date.

By default, Excel considers:

  • Monday to Friday as working days.
  • Saturday and Sunday as weekends.
  • Dates listed in a holiday range as non-working days.

For example, suppose an employee works from 1-Jan-2026 to 7-Jan-2026.

The period contains seven calendar days, but Saturday and Sunday are excluded. Therefore, NETWORKDAYS returns 5 working days.

NETWORKDAYS Function Syntax

=NETWORKDAYS(start_date,end_date,[holidays])

Understanding the Arguments

ArgumentMeaning
start_dateThe starting date of the period.
end_dateThe ending date of the period.
holidaysOptional dates that should also be excluded from working days.

Important: Both the starting date and ending date are included in the calculation if they are working days.

How Does NETWORKDAYS Work?

NETWORKDAYS checks every date between the starting and ending dates.

It counts a date if it is a normal working day and does not appear in the holiday list.

Let’s understand this with an example.

Suppose:

  • Starting Date: 05-Jan-2026 (Monday)
  • Ending Date: 11-Jan-2026 (Sunday)
DateDayCounted as Working Day?
05-Jan-2026MondayYes
06-Jan-2026TuesdayYes
07-Jan-2026WednesdayYes
08-Jan-2026ThursdayYes
09-Jan-2026FridayYes
10-Jan-2026SaturdayNo
11-Jan-2026SundayNo

Expected Result: 5 Working Days

Excel counts Monday to Friday and automatically excludes Saturday and Sunday.

Understanding the Holidays Argument

The third argument is optional. It allows you to exclude additional dates, such as public holidays or company holidays.

Suppose your holiday list is stored in cells F2.

Holiday DateHoliday Name
07-Jan-2026Company Holiday
09-Jan-2026Public Holiday

Formula:

=NETWORKDAYS(A2,B2,F2:F3)

Expected Result: 3

The original working-day count is 5. Excel excludes two additional holidays, so the result becomes 3.

Remember: The holiday list should contain valid Excel dates, not just text that looks like dates.

Practical Examples of NETWORKDAYS Function in Excel

Question 1: Calculate Working Days Between Two Dates

Problem Statement:

An HR department wants to calculate the number of working days between employee joining dates and a fixed reporting date.

Employee Data:

Employee NameJoining DateReporting Date
Rahul05-Jan-202611-Jan-2026
Priya12-Jan-202618-Jan-2026
Amit19-Jan-202625-Jan-2026
Neha26-Jan-202601-Feb-2026

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2)

Expected Result:

Employee NameJoining DateReporting DateWorking Days
Rahul05-Jan-202611-Jan-20265
Priya12-Jan-202618-Jan-20265
Amit19-Jan-202625-Jan-20265
Neha26-Jan-202601-Feb-20265

Explanation:

The formula checks the dates in B2 and C2.

Excel counts Monday to Friday and excludes Saturday and Sunday. Both starting and ending dates are included when they fall on working days.

For Rahul, the period from Monday, 5 January, to Sunday, 11 January, contains five working days.

Concept Covered: Calculating working days without a holiday list.

Question 2: Calculate Working Days After Excluding Holidays

Problem Statement:

A company wants to calculate working days while excluding its official holidays.

Project Data:

Project NameStart DateEnd Date
Website Development05-Jan-202611-Jan-2026
Mobile Application12-Jan-202618-Jan-2026
Database Setup19-Jan-202625-Jan-2026

Holiday List:

Enter the following holiday dates in F2.

Holiday DateHoliday Name
07-Jan-2026Company Holiday
13-Jan-2026Public Holiday
21-Jan-2026Company Holiday

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2,$F$2:$F$4)

Expected Result:

Project NameStart DateEnd DateWorking Days
Website Development05-Jan-202611-Jan-20264
Mobile Application12-Jan-202618-Jan-20264
Database Setup19-Jan-202625-Jan-20264

Explanation:

The formula calculates the normal working days and then excludes the dates listed in F2.

For Website Development, the normal working-day count is 5. Since 7 January is a holiday, Excel returns 4.

The dollar signs in $F$2:$F$4 keep the holiday range fixed when you copy the formula down.

Concept Covered: Excluding multiple holidays from working-day calculations.

Question 3: Calculate Employee Attendance Days

Problem Statement:

An HR department wants to calculate the number of working days between an employee’s attendance period.

Attendance Data:

Employee NameAttendance StartAttendance End
Aman02-Feb-202606-Feb-2026
Riya09-Feb-202613-Feb-2026
Karan16-Feb-202620-Feb-2026
Simran23-Feb-202627-Feb-2026

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2)

Expected Result:

Employee NameAttendance StartAttendance EndWorking Days
Aman02-Feb-202606-Feb-20265
Riya09-Feb-202613-Feb-20265
Karan16-Feb-202620-Feb-20265
Simran23-Feb-202627-Feb-20265

Explanation:

Each attendance period starts on Monday and ends on Friday.

NETWORKDAYS counts all five weekdays in each period.

Concept Covered: Counting weekdays in employee attendance periods.

Question 4: Calculate Project Working Days with Multiple Holidays

Problem Statement:

A project manager wants to calculate the actual working days available for different projects after excluding company holidays.

Project Data:

Project NameStart DateEnd Date
Project A02-Mar-202613-Mar-2026
Project B16-Mar-202627-Mar-2026
Project C30-Mar-202610-Apr-2026

Company Holiday List:

Enter these dates in F2.

Holiday DateHoliday Name
05-Mar-2026Company Holiday
18-Mar-2026Public Holiday
06-Apr-2026Company Holiday

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2,$F$2:$F$4)

Expected Result:

Project NameStart DateEnd DateWorking Days
Project A02-Mar-202613-Mar-20269
Project B16-Mar-202627-Mar-20269
Project C30-Mar-202610-Apr-20269

Explanation:

Each project period contains ten weekdays. Excel excludes one company holiday from each period, so the result is nine working days.

Concept Covered: Calculating project working days after excluding holidays.

Question 5: Calculate Working Days for a Monthly Report

Problem Statement:

A sales manager wants to calculate the working days in different monthly reporting periods.

Monthly Report Data:

Report MonthStart DateEnd Date
January01-Jan-202631-Jan-2026
February01-Feb-202628-Feb-2026
March01-Mar-202631-Mar-2026
April01-Apr-202630-Apr-2026

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2)

Expected Result:

Report MonthStart DateEnd DateWorking Days
January01-Jan-202631-Jan-202622
February01-Feb-202628-Feb-202620
March01-Mar-202631-Mar-202622
April01-Apr-202630-Apr-202622

Explanation:

The formula counts Monday to Friday for the complete month.

For January 2026, there are 22 weekdays. NETWORKDAYS returns 22 because no holiday list has been provided.

Concept Covered: Calculating monthly working days.

Question 6: Calculate Working Days for a Payment Period

Problem Statement:

An accounts department wants to calculate the number of working days between an invoice date and its payment date.

Payment Data:

Invoice NumberInvoice DatePayment Date
INV10102-Mar-202606-Mar-2026
INV10209-Mar-202613-Mar-2026
INV10316-Mar-202620-Mar-2026
INV10423-Mar-202627-Mar-2026

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2)

Expected Result:

Invoice NumberInvoice DatePayment DateWorking Days
INV10102-Mar-202606-Mar-20265
INV10209-Mar-202613-Mar-20265
INV10316-Mar-202620-Mar-20265
INV10423-Mar-202627-Mar-20265

Explanation:

The formula calculates the number of working days between the invoice date and payment date.

For INV101, the period starts on Monday and ends on Friday. Therefore, Excel returns five working days.

Concept Covered: Calculating business days between invoice and payment dates.

Question 7: Calculate Working Days Using Cell References for Holidays

Problem Statement:

A company maintains a holiday list in a separate section of its worksheet. The HR team wants to calculate employee working days using the holiday dates stored in that list.

Employee Data:

Employee NameStart DateEnd Date
Rahul06-Apr-202610-Apr-2026
Priya13-Apr-202617-Apr-2026
Amit20-Apr-202624-Apr-2026
Neha27-Apr-202601-May-2026

Holiday List:

Enter the following dates in F2.

Holiday DateHoliday Name
07-Apr-2026Company Holiday
15-Apr-2026Public Holiday
30-Apr-2026Company Holiday

Excel Formula:

Enter this formula in D2:

=NETWORKDAYS(B2,C2,$F$2:$F$4)

Expected Result:

Employee NameStart DateEnd DateWorking Days
Rahul06-Apr-202610-Apr-20264
Priya13-Apr-202617-Apr-20264
Amit20-Apr-202624-Apr-20265
Neha27-Apr-202601-May-20264

Explanation:

The formula checks each employee’s date range and excludes any holiday that falls within that range.

For Rahul, the normal count is five weekdays. Since 7 April is included in the holiday list, Excel returns four.

For Amit, none of the listed holidays falls within the date range, so the result remains five.

Concept Covered: Using an absolute cell reference for a reusable holiday list.

Student Practice Tasks

Try solving these tasks using only the NETWORKDAYS function.

Task 1: Calculate Employee Working Days

EmployeeStart DateEnd Date
Mohit04-May-202608-May-2026
Sneha11-May-202615-May-2026
Varun18-May-202622-May-2026

Calculate the working days for each employee.

Task 2: Exclude Company Holidays

Employee Data:

EmployeeStart DateEnd Date
Employee A01-Jun-202605-Jun-2026
Employee B08-Jun-202612-Jun-2026
Employee C15-Jun-202619-Jun-2026

Holiday List:

Holiday DateHoliday Name
03-Jun-2026Company Holiday
10-Jun-2026Public Holiday
17-Jun-2026Company Holiday

Calculate working days after excluding the holiday dates.

Task 3: Calculate Project Working Days

ProjectStart DateEnd Date
Project X06-Jul-202617-Jul-2026
Project Y20-Jul-202631-Jul-2026
Project Z03-Aug-202614-Aug-2026

Calculate the total working days for each project.

Final Student Challenge: Build an Employee Working Days Report

Problem Statement:

You are working in the HR department. Your manager wants a report showing the working days for each employee after excluding company holidays.

Use the following employee data.

Employee Data:

Employee NameStart DateEnd Date
Rahul03-Aug-202614-Aug-2026
Priya17-Aug-202628-Aug-2026
Amit31-Aug-202611-Sep-2026
Neha14-Sep-202625-Sep-2026

Company Holiday List:

Enter these dates in F2.

Holiday DateHoliday Name
05-Aug-2026Company Holiday
20-Aug-2026Public Holiday
04-Sep-2026Company Holiday
18-Sep-2026Public Holiday

Your Tasks:

  1. Calculate working days for each employee.
  2. Exclude Saturdays and Sundays automatically.
  3. Exclude all company holidays that fall within the employee’s date range.
  4. Use an absolute reference for the holiday range.
  5. Copy the formula for all employees.

Expected Report Structure:

Employee NameStart DateEnd DateWorking Days
Rahul03-Aug-202614-Aug-2026Your Result
Priya17-Aug-202628-Aug-2026Your Result
Amit31-Aug-202611-Sep-2026Your Result
Neha14-Sep-202625-Sep-2026Your Result

Complete the report using the NETWORKDAYS function.

Key Takeaways

  • NETWORKDAYS calculates working days between two dates.
  • It automatically excludes Saturdays and Sundays.
  • The starting and ending dates are included when they are working days.
  • The holidays argument is optional.
  • You can provide multiple holiday dates in a cell range.
  • Use absolute references to keep the holiday range fixed when copying formulas.
  • The function is useful for HR, attendance, payroll, project planning, and business reporting.
  • NETWORKDAYS uses Saturday and Sunday as weekends by default.

Frequently Asked Questions (FAQs)

1. What is the NETWORKDAYS function in Excel?

NETWORKDAYS calculates the number of working days between two dates, excluding Saturdays and Sundays by default.

2. What is the syntax of NETWORKDAYS?

The syntax is:

=NETWORKDAYS(start_date,end_date,[holidays])

3. Does NETWORKDAYS exclude Saturdays and Sundays?

Yes. It automatically excludes Saturday and Sunday from the working-day calculation.

4. Can NETWORKDAYS exclude public holidays?

Yes. Provide a list of holiday dates in the optional holidays argument.

5. Are the starting and ending dates included in NETWORKDAYS?

Yes. Both dates are included if they fall on working days and are not listed as holidays.

6. Can NETWORKDAYS calculate working days for a complete month?

Yes. Provide the first and last dates of the month to calculate the number of weekdays in that month.

7. What happens if the starting date is greater than the ending date?

NETWORKDAYS can also calculate the result when the starting date is later than the ending date. It returns a negative working-day count.

8. Can NETWORKDAYS calculate employee attendance?

Yes. It can count the weekdays between an employee’s attendance start and end dates, excluding any holidays you provide.

9. What is the difference between NETWORKDAYS and NETWORKDAYS.INTL?

NETWORKDAYS uses Saturday and Sunday as weekends by default. NETWORKDAYS.INTL allows you to specify different weekend days.

10. Can NETWORKDAYS exclude multiple holidays?

Yes. You can provide a range containing multiple holiday dates, and Excel excludes the dates that fall within the specified period.