Excel: Calculate Working Days with Formula

Ever needed to calculate working days between two dates in Excel? While Excel doesn't have a built-in function for this, you can create a formula using NETWORKDAYS and other functions. Let's dive into how to do this, step by step.

Calculate Working Days between two Dates in Excel: Find Workdays Excluding Holidays & Weekends
Calculate Working Days between two Dates in Excel: Find Workdays Excluding Holidays & Weekends

Before we start, ensure you have the Analysis ToolPak add-in enabled. Go to File > Options > Add-Ins, select 'Excel Add-Ins' in the Manage box, then click Go... and check 'Analysis ToolPak'.

"Days in a Month in Excel ๐Ÿ“… | Excel Formula Trick #shorts"
"Days in a Month in Excel ๐Ÿ“… | Excel Formula Trick #shorts"

Understanding NETWORKDAYS Function

The NETWORKDAYS function calculates the number of whole workdays between two dates. It excludes weekends and holidays. Here's the syntax:

How to Use Workday Formula in Excel
How to Use Workday Formula in Excel

NETWORKDAYS(start_date, end_date, [holidays])

The 'holidays' argument is optional and allows you to specify a range of dates to exclude from the calculation.

WEEKDAY formula in Excel to get day of week, weekends and workdays
WEEKDAY formula in Excel to get day of week, weekends and workdays

Basic Working Days Calculation

Let's start with a simple example. Suppose you want to find the number of working days between January 1, 2022, and December 31, 2022. In cell A1, enter NETWORKDAYS("1/1/2022", "12/31/2022"). Press Enter, and you'll see the result.

This formula calculates the number of working days between the two dates, excluding weekends. If you want to exclude specific holidays, you can do so by adding a range of holiday dates as the third argument.

ms excel formula
ms excel formula

Including Holidays in the Calculation

Suppose you want to exclude New Year's Day (January 1, 2022) and Christmas Day (December 25, 2022). In cell A2, enter NETWORKDAYS("1/1/2022", "12/31/2022", {"1/1/2022","12/25/2022"}). Press Enter, and you'll see the updated result.

In this formula, {"1/1/2022","12/25/2022"} is an array of holiday dates. You can add more holidays by separating them with commas.

How to Copy a Formula Down in Excel Using the Fill Handle
How to Copy a Formula Down in Excel Using the Fill Handle

Calculating Working Days for Multiple Date Ranges

Now, let's say you want to calculate working days for multiple date ranges. You can use the NETWORKDAYS function in combination with other functions like IF and SUM.

How to Use 20+ Date Formulas in Excel
How to Use 20+ Date Formulas in Excel
Calculate work days between two dates!
Calculate work days between two dates!
โœ… 25 Excel Formulas Every Data Analyst Must Know
โœ… 25 Excel Formulas Every Data Analyst Must Know
How to use frequency formula in excel
How to use frequency formula in excel
Calculate Number of Days Between Two Dates in Excel (8 Quick Tricks)
Calculate Number of Days Between Two Dates in Excel (8 Quick Tricks)
a notebook with microsoft excel written on it
a notebook with microsoft excel written on it
Exel Formulas
Exel Formulas
the top 30 excel formulas you must know to use in your workbook or notebook
the top 30 excel formulas you must know to use in your workbook or notebook
How to Use HLOOKUP Formula in Excel
How to Use HLOOKUP Formula in Excel
50 Excel Formulas to Master
50 Excel Formulas to Master
How to Use ROW Formula in Excel
How to Use ROW Formula in Excel
MOD Function in Excel๐Ÿ•–๐Ÿ’ป
MOD Function in Excel๐Ÿ•–๐Ÿ’ป
How to calculate work hours in Excel
How to calculate work hours in Excel
Turn Dates Into Day Names Fast in Excel
Turn Dates Into Day Names Fast in Excel
the cover of 3 amazing excel formulas that will blow your mind
the cover of 3 amazing excel formulas that will blow your mind
Auto Highlight Row in Excel ๐ŸŒŸ EASY Tutorial ๐Ÿ”ฅ || Excel Tips
Auto Highlight Row in Excel ๐ŸŒŸ EASY Tutorial ๐Ÿ”ฅ || Excel Tips
Employee Time Tracking in Excel (+ video tutorial!)
Employee Time Tracking in Excel (+ video tutorial!)
Excel Formulas You Should Know
Excel Formulas You Should Know
Excel formulas
Excel formulas
the excel formula to calculator hours worksheet is shown in this screenshot
the excel formula to calculator hours worksheet is shown in this screenshot

Using IF and NETWORKDAYS

Suppose you have two date ranges: January 1, 2022, to March 31, 2022, and April 1, 2022, to June 30, 2022. In cell A3, enter IF(A1>="1/1/2022",NETWORKDAYS("1/1/2022","3/31/2022"),0). In cell A4, enter IF(A1<="6/30/2022",NETWORKDAYS("4/1/2022","6/30/2022"),0). In cell A5, enter SUM(A3:A4).

This formula calculates the number of working days for each date range and sums them up. The IF function ensures that the NETWORKDAYS function only calculates the days within the specified date range.

Using SUMIFS and NETWORKDAYS

If you have a large dataset with multiple date ranges, you can use SUMIFS and NETWORKDAYS to calculate the total working days. Suppose you have dates in column A and corresponding end dates in column B. In cell A6, enter SUMIFS(NETWORKDAYS(A2:A100,B2:B100),A2:A100,">="&A$1,NETWORKDAYS(A2:A100,B2:B100),"<="&A$2).

This formula calculates the number of working days for each date range and sums them up. The SUMIFS function ensures that only the date ranges within the specified start and end dates are included in the calculation.

And there you have it! You now know how to calculate working days in Excel using the NETWORKDAYS function. Happy calculating!