Excel Formula to Subtract Non-Working Days From Total Days

📅 Feb 25, 2026 📝 Sarah Miller

Manually tracking project timelines while accounting for weekends and holidays is a tedious process prone to human error. While standard date subtraction offers a quick estimate, it fails to reflect true operational schedules. Fortunately, leveraging specialized Excel functions grants you automated accuracy and seamless timeline tracking. Note the stipulation: for precise calculations, you must maintain a dedicated, updated holiday list. By utilizing proven industry-standard tools like the NETWORKDAYS and NETWORKDAYS.INTL formulas, you can seamlessly exclude non-working days. Next, we will explore the exact step-by-step formulas to implement this in your spreadsheets.

Excel Formula to Subtract Non-Working Days From Total Days

When managing projects, calculating payroll, or tracking service-level agreements (SLAs) in Microsoft Excel, you frequently need to find the number of actual working days between two dates. Simply subtracting the start date from the end date yields the total calendar days. However, real-world schedules require you to subtract non-working days-such as weekends and public holidays-to find the net working days.

Excel provides powerful, built-in functions designed specifically for this purpose. In this comprehensive guide, we will explore how to use the NETWORKDAYS and NETWORKDAYS.INTL formulas, as well as alternative manual subtraction techniques, to accurately compute working days under any schedule constraint.

The Fundamental Logic of Subtracting Non-Working Days

To calculate working days manually, the mathematical equation is straightforward:

Net Working Days = Total Calendar Days - Weekends - Public/Company Holidays

In Excel, trying to build this logic using basic subtraction (e.g., End_Date - Start_Date) combined with manual counts of weekends is highly prone to errors, especially over long periods. Excel's dedicated date functions automate this process by referencing calendar calendars internally to identify weekends and comparing them against a user-defined list of holidays.


Method 1: The Standard Way Using the NETWORKDAYS Function

The easiest and most common way to subtract weekends and holidays from total days is by using the NETWORKDAYS function. This function automatically assumes that weekends fall on Saturday and Sunday.

Syntax of NETWORKDAYS

=NETWORKDAYS(start_date, end_date, [holidays])
  • start_date: The starting date of the period (inclusive).
  • end_date: The ending date of the period (inclusive).
  • [holidays]: (Optional) A range of cells or an array constant containing the dates of holidays to exclude from the working calendar.

Step-by-Step Example

Imagine you have a project starting on January 1, 2024, and ending on January 15, 2024. New Year's Day (January 1) is a non-working holiday. You want to calculate the actual working days.

  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 holiday dates in a separate range, for example, D2:D3 (with 2024-01-01 in D2).
  4. In cell C2, enter the following formula:
=NETWORKDAYS(A2, B2, D2:D3)

How Excel calculates this:

  • Total calendar days from Jan 1 to Jan 15 = 15 days.
  • Saturdays and Sundays in this range = 4 days (Jan 6, 7, 13, and 14).
  • Holidays = 1 day (Jan 1, which also happens to be the start date).
  • Result: 15 total days - 4 weekend days - 1 holiday = 10 working days.

Method 2: Custom Weekends Using the NETWORKDAYS.INTL Function

Standard Saturdays and Sundays off do not apply to every industry or region. For instance, businesses in the retail, hospitality, or healthcare sectors, as well as countries in the Middle East, often observe different weekend schedules. For these scenarios, Excel offers the highly flexible NETWORKDAYS.INTL function.

Syntax of NETWORKDAYS.INTL

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

The parameters are identical to NETWORKDAYS, with the addition of the [weekend] parameter, which specifies which days of the week are considered weekend (non-working) days.

Weekend Parameter Values (Number Codes)

You can use a specific number code to define your non-working weekend days:

Weekend Code Days of the Week Excluded (Non-Working)
1 or omitted Saturday, Sunday
2 Sunday, Monday
3 Monday, Tuesday
11 Sunday only
12 Monday only
17 Saturday only

Example: Sunday-Only Weekend

If your team works six days a week and only takes Sundays off, your formula to calculate working days between A2 and B2 (with holidays in D2:D3) would look like this:

=NETWORKDAYS.INTL(A2, B2, 11, D2:D3)

Advanced: Binary String for Custom Work Weeks

If your non-working days are highly irregular (for example, you work Tuesday, Thursday, and Saturday, meaning Monday, Wednesday, Friday, and Sunday are non-working), you can use a 7-character binary string.

Each character represents a day of the week, starting with Monday and ending with Sunday. A 1 represents a non-working day, and a 0 represents a working day.

For example, to set only Monday and Wednesday as non-working days:

  • Monday: 1 (Non-working)
  • Tuesday: 0 (Working)
  • Wednesday: 1 (Non-working)
  • Thursday: 0 (Working)
  • Friday: 0 (Working)
  • Saturday: 0 (Working)
  • Sunday: 0 (Working)
  • Binary String: "1010000"

Your Excel formula would be written as:

=NETWORKDAYS.INTL(A2, B2, "1010000", D2:D3)

Method 3: Calculating Total Days and Subtracting Non-Working Days Manually

Sometimes you need to display intermediate calculations in your spreadsheet-such as showing the total calendar days first, then calculating the non-working days, and finally subtracting them. This transparency is highly valuable for client facing reports or audit logs.

Step 1: Calculate Total Calendar Days

To get the total number of days between two dates, inclusive of both the start and end dates, use basic subtraction and add 1:

=B2 - A2 + 1

Step 2: Calculate Weekend Days

To find just the number of weekend days between two dates without calculating the working days directly, you can subtract the working days from the total days:

=(B2 - A2 + 1) - NETWORKDAYS(A2, B2)

Step 3: Calculate Holiday Exclusions

If you want to count how many public holidays fell specifically within your project's date range, you can use a combination of SUMPRODUCT or COUNTIFS against your holiday list (assuming your holiday dates are listed in range D2:D10):

=COUNTIFS(D2:D10, ">="&A2, D2:D10, "<="&B2)

This formula checks your master holiday list and counts only the holiday dates that fall on or after your start date (A2) and on or before your end date (B2).


Important Pitfalls and Best Practices

1. Use Absolute References for Holidays

When copying formulas down a column to calculate working days for multiple projects, always lock your holiday range using dollar signs (absolute references). For example, change D2:D10 to $D$2:$D$10:

=NETWORKDAYS(A2, B2, $D$2:$D$10)

Failing to lock the range will cause the holiday cell references to shift downwards as you drag the formula down, leading to missed holidays and incorrect totals.

2. Handle Negative Results Gracefully

If your starting date is chronologically after your end date, NETWORKDAYS will return a negative number. If you want to prevent negative days from cluttering your dashboard, wrap your formula inside an IF statement or an MAX function:

=MAX(0, NETWORKDAYS(A2, B2, $D$2:$D$10))

This formula guarantees that any negative result is automatically converted to 0.

3. Ensure Date Formatting is Correct

Excel calculates dates based on underlying serial numbers (where January 1, 1900, is serial number 1). If your start or end dates are entered as text (e.g., "01/01/2024" typed into a text-formatted cell), Excel might fail to calculate the formulas, returning a #VALUE! error. Always make sure your columns are formatted as "Date". You can verify this by temporarily converting the cells to "General" format; they should change to five-digit numbers.


Summary of Excel Functions

Function Best Used For Weekend Customization
NETWORKDAYS Standard Western corporate calendars. Fixed (Saturday & Sunday).
NETWORKDAYS.INTL Global teams, shift workers, part-time schedules, and custom retail hours. Highly customizable (using codes or binary strings).
COUNTIFS Isolating and auditing holiday counts within a specific date window. N/A (manually calculated against lists).

By mastering these formulas, you can seamlessly subtract weekends and holidays from any timeframe, ensuring your resource schedules, timelines, and budgets remain accurate and dynamic.

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.