Exceljet

Quick, clean, and to the point

Get workdays between dates

Excel formula: Get workdays between dates
Generic formula 
=NETWORKDAYS(start_date,end_date,holidays)
Summary 

To calculate the number of workdays between two dates, you can use the NETWORKDAYS function.  In the example shown, the formula in D7 is:

=NETWORKDAYS(B7,C7,B10:B11)

which returns a count of workdays excluding the holidays in B10:B11.

Explanation 

The Excel NETWORKDAYS function calculates the number of working days between two dates. NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and can optionally exclude a list of holidays supplied as dates. 

For example, in the screenshot shown, the formula in D6 is:

=NETWORKDAYS(B6,C6) // returns 5

This formula returns 5 since there are 5 working days between December 23 and December 27, and no holidays have been provided. Note that NETWORKDAYS includes both the start and end dates in the calculation if they are workdays.

NETWORKDAYS can also exclude a custom list of holidays. In the next cell down, we use the same formula with the same dates, plus a list of holidays in B10:B11.

=NETWORKDAYS(B7,C7,B10:B11) // returns 3

This formula returns 3, since two of the 5 days are holidays.

Custom weekends

If you need take into account custom weekends (i.e. weekends are Saturday only, Sunday and Monday, etc.) you'll need to switch to the more robust NETWORKDAYS.INTL function, which allows you to set what days of the week are considered are considered weekends, by supplying a weekend argument in the form of a numeric code. 

Need a date?

If you need a date n workdays in the past or future, see the WORKDAY function.

Author 
Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.