How to Use the NETWORKDAYS Function to Calculate Working Days Between Two Dates in Excel

If you are managing a massive construction project or building an employee payroll sheet in Microsoft Excel, you will frequently need to calculate exactly how many days a specific task will take. However, simple math (subtracting the start date from the end date) will give you the total number of calendar days, which completely ruins your formula by including Saturdays and Sundays. To accurately calculate strict business days, you must use the NETWORKDAYS() function.

How the NETWORKDAYS Function Works

The NETWORKDAYS() function is specifically designed for corporate project management. It analyzes two dates, mathematically counts the total days between them, and then systematically strips out every single Saturday and Sunday, returning only the true number of Monday-through-Friday working days.

Step-by-Step Instructions

  1. Open your Microsoft Excel spreadsheet.
  2. Assume cell A1 contains your project’s Start Date (e.g., 10/01/2024).
  3. Assume cell B1 contains your project’s End Date (e.g., 10/31/2024).
  4. Click on an empty cell (like C1) where you want the final number of working days to appear.
  5. Type the following formula:

=NETWORKDAYS(A1, B1)

  1. Press Enter.

Excel will instantly output the number 23 (because October 2024 has 31 total days, but 8 of those days are weekends). Your simple math is now perfectly aligned with standard corporate operating hours.

The Advanced Feature: Excluding Holidays

While stripping out weekends is incredibly helpful, your employees also do not work on national holidays. The NETWORKDAYS() function has an optional, hidden third argument that allows you to feed it a custom list of company holidays to subtract from the final total.

  1. Create a list of your company holidays in a blank column somewhere else in your spreadsheet (for example, list Thanksgiving and Christmas in cells Z1 through Z5).
  2. Edit your formula in cell C1 to include that specific list as the third argument:

=NETWORKDAYS(A1, B1, Z1:Z5)

Now, Excel will analyze the time frame, strip out the weekends, scan the calendar for any dates that match your custom holiday list in column Z, strip those out as well, and return the absolute, mathematically flawless number of billable working hours for the project.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.