Excel can count the working days between two dates while excluding weekends and, when you provide a holiday list, specific holidays.

The right formula depends on whether your workweek runs Monday through Friday or follows a different weekend schedule.

Use NETWORKDAYS for a Monday-to-Friday workweek

The NETWORKDAYS function counts whole working days between a start date and an end date, including both dates when they fall on working days.

By default, it treats Saturday and Sunday as weekends.

=NETWORKDAYS(start_date, end_date, [holidays])

For example, if cell A2 contains 1/5/2026 and B2 contains 1/9/2026, enter this formula in C2:

=NETWORKDAYS(A2,B2)

The result is 5, because Monday through Friday are all working days.

If the dates span a weekend, those Saturday and Sunday dates are not counted.

Exclude holidays from the working-day count

To exclude holidays as well as weekends, provide a range containing the holiday dates.

For example, list holidays in F2:F10, then use:

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

The dollar signs keep the holiday range fixed if you copy the formula down a column.

Excel ignores dates in the holiday range that fall outside the start and end dates.

A holiday that falls on a weekend does not reduce the count again, because that date was already excluded as a weekend.

Make sure the holiday cells contain real Excel dates rather than text that only looks like a date.

You can check a cell’s format or use a date-based entry such as =DATE(2026,1,1).

The displayed date format can differ from the underlying date value.

Set a different weekend with NETWORKDAYS.INTL

If your workweek does not follow the standard Saturday-and-Sunday weekend, use NETWORKDAYS.INTL.

It lets you specify a weekend pattern while optionally excluding holidays.

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

The weekend argument accepts a number for common patterns or a seven-character string in which Monday is the first character and Sunday is the last.

A 1 marks a nonworking day and a 0 marks a working day.

For example, 0000110 makes Friday and Saturday the weekend.

For a Friday-and-Saturday weekend, with holidays in F2:F10, use:

=NETWORKDAYS.INTL(A2,B2,"0000110",$F$2:$F$10)

For a Sunday-only weekend, use weekend code 11:

=NETWORKDAYS.INTL(A2,B2,11,$F$2:$F$10)

The pattern is useful for work schedules with one weekend day or a weekend that differs by region.

Confirm the pattern against the actual schedule before relying on the result.

Count working days between, but not including, the dates

NETWORKDAYS includes the start and end dates if they are working days.

To count only the dates strictly between them, subtract the start date’s working-day contribution and the end date’s contribution:

=NETWORKDAYS(A2+1,B2-1,$F$2:$F$10)

This approach counts the days after the start date through the day before the end date. When the adjusted start date is later than the adjusted end date, the result may be negative; use an IF check if you want zero for an empty interval. If your inputs can be reversed, use MIN and MAX to establish a consistent order, and decide whether the business rule should count the boundary dates.

Make the formula handle reversed dates

When users may enter the later date first, wrap the start and end references in MIN and MAX:

=NETWORKDAYS(MIN(A2,B2),MAX(A2,B2),$F$2:$F$10)

This counts working days inclusively regardless of which date is in A2 or B2.

If the direction matters—for example, if a negative result should represent elapsed workdays in reverse—keep the original order instead of sorting the dates.

Handle common errors and edge cases

  • Start date is later than end date: NETWORKDAYS returns a negative count for a reversed range.

    Use MIN and MAX when the order should not affect the answer.
  • Dates include times: These functions count calendar dates, not partial working hours.

    If cells include time values, the day count is still based on the date portion.
  • Text dates or invalid values: Excel may return #VALUE! if a date argument or holiday entry cannot be interpreted as a valid date.

    Convert imported text to date values before calculating.
  • Start and end are the same date: The result is 1 if that date is a working day and 0 if it is a weekend or listed holiday.
  • Duplicate holidays: Repeated entries do not exclude extra days.

    Keep the holiday list clear so it is easier to maintain.

Compatibility and formula choice

NETWORKDAYS and NETWORKDAYS.INTL are available in modern Excel versions, including Excel 2010 and later, Excel for the web, and Microsoft 365.

They are also available in Google Sheets, though argument separators can depend on the spreadsheet’s locale.

In some locales, formulas use semicolons instead of commas.

Use NETWORKDAYS for a standard Monday-to-Friday schedule.

Choose NETWORKDAYS.INTL when you need a custom weekend, and add a holiday range when company or regional holidays should not count as working days.

For working hours or partial days, use a time-aware calculation instead, since these functions return whole-day counts.