Note: If you are experienced using Excel functions try the Excel NETWORKDAYS Function Quick Tutorial which is a bare bones tutorial on this function.
This tutorial is intended for users new to using Excel's date functions.
Calculate the Number of Days Between Two Dates in Excel
Excel has several built in date functions that can be used to calculate the number of days between two dates.
Each date function does a different job so that the results differ from one function to the next. Which one you use, therefore, depends on the results you want.
Excel NETWORKDAYS Function
The NETWORKDAYS function is used to calculate the number of whole business or working days between the start date and end date of a project.
NETWORKDAYS automatically removes weekend days (Saturday and Sunday) from the total. In addition, specific days, such as statutory holidays, can be omitted as well.
If you need to use weekend days other than Saturday and Sunday and you are using Excel 2010, try using the Excel NETWORKDAYS.INTL Function
Uses for this function include planning or writing proposals to determine the time frame for an upcoming project or to back calculate the amount of time spent on a completed one.
The NETWORKDAYS Function's Syntax and Arguments
The syntax for the NETWORKDAYS function is:
= NETWORKDAYS ( Start_date , End_date , Holidays )
Start_date - (required) the start date of the chosen time period. The actual start date can be entered for this argument or the cell reference to the location of this data in the worksheet can be entered instead.
End_date - (required) the end date of the chosen time period. As with the Start_date, enter the actual end date or the cell reference to the location of this data in the worksheet.
Holidays - (optional) one or more additional dates that are excluded from the total number of working days. Use the cell references to the location of the data in the worksheet for this argument.
Example: Counting the Number of Days Between Two Dates
As seen in the image above, this example will use the NETWORKDAYS function to find the number of workdays available between July 9, 2012 and November 2, 2012. Two holidays (September 3 and October 8) that occur during this period will be deducted from the total.
Note: To avoid calculation problems that can occur if dates are accidentally entered as text, the DATE function will be used to enter the dates used in the function.
Entering the Data
- Enter the following data into the appropriate cell:
D1 - Start:
D2 - Finish:
D3 - Holiday 1:
D4 - Holiday 2:
D5 - Number of Days:
E1 - =DATE(2012,7,9)
E2 - =DATE(2012,11,2)
E3 - =DATE(2012,9,3)
E4 - =DATE(2012,10,8)
Note: If the dates in cells E1 to E4 do not appear as shown in the image above, check to see that these cells are formatted to display data using the short date format.
Entering the NETWORKDAYS Function
- Click on cell E5 to make it the active cell - this is where the results of the NETWORKDAYS function will be displayed
- Click on the Formulas tab
- Choose Date and Time functions > NETWORKDAYS from the ribbon to bring up the function's dialog box
- Click on the Start_date line in the dialog box
- Click on cell E1 in the worksheet to enter this cell reference into the dialog box
- Click on the End_date line in the dialog box
- Click on cell E2 in the worksheet to enter this cell reference into the dialog box
- Click on the Holidays line in the dialog box
- Drag select cells E3 and E4 in the worksheet to enter these cell references into the dialog box
- Click OK in the dialog box to complete the function
- The number of working days - 83 - should appear in cell E5 of the worksheet
- How Excel arrives at this answer is :
- the total number of week days between July 9 and November 2, 2012 equals 85 (17 weeks x 5 days per week)
- from this total the two holiday dates specified (September 3 and October 8) are subtracted to leave a result is 83 working days
- When you click on cell E5 the complete function = NETWORKDAYS ( E1 , E2 , E3 : E4 ) appears in the formula bar above the worksheet