How to Use the NETWORKDAYS Function in Excel and Google Sheets

Learn how to use the NETWORKDAYS function in Excel and Google Sheets to calculate working days between two dates, excluding weekends and holidays.

Spreadsheets are powerful tools for organizing, calculating, and analyzing data. Among the many functions available, date calculations often pose challenges — especially when you need to exclude weekends and holidays. That’s where the NETWORKDAYS function comes in.

Whether you’re managing projects, calculating employee workdays, or analyzing business timelines, understanding NETWORKDAYS can save you hours of manual counting and help ensure accuracy in your reports and dashboards.

In this article, we’ll cover:

  1. What the NETWORKDAYS function does
  2. Syntax and arguments
  3. How NETWORKDAYS handles weekends and holidays
  4. Step-by-step examples
  5. Common use cases
  6. Errors and troubleshooting
  7. Variants and related functions

Let’s begin.


1. What Is NETWORKDAYS?

The NETWORKDAYS function is a built-in spreadsheet formula used to calculate the number of working days between two dates. “Working days” typically means Monday through Friday — excluding weekends and optionally excluding designated holidays.

Instead of manually counting dates or writing complicated formulas, NETWORKDAYS does the work for you.

This function is available in:

  • Microsoft Excel
  • Google Sheets
  • Other spreadsheet applications that mimic Excel syntax

Note: Some programs use the localized function name (e.g., “DIAS.LAB” in Spanish Excel). Here, we’ll focus on the standard English name.


2. NETWORKDAYS Syntax and Arguments

Understanding the function’s structure makes it easier to use precisely and avoid errors.

Basic Syntax

NETWORKDAYS(start_date, end_date, [holidays])

Arguments Explained

ArgumentRequired?Description
start_dateYesThe beginning date of your period
end_dateYesThe ending date of your period
holidaysOptionalA range of dates to exclude (e.g., public holidays)

Important Notes

  • Dates may be entered directly, referenced from cells, or generated by other date formulas.
  • If start_date is after end_date, some spreadsheet programs return a negative number or an error.
  • The optional holidays range must contain valid date values.

3. How NETWORKDAYS Treats Weekends and Holidays

NETWORKDAYS automatically excludes weekends — Saturday and Sunday — from its count.

Weekends

If both the start and end date fall on a weekend, NETWORKDAYS still recognizes them as non-working days:

Start DateEnd DateNetworkdays Result
SaturdaySunday0
FridaySunday1

Holidays

To exclude holidays, you supply a list or range of dates that represent non-working days (e.g., national holidays, company shutdowns). NETWORKDAYS then skips those dates when counting.

For example:

  • January 1 (New Year’s Day)
  • December 25 (Christmas)

With holidays supplied, NETWORKDAYS becomes a powerful tool for business calendar planning.


4. How to Use NETWORKDAYS: Step-by-Step Examples

Let’s walk through practical scenarios so you can see the function in action.


Example 1: Basic Working Days Count

Task: Calculate working days between January 1, 2026 and January 31, 2026.

Steps:

  1. Enter the dates into cells:

    • A2: 1/1/2026
    • B2: 1/31/2026
  2. In C2, enter:

    =NETWORKDAYS(A2, B2)
    
  3. Press Enter.

✔ The function returns the number of business days — excluding weekends — between the two dates.


Example 2: Working Days with Holidays

Imagine a business with the following holidays:

  • January 1 (New Year’s Day)
  • January 19 (Company holiday)

Steps:

  1. Put holiday dates into a range:

    • D2: 1/1/2026
    • D3: 1/19/2026
  2. Use NETWORKDAYS with the holiday range:

    =NETWORKDAYS(A2, B2, D2:D3)
    

✔ The function now excludes weekends and the two holiday dates when calculating working days.


Example 3: Using NETWORKDAYS with TODAY()

Suppose you want to calculate workdays from today through the end of the quarter.

=NETWORKDAYS(TODAY(), "3/31/2026")

This dynamic formula updates each day, so the result always reflects today’s date.


Example 4: Negative or Reverse Dates

If the start date is after the end date:

=NETWORKDAYS("3/31/2026", "1/1/2026")

Behavior varies by software:

  • Excel returns a negative count.
  • Google Sheets returns an error.

