## Purpose

## Return value

## Syntax

`=NETWORKDAYS(start_date,end_date,[holidays])`

*start_date*- The start date.*end_date*- The end date.*holidays*- [optional] A list of non-work days as dates.

## How to use

The NETWORKDAYS function returns the number of working days between two dates, automatically excluding weekends (Saturday and Sunday) and *optionally* excluding holidays provided as a list of dates. NETWORKDAYS can be used to calculate employee benefits that accrue based on days worked, the number of working days available during a project, the number of working days required to resolve a customer support issue, etc.

NETWORKDAYS takes three arguments: *start_date*, *end_date*, and *holidays*. All three arguments must be valid Excel dates. Holidays are optional. To exclude holidays, provide a range of valid Excel dates for the *holidays* argument. Holidays are treated as non-working days and will not be included in the result.

NETWORKDAYS includes both the start date and end date when calculating workdays. If you give NETWORKDAYS the same date for start date and end date, and the date is not a weekend or holiday, it will return 1.

### Example

The general form of a NETWORKDAYS formula is as follows:

```
=NETWORKDAYS(start,end) // exclude weekends
=NETWORKDAYS(start,end,holidays) // exclude weekends + holidays
```

In the example shown, **holidays** is the named range H5:H13, which contains non-working days in 2021. Columns E and F show the number of working days in each month of the year. The formula in cell E5 (Result 1) contains the NETWORKDAYS function but *does not* take into account holidays:

```
=NETWORKDAYS(B5,C5) // returns 21
```

The formula in cell F5 (Result 2) *does* take into account holidays:

```
=NETWORKDAYS(B5,C5,holidays) // returns 19
```

NETWORKDAYS will automatically exclude both Saturday and Sunday. This behavior is not configurable. If you need more flexibility, the NETWORKDAYS.INTL function provides a way to treat any day of the week as a non-working day.

### Notes

- NETWORKDAYS calculates
*whole*workdays, ignoring any time values. - NETWORKDAYS will automatically exclude both Saturday and Sunday.
- NETWORKDAYS includes
*both*the start date and end date when calculating workdays. - To create a custom weekend schedule, see the NETWORKDAYS.INTL function.