Excel Formula: Count Days Between Two Dates Excluding Weekends
Generally, the DATEDIF function can count the days between two dates, but if you want to count the days between two dates but excluding weekends, which means to count workdays only in a date range in Excel, which formula can help you?
If you want to follow along with this tutorial, please download the example spreadsheet.
Generic formula:
NETWORKDAYS(start_date,end_date,[holiday]) |
Syntaxt and Arguments
Start_date, end_date: the date range that you want to count workdays from. |
Holiday: optional, the cell range that contains the holiday dates that you want to count days excluding. |
Return Value
The formula returns a numeric value.
How this formula works
In cell B3 and C3 are the start date and end date, in cell B6:B10 list the holidays, please use below formula to count days excluding weekends and holidays.
=NETWORKDAYS(B3,C3,B6:B10) |
Press Enter key to get the counting result.
Explanation
NETWORKDAYS function: gets the number of working days between two dates.
Remark
By default, the weekends indicate Saturday and Sunday. If you want to specify the custom weekends, you can use the NETWORKDAYS.INTL function as below:
=NETWORKDAYS.INTL(start_date,end_date,[weekend],[holidays]) |
Week Number | Weekend Days |
1 or omitted | Saturday and Sunday |
2 | Sunday and Monday |
3 | Monday and Tuesday |
4 | Tuesday and Wednesday |
5 | Wednesday and Thursday |
6 | Thursday and Friday |
7 | Friday and Saturday |
11 | Sunday Only |
12 | Monday Only |
13 | Tuesday Only |
14 | Wednesday Only |
15 | Thursday Only |
16 | Friday Only |
17 | Saturday Only |
Take an instance, the weekends are Monday and Tuesday, now you can count days excluding weekends and holidays with below the formulas:
=NETWORKDAYS.INTL(B3,C3,3,B6:B10) |
Relative Formulas
- Convert Unix Timestamp to Excel Time or Vice Inverse
This tutorial provides formulas to convert between Unix time and Excel time. - Convert Text to Time
Introducing formulas for convert text stored date to Excel standard date. - Convert Time to Decimal Hours
Here provides a formula that converts time to decimal hours in Excel and explains how the formula works. - Convert Time To Decimal Minutes
In this tutorial, it provides a formula for converting time to decimal minutes in Excel.
Relative Functions
- Excel IF Function
Test for specified conditions, then returns the corresponding values - Excel VALUE Function
Convert text to number. - Excel MONTH Function
The MONTH is used to get the month as integer number (1 to 12) from date. - Excel DAY Function
DAY function gets the day as a number (1 to 31) from a date - Excel YEAR Function
The YEAR function returns the year based on the given date in a 4-digit serial number format.
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
