How to Calculate Working Days Between Dates in Excel Excluding Custom Holidays

📅 Mar 13, 2026 📝 Sarah Miller

Project managers and financial analysts often struggle to calculate accurate project timelines when generic calendar templates fail to account for unique regional or custom corporate holidays. While standard date functions assume typical workweeks, they fall short for bespoke operational schedules. Utilizing the robust NETWORKDAYS.INTL formula grants users absolute precision over timelines by excluding specific date arrays-for example, =NETWORKDAYS.INTL(A2, B2, 1, D2:D10). As an important stipulation, your custom holiday range must be formatted strictly as serial dates to avoid formula errors. Below, we will break down the syntax, explore weekend code configurations, and master this essential tracking technique.

How to Calculate Working Days Between Dates in Excel Excluding Custom Holidays

Excel Formula to Find Working Days between Dates excluding Custom Holidays

When managing projects, tracking employee attendance, calculating service level agreements (SLAs), or planning supply chains, knowing the exact number of working days between two dates is critical. Simple calendar day subtraction (End Date - Start Date) does not cut it because it includes weekends and public holidays, which distort your operational timelines.

Fortunately, Excel provides two incredibly robust functions designed specifically for this purpose: NETWORKDAYS and NETWORKDAYS.INTL. Both functions calculate the difference between two dates while automatically removing weekends and any custom holiday list you define. In this comprehensive guide, we will explore how to use these formulas, configure custom holidays, handle non-standard work weeks, and troubleshoot common errors.


1. The Foundation: The NETWORKDAYS Function

The standard NETWORKDAYS function is the go-to tool if your organization operates on a traditional Monday-to-Friday work week, with Saturday and Sunday designated as weekends.

Syntax of NETWORKDAYS

=NETWORKDAYS(start_date, end_date, [holidays])
  • start_date: The beginning of the period you want to measure.
  • end_date: The end of the period you want to measure.
  • [holidays]: (Optional) A range of cells or an array constant containing the dates you want to exclude from the working calendar (e.g., Christmas, New Year's Day, custom corporate shutdowns).

Step-by-Step Example of Basic NETWORKDAYS

Imagine you have a project starting on January 1, 2024, and ending on January 15, 2024. You also want to exclude New Year's Day (January 1) as a custom holiday.

  1. Enter your start date in cell A2 (2024-01-01).
  2. Enter your end date in cell B2 (2024-01-15).
  3. List your custom holiday in cell E2 (2024-01-01).
  4. In cell C2, enter the following formula:
=NETWORKDAYS(A2, B2, E2)

Result: Excel will return 10. Without holidays, the total working days between Jan 1 and Jan 15 would be 11. Because Jan 1 is flagged as a holiday, Excel excludes it, leaving exactly 10 business days.


2. Advanced Flexibility: The NETWORKDAYS.INTL Function

The business world is diverse. Not every company operates on a Monday-to-Friday schedule. For instance, retail operations might only close on Sundays, or businesses in the Middle East might observe a Friday-and-Saturday weekend. To address these variations, Excel introduced the NETWORKDAYS.INTL function.

Syntax of NETWORKDAYS.INTL

=NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])

The key differentiator here is the [weekend] parameter. You can define weekends in two ways: using a predefined number code, or a custom 7-character binary string.

Using Predefined Weekend Codes

Excel maps numbers 1 through 17 to specific weekend configurations:

Weekend Code Days Designated as Weekend
1 (or omitted) Saturday, Sunday
2 Sunday, Monday
3 Monday, Tuesday
11 Sunday only
12 Monday only
17 Saturday only

Using the Binary String Method (Highly Flexible)

If your weekend schedule is highly irregular (e.g., working only Tuesday, Thursday, and Saturday), you can use a 7-character text string representing the seven days of the week, starting with Monday and ending with Sunday.

  • 0 represents a working day.
  • 1 represents a non-working day (weekend).

For example, if your company's weekend is Sunday and Wednesday, your binary string would look like this:

"0010001"

(Monday=0, Tuesday=0, Wednesday=1, Thursday=0, Friday=0, Saturday=0, Sunday=1)


