Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
This article describes the formula syntax and usage of the NETWORKDAYS function.
Description
Returns the number of whole working days between two dates.
Syntax
NETWORKDAYS(start_date, end_date, [holidays])
The NETWORKDAYS function syntax has the following arguments:
- start_date - Required. The start date. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
- end_date - Required. The end date. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
- holidays - Optional. An optional list of one or more dates to exclude from the working day calendar, such as state and federal holidays and floating holidays. You can enter holidays as date values, as text strings, or as results of formulas or functions. For example, use DATE(2008,12,25) for the 25th day of December, 2008. Problems can occur if dates are entered as text.
Remarks
- NETWORKDAYS automatically excludes weekends, which are defined as Saturdays and Sundays.
- If start_date is later than end_date, NETWORKDAYS returns a negative number.
- Values returned by the YEAR, QUARTER, MONTH, DAY, HOUR, MINUTE and SECOND functions will be Gregorian values regardless of the display format for the supplied date value. For example, if the display format of the supplied date is Hijri, the returned values for the YEAR, QUARTER, MONTH, DAY, HOUR, MINUTE and SECOND functions will be values associated with the equivalent Gregorian date.
Example
| Formula | Description | Result |
| =NETWORKDAYS(2022-01-01, 2022-01-31) | Number of working days in January 2022, excluding weekends. | 21 |
| =NETWORKDAYS(2022-01-01, 2022-01-31, {holidays}) | Number of working days in January 2022, excluding weekends and the holidays listed in the holidays variable (assuming the variable contains 2022-01-17). | 20 |
Errors
For a full list of formula errors, please read Formula errors.