You can use the NETWORKDAYS function in Google Sheets to count the number of workdays between two dates.
This function uses the following basic syntax:
NETWORKDAYS(start_date, end_date, [holidays])
where:
- start_date: The start date
- end_date: The end date
- holidays: A list of holiday dates to skip when counting (optional)
The following examples show how to use this formula in practice.
Example 1: Count Workdays Between Two Dates
Suppose we want to calculate the number of workdays between 1/1/2022 and 1/10/2022.
We can use the following formula to do so:
=NETWORKDAYS(A2, B2)
The following screenshot shows how to use this formula in practice:
There are 6 workdays between 1/1/2022 and 1/10/2022.
We can confirm this by counting the number of workdays between the two dates on a calendar:
There are indeed 6 workdays between the two dates.
Example 2: Count Workdays Between Two Dates (Specify Holidays)
Suppose we want to calculate the number of workdays between 3/1/2022 and 12/27/2022 while not counting the following holidays if they happen to fall on a workday:
- Easter (4/17/2022)
- Halloween (10/31/2022)
- Thanksgiving (11/24/2022)
- Christmas (12/25/2022)
We can use the following formula to do so:
=NETWORKDAYS(A2, B2, A8:A11)
The following screenshot shows how to use this formula in practice:
There are 214 workdays between 3/1/2022 and 12/27/2022, excluding the list of holidays that we specified.
Note: You can find the complete documentation for the NETWORKDAYS function in Google Sheets here.
Additional Resources
The following tutorials explain how to perform other common tasks in Google Sheets:
How to Extract Substring in Google Sheets
How to Filter by Date Range in Google Sheets
How to AutoFill Dates in Google Sheets