3. Practical Scenario: Building a Working Days Tracker with Custom Holidays

Let's walk through a complete, practical configuration. Suppose we have a list of tasks with custom start and end dates, and a master list of corporate holidays.

Step 1: Set Up Your Holiday List

First, create a dedicated range for your custom holidays. This prevents you from hardcoding dates directly into your formulas. It is best practice to keep this list in a separate table, or even on a separate worksheet (e.g., named "Holidays").

Holiday Name Holiday Date (Range E2:E5)
New Year's Day 2024-01-01
Memorial Day 2024-05-27
Independence Day 2024-07-04
Labor Day 2024-09-02

Pro-tip: Convert your holiday list into an Excel Table (select the range, press Ctrl + T), and name the date column CorporateHolidays. This allows your formulas to auto-update dynamically when you append new dates to your holiday list.

Step 2: Write the Calculation Formula

Let's calculate the net working days for a project that starts on May 24, 2024 (Friday) and ends on June 3, 2024 (Monday), using a standard weekend configuration (Sat/Sun) while excluding our custom corporate holidays.

If your start date is in A2, end date is in B2, and your holidays are in the range E2:E5, write the following formula:

=NETWORKDAYS(A2, B2, $E$2:$E$5)

If you used a named range or Excel Table for holidays, the formula looks cleaner:

=NETWORKDAYS(A2, B2, CorporateHolidays)

Analysis of the Output:

  • Calendar span: May 24 to June 3 is 11 calendar days.
  • Weekends excluded: May 25, May 26, June 1, June 2 (4 days).
  • Holidays excluded: Memorial Day on May 27 (1 day).
  • Formula calculation: 11 total days - 4 weekend days - 1 holiday = 6 working days.

4. Advanced Calculations: Dynamic Arrays in Modern Excel

If you are using Microsoft 365 or Excel 2021, you can leverage dynamic arrays to calculate working days for entire columns without dragging the fill handle down.

Using the MAP and LAMBDA functions, you can write a single, self-spilling formula:

=MAP(A2:A10, B2:B10, LAMBDA(start, end, NETWORKDAYS(start, end, CorporateHolidays)))

This formula evaluates each pair of start and end dates from row 2 to 10 dynamically, yielding an array of working day calculations that automatically updates if you add or remove rows.


5. Troubleshooting Common Pitfalls

While working with date formulas in Excel is generally straightforward, you may occasionally encounter unexpected results. Here are the most common issues and how to resolve them:

Issue A: The Formula Returns a #VALUE! Error

This almost always happens when Excel fails to recognize one or both of your dates as actual serial date numbers. Instead, Excel is treating them as text strings.

  • How to fix: Select your date columns and ensure they are formatted as "Date". Alternatively, test the cells using the =ISNUMBER(A2) function. If it returns FALSE, re-enter the dates or use the Text to Columns wizard to convert text-based dates into Excel-recognized dates.

Issue B: The Calculation Returns a Negative Number

If your start_date is chronologically later than your end_date, Excel will calculate the difference backwards and return a negative integer.

  • How to fix: If you want to prevent negative outputs, wrap the formula in an IF statement or use ABS if you only care about the absolute variance:
    =IF(A2>B2, 0, NETWORKDAYS(A2, B2, CorporateHolidays))

Issue C: Overlapping Holidays and Weekends

A common worry is whether Excel "double-subtracts" a holiday if it falls on a weekend (for example, if Christmas falls on a Saturday).

  • The Good News: Excel's calculation engine is smart. If a holiday date in your custom list falls on a day already designated as a weekend by your formula, Excel ignores the holiday duplication and only subtracts that day once. You do not need to manually filter weekend dates out of your custom holiday list.

Conclusion

Accurate date calculation is crucial for effective resource allocation and operations. By moving away from manual calculations and utilizing NETWORKDAYS or the highly customizable NETWORKDAYS.INTL, you ensure your data remains dynamic, precise, and professional. Define your custom holiday list in a designated range, reference it securely, and let Excel handle the operational heavy lifting.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.