How-to recipes · Dates and times

How to count working days between two dates in Excel

Count business days between two dates excluding weekends and holidays with NETWORKDAYS, or custom weekends with NETWORKDAYS.INTL.

Intermediate NETWORKDAYS NETWORKDAYS.INTL WORKDAY WORKDAY.INTL SEQUENCE FILTER WEEKDAY

Service level agreements, delivery promises, payroll and leave calculations all count working days, not calendar days. The number of working days between two dates depends on how many weekends fall in between and which public holidays your organisation observes. Counting them on a calendar is slow and error-prone; Excel's NETWORKDAYS family does it in one formula, and lets you define which days are the weekend if yours is not Saturday and Sunday.

The example data

The period is December 2026: start date in A2, end date in B2. The holidays the company observes are listed in D2:D4: Christmas Day, Boxing Day (which falls on a Saturday in 2026) and New Year's Day 2027.

Weekdays only: NETWORKDAYS

=NETWORKDAYS(A2,B2) counts the Monday-to-Friday dates from the start to the end date, including both. December 2026 runs from Tuesday the 1st to Thursday the 31st and has 23 weekdays.

Excluding holidays

Give NETWORKDAYS the holiday list as its third argument:

F2fx=NETWORKDAYS(A2,B2,D2:D4)
ABCDEF
1StartEndHolidays
22026-12-012026-12-312026-12-2522
32026-12-26
42027-01-01

23 weekdays minus Christmas Day (a Friday). Boxing Day is a Saturday and New Year's Day is outside the period, so neither changes the count.

Result: 22

This shows two helpful behaviours. Holidays that fall on a weekend are not subtracted twice, and holidays outside the period are simply ignored, so you can keep one long holiday list for several years in a separate sheet and refer to it from every formula. Name the list, for example Holidays, and the formula becomes =NETWORKDAYS(A2,B2,Holidays) (Named ranges: give cells meaningful names).

Different weekends: NETWORKDAYS.INTL

In many countries the weekend is Friday and Saturday, and some businesses work six days a week. NETWORKDAYS.INTL has a weekend argument. Use a number code or a seven-character string where each character is Monday to Sunday and 1 means a day off. For a Friday-Saturday weekend, December 2026 has 23 working days:

Formula
=NETWORKDAYS.INTL(A2,B2,7,D2:D4)
WeekendCodeString
Saturday, Sunday1"0000011"
Friday, Saturday7"0000110"
Sunday only11"0000001"
Saturday only17"0000010"
Wednesday and Sunday (part-time)-"0010001"

The string form is the most flexible: =NETWORKDAYS.INTL(A2,B2,"0010001") counts the days of someone who never works on Wednesdays and Sundays.

The opposite: a date x working days later

To find a deadline, such as 10 working days after an order, use WORKDAY: =WORKDAY(A2,10,D2:D4). WORKDAY.INTL adds the custom weekend. Note that WORKDAY does not count the start day, while NETWORKDAYS includes both ends: NETWORKDAYS(A2,WORKDAY(A2,10)) returns 11 when A2 is a working day.

Microsoft 365: list the working days

To see the actual dates, generate every day of the period with SEQUENCE and keep the weekdays with FILTER and WEEKDAY:

Formula
=LET(d,SEQUENCE(B2-A2+1,,A2),FILTER(d,(WEEKDAY(d,2)<6)*ISNA(MATCH(d,D2:D4,0))))

It spills 22 dates (format them as dates). WEEKDAY(d,2)<6 keeps Monday to Friday and the MATCH part removes holidays. Wrap it in ROWS to get the count; the result is the same as NETWORKDAYS.

Excel 2016 and 2019

NETWORKDAYS and WORKDAY exist in every version since Excel 2007; the .INTL versions since Excel 2010. Everything in this recipe except the SEQUENCE/FILTER listing works in Excel 2016 and 2019 without changes.

Pitfalls

  • Both ends included. NETWORKDAYS counts the start and end day if they are working days. For "days between" excluding the start, subtract 1.
  • Holiday cells must be real dates. Holidays typed as text are silently ignored, so the count is too high. Check with =ISNUMBER(D2).
  • Start after end returns a negative count, which can look like an error. Keep the earlier date first.
  • Half days (Christmas Eve afternoon) cannot be expressed; adjust the result manually or count hours instead.
  • Regional holidays change every year. Keep the list current; a missing Easter Monday makes every count one day too long.
⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 12 KB

More how-to recipes