Description
Use this function to return the number of working days between two dates. It automatically excludes Saturdays and Sundays and optionally exclude a set of holidays that you supply.
Syntax
NETWORKDAYS(start_date,end_date,[holidays])
Inputs
This function has the following arguments:
Name | Required | Valid input |
---|---|---|
start_date |
Yes | First date of the range to be considered. This can be a cell reference, an integer date, or a date in the format DD/MM/YYYY or YYYY/MM/DD. A formula which results in one of these is also acceptable. Quotation marks are required. |
end_date |
Yes | Last date of the range to be considered. This can be a cell reference, an integer date, or a date in the format DD/MM/YYYY or YYYY/MM/DD. A formula which results in one of these is also acceptable. Quotation marks are required. |
holidays |
No | A list of non-work days as supplied as dates. This can be a cell reference, a cell range (D2:D13), an integer date, or a date in the format DD/MM/YYYY or YYYY/MM/DD. A formula which results in one of these is also acceptable. |
Example
Sample data
A (start_date) |
B (end_date) |
C (holidays) |
NETWORKDAYS result |
E (Holidays) |
---|---|---|---|---|
1/1/2024 | 12/31/2024 | 262 | 5/15/2024 | |
1/1/2024 | 12/31/2024 | 5/15/2024 | 261 | 6/15/2024 |
1/1/2024 | 12/31/2024 | 258 | 7/4/2024 | |
7/19/2003 | February 31, 2002 | #VALUE! | 7/5/2024 | |
41631 | 23-Jan-14 | 24 | 9/6/2024 |
Sample formulas
Formula | Description | Result |
---|---|---|
=NETWORKDAYS(A1,B1) |
Determines the number of workdays (Mon-Fri) between the date in cell A1 and the cell B1, with no holidays specified. | 262 |
=NETWORKDAYS(A2,B2,C2) |
Determines the number of workdays (Mon-Fri) between the date in cell A1 and the cell B1, with the holidays specified in C2. | 261 |
=NETWORKDAYS(A1,B1,E1:E5) |
Determines the number of workdays (Mon-Fri) between the date in cell A1 and the cell B1, with the holidays specified in the range E1:E5. | 258 |
Notes
- NETWORKDAYS doesn't implicitly know which days are holidays. These dates have to be specified by the user.
- NETWORKDAYS includes both the start date and end date when calculating workdays.
- NETWORKDAYS automatically excludes all Saturdays and Sundays in the specified range.
- NETWORKDAYS ignores any time values.
- If the holiday date(s) aren't between the specified start and end dates, they're ignored.
- If the provided date(s) aren't valid, NETWORKDAYS returns the #VALUE! error.
- Wildcards don't work with this function.
Tips
- You can use this to calculate the number of working hours in the specified range by multiplying the result by the appropriate number of working hours.
Related functions
DATE
DATEVALUE
DAY
DAYS
DAYS360
EDATE
EOMONTH
MONTH
NETWORKDAYS
NETWORKDAYS.INTL
WEEKDAY
WORKDAY
WORKDAY.INTL
YEAR
YEARFRAC