To find the number of working days between two dates in Excel, use the =NETWORKDAYS(start_date, end_date, [holidays]) function. This formula automatically excludes Saturdays and Sundays, as well as any optional holiday dates you specify, providing a clean count of business days for project planning, payroll, or deadline tracking.
What You'll Need
- Microsoft Excel (any modern version, including Office 365, Excel 2021, 2019, or 2016).
- A start date and an end date entered into cells.
- (Optional) A list of holiday dates if you want to exclude public holidays from the count.
Step-by-Step
- Prepare Your Data: Enter your start date in one cell (e.g., A2) and your end date in another cell (e.g., B2). Ensure these cells are formatted as "Date" so Excel recognizes them correctly.
- Create a Holiday List: If you need to exclude specific holidays, list those dates in a separate column (e.g., D2 through D10). This prevents Excel from counting a Monday as a working day if it is a national holiday.
- Insert the NETWORKDAYS Formula: Click on the cell where you want the result to appear and type:
=NETWORKDAYS(A2, B2, D2:D10).- A2 is the start date.
- B2 is the end date.
- D2:D10 is the range containing your holiday dates.
- Press Enter: Excel will calculate the total number of working days. Note that the formula includes both the start and end date in the count if they fall on a weekday.
- Handle Custom Weekends (Optional): If your working week is not Monday through Friday, use the
NETWORKDAYS.INTLfunction instead. The formula structure is=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays]). After the end date, you can enter a number or a string to define which days are weekends (e.g., "1" for Sat/Sun, "11" for Sunday only). - Calculate a Future Date (Optional): If you instead need to find the date that occurs X working days after a start date, use the
WORKDAYfunction:=WORKDAY(start_date, days, [holidays]). For example,=WORKDAY(A2, 10, D2:D10)will tell you the date 10 business days after the date in A2.
Common Mistakes
- Incorrect Date Formatting: Entering dates as text (e.g., "Jan 1st 2024") instead of using standard date formats (e.g., 01/01/2024) can cause the formula to return a
#VALUE!error. - Swapping Start and End Dates: If the start date is later than the end date,
NETWORKDAYSwill return a negative number. - Including Weekends in the Holiday List: While adding a Saturday to your holiday list won't break the formula, it is redundant because
NETWORKDAYSalready excludes weekends. - Confusing WORKDAY with NETWORKDAYS: Remember that
NETWORKDAYScalculates the amount of time (a number of days), whileWORKDAYcalculates a specific date in the future or past.
Tips
- Use Absolute References: When dragging your formula down a column, lock your holiday range using dollar signs (e.g.,
$D$2:$D$10). This ensures the holiday list doesn't shift as you copy the formula. - Named Ranges: To make your formulas easier to read, highlight your holiday list and name the range "Holidays" in the Name Box (top left). Your formula then becomes
=NETWORKDAYS(A2, B2, Holidays). - Dynamic Date Integration: Use the
=TODAY()function as your start date if you want the working day count to update automatically every time you open the spreadsheet.
Troubleshooting
If the formula is not working as expected, try these steps in order:
- Check for #VALUE! Errors: This usually means one of your dates is not actually a date. Select the cell and change the format to "General." If the date turns into a five-digit number (e.g., 45291), it is a valid date. If it stays as text, you must re-enter it.
- Verify the Result Format: Sometimes Excel automatically formats the result cell as a "Date," making your answer look like "January 5, 1900" instead of "5." Change the cell format back to "General" or "Number" to see the actual count of days.
- Check the Holiday Range: Ensure there are no blank cells or text labels (like the word "Holidays") inside the range you selected for the holiday argument.
- Review Weekend Settings: If you are using
NETWORKDAYS.INTLand getting an unexpected number, double-check the weekend code you used. A code of "1" is the default for Saturday and Sunday.
Frequently Asked Questions
Does NETWORKDAYS count the start and end date?
Yes, if both the start date and end date fall on a working day, both are included in the final count.
How do I exclude only Sundays?
Use the NETWORKDAYS.INTL function. In the "weekend" argument, use the number 11, which tells Excel that only Sunday is a non-working day.
Can I use this to calculate working hours?
NETWORKDAYS only calculates full days. To calculate hours, you must multiply the result of the NETWORKDAYS formula by the number of working hours in your standard day (e.g., 8).
What happens if the start date is a weekend?
The formula simply ignores the weekend date and begins counting from the first available working day within the range.
Is there a difference between NETWORKDAYS and NETWORKDAYS.INTL?
Yes. NETWORKDAYS assumes a standard Saturday/Sunday weekend. NETWORKDAYS.INTL allows you to customize which days of the week are considered weekends, making it useful for different regions or shift schedules.