Excel NETWORKDAYS Function

This tutorial demonstrates how to use the Excel NETWORKDAYS Function in Excel to get the number of business days between dates.

NETWORKDAYS Main Function

NETWORKDAYS Function Overview

The NETWORKDAYS Function Returns the number of working days between two dates. Working days include Mon-Fri and exclude Sat-Sun. Optionally, you can exclude holidays.

To use the NETWORKDAYS Excel Worksheet Function, select a cell and type:
networkdays formula syntax

(Notice how the formula inputs appear)

NETWORKDAYS Function Syntax and Inputs:

start_date – The start date in Excel serial number format or entered as a date with quotations (“s) surround the date. Example: You can not enter 11/12/2015 directly into the cell. Instead you need to enter “11/12/2015” or you would need to use the corresponding serial number: 42320. Alternatively, you can reference a cell with the date 11/12/2015 entered. Excel automatically converts dates stored in cells into serial format (unless the date is entered as text).

end_date – The end date in Excel serial number format or entered as a date with quotations (“s) surround the date. Example: You can not enter 11/12/2015 directly into the cell. Instead you need to enter “11/12/2015” or you would need to use the corresponding serial number: 42320. Alternatively, you can reference a cell with the date 11/12/2015 entered. Excel automatically converts dates stored in cells into serial format (unless the date is entered as text).

holidays – OPTIONAL. List of holidays to exclude from the “work days”. It can be entered as a list of serial numbers corresponding to the holidays. Alternatively, it can reference a range of cells that contain the holiday dates. Example: 42005,42189,42363 or A1:A3, referencing cells that contain that contain dates: 1/1/2015, 7/4/2015, 12/25/2015.

Calculate Business / Working Days

The NETWORKDAYS Function calculates the number of business days between two dates:

NETWORKDAYS Positive

If the end_date is before the start_date NETWORKDAYS will return a negative value:

NETWORKDAYS NegativeTo return the absolute number of working days, use the ABS Function:

NETWORKDAYS ABS

By default, NETWORKDAYS will ignore all holidays. However you can use a 3rd optional argument to define a range of holidays:

NETWORKDAYS With Holiday

NETWORKDAYS in Google Sheets

The NETWORKDAYS Function works exactly the same in Google Sheets as in Excel:

NETWORKDAYS Google sheet

NETWORKDAYS Examples in VBA

You can also use the NETWORKDAYS function in VBA. Type:
application.worksheetfunction.networkdays(start_date,end_date,holidays)

Executing the following VBA statements

will produce the following results

Vba DAYS360 function


For the function arguments (start_date, etc.), you can either enter them directly into the function, or define variables to use instead.

Return to the List of all Functions in Excel