How to Use NETWORKDAYS in Excel to Count Workdays
Use the
NETWORKDAYS function in Excel to count the number of workdays between two dates, automatically excluding weekends. You can also add a list of holidays to exclude specific dates from the count by using the optional third argument.Syntax
The NETWORKDAYS function counts workdays between two dates, excluding weekends and optionally holidays.
- start_date: The first date in the period.
- end_date: The last date in the period.
- holidays (optional): A range or array of dates to exclude as holidays.
excel
NETWORKDAYS(start_date, end_date, [holidays])
Example
This example counts workdays from January 1, 2024 to January 10, 2024, excluding weekends and the holiday on January 2, 2024.
excel
=NETWORKDAYS(DATE(2024,1,1), DATE(2024,1,10), {DATE(2024,1,2)})
Output
6
Common Pitfalls
Common mistakes include:
- Not using valid date formats for
start_dateandend_date. - Forgetting to include holidays as a range or array if needed.
- Assuming weekends are customizable;
NETWORKDAYSalways excludes Saturday and Sunday.
excel
=NETWORKDAYS("1/10/2024", "1/1/2024") <em>(Wrong: end date before start date)</em> =NETWORKDAYS(DATE(2024,1,1), DATE(2024,1,10)) <em>(Right: counts workdays excluding weekends)</em>
Quick Reference
| Argument | Description | Example |
|---|---|---|
| start_date | Start date of the period | DATE(2024,1,1) |
| end_date | End date of the period | DATE(2024,1,10) |
| holidays | Optional dates to exclude | {DATE(2024,1,2), DATE(2024,1,5)} |
Key Takeaways
NETWORKDAYS counts workdays between two dates, excluding weekends automatically.
You can exclude holidays by adding them as an optional third argument.
Dates must be valid Excel dates or functions like DATE() for accurate results.
NETWORKDAYS always treats Saturday and Sunday as weekends; it cannot be customized.
Ensure the start date is before or equal to the end date to avoid errors.