Excel function

NETWORKDAYSfunction

Counts the workdays between two dates, leaving out weekends and holidays.

All versions
=NETWORKDAYS(DATE(2026,5,1), DATE(2026,5,29), H2:H3)
Clicking a date sets

May 2026

Sun
Mon
Tue
Wed
Thu
Fri
Sat

Choose "Change end date" and click another date on the calendar to change the period. Try breaking it on purpose to see the errors.

Result

19

start_date
May 1, 2026 (Fri)

The first day of the period. If it is a workday, it counts.

end_date
May 29, 2026 (Fri)

The last day of the period. If it is a workday, it counts. If it is before the start date, the result is negative.

holidays

Dates to leave out besides the weekend. They are treated as a list starting in H2 and written as a range in the formula. Click dates on the calendar to add or remove them.

What is the NETWORKDAYS function?

=NETWORKDAYS(start_date, end_date, [holidays])

NETWORKDAYS counts the workdays between two dates, leaving out weekends (Saturday and Sunday) and holidays. Use it for pay by days worked, project working days or business-day periods.

The start and end dates count too if they are workdays. Play the steps to see each day checked and only workdays numbered.

Arguments

start_date
The first day of the period.
end_date
The last day of the period. If it is before the start date, the result is negative.
holidays
Optional. Dates to leave out besides the weekend.

NETWORKDAYS examples

  1. Example 1. Workdays in May

    =NETWORKDAYS(DATE(2026,5,1), DATE(2026,5,29), H2:H3)

    21 weekdays minus 2 holidays (5/5 and 5/25): 19.

  2. Example 2. From hire date to today

    =NETWORKDAYS(A2, TODAY(), $H$2:$H$20)

    Keep the holiday range absolute when copying down.

Common mistakes

FAQ

What if the days off are not Saturday and Sunday?
Use NETWORKDAYS.INTL.
What if I swap the dates?
As in Microsoft's example, a later start date gives a negative number of the same size.