Tip: Always ensure start_date ≤ end_date or wrap your formula with ABS() to get the absolute value.


5. Common Use Cases

NETWORKDAYS is extremely versatile. Here are some real-world applications.


Project Management

Teams often need to calculate the number of workdays for:

  • Task deadlines
  • Sprint planning
  • Resource allocation

NETWORKDAYS helps by automatically skipping weekends and holidays, so project timelines remain realistic.


Human Resources

HR professionals use NETWORKDAYS to:

  • Calculate employee leave balances
  • Track attendance
  • Determine salary accruals based on working days

Payroll Calculations

Payroll systems can compute time-based compensation without counting non-pay days.

=NETWORKDAYS(pay_period_start, pay_period_end, holiday_list)

This yields accurate counts for payroll processing.


Finance and Accounting

NETWORKDAYS helps in:

  • Interest calculations
  • Billing cycles
  • Financial forecasting

For example, interest accrual might only apply to business days.


6. Errors and Troubleshooting

Like any function, NETWORKDAYS can throw errors or behave unexpectedly.

Let’s look at common issues and solutions.


#VALUE! Error

Occurs when:

  • A referenced cell doesn’t contain a valid date
  • The holiday list contains invalid values

Solution: Verify that dates are properly formatted and that the holiday range contains actual dates, not text.


Incorrect Holiday Exclusions

If the result doesn’t exclude holidays correctly:

  • Ensure the holiday list is a proper range
  • Don’t include blank cells in the holiday range

Time Zones and Date Storage

Sometimes spreadsheets store dates as text or in a different format (e.g., yyyy-mm-dd vs mm/dd/yyyy). Inconsistent formatting can cause errors.

Solution: Standardize date formats before applying NETWORKDAYS.


7. NETWORKDAYS.INTL and Advanced Variants

While NETWORKDAYS assumes Saturday and Sunday are weekends, more advanced scenarios require custom weekend definitions.

Enter: NETWORKDAYS.INTL


NETWORKDAYS.INTL Syntax

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

Weekend: A string or number defining which days of the week should be treated as weekends.

For example:

Weekend CodeWeekend Days
1Saturday & Sunday
2Sunday & Monday
“0000011”Saturday & Sunday (binary mask)
“0000110”Friday & Saturday

Binary masks use seven digits (Sun → Sat), where 1 = weekend, 0 = workday.

Example:

=NETWORKDAYS.INTL(A2, B2, "0000110")

This treats Friday and Saturday as weekends — useful in countries with non-standard workweeks.


Why Use NETWORKDAYS.INTL?

  • Countries with non-Western weekend days
  • Organizations with non-standard work schedules
  • Flexible workweek planning

For most basic cases, standard NETWORKDAYS works fine — but NETWORKDAYS.INTL gives flexibility.


8. NETWORKDAYS with Other Functions

NETWORKDAYS can interact with other spreadsheet features to create dynamic, efficient workflows.


Using NETWORKDAYS with IF

To compute conditional workday counts:

=IF(status="Completed", NETWORKDAYS(start_date, end_date), "")

This only calculates network days for completed tasks.


NETWORKDAYS and SUMPRODUCT

Combine date filtering with calculations:

=SUMPRODUCT(NETWORKDAYS(A2:A10, B2:B10))

This totals working days across many start/end pairs — helpful in batch processing.


Conditional Formatting Based on Workdays

You can highlight overdue tasks by comparing NETWORKDAYS to status columns, making dashboards more informative.


Conclusion

The NETWORKDAYS function is a powerful and often under-utilized tool in spreadsheet work. From project timelines and payroll to HR reporting and financial analysis, NETWORKDAYS simplifies calculations that would otherwise require extensive manual counting.

Key Takeaways

  • NETWORKDAYS returns the count of working days between two dates, excluding weekends.
  • Holidays can be accounted for by supplying an optional list of dates.
  • NETWORKDAYS.INTL supports custom weekend schedules.
  • Combining NETWORKDAYS with other functions unlocks advanced automation and reporting workflows.

Whether you’re a beginner or an advanced spreadsheet user, mastering NETWORKDAYS helps make your data calculations more accurate, efficient, and insight-driven.