Excel NETWORKDAYS Function
The Excel NETWORKDAYS function calculates the number of working days between two dates. NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and can optionally exclude a list of holidays supplied as dates.
NETWORKDAYS includes both the start date and end date when calculating work days. This means if you give NETWORKDAYS the same date for start date and end date, and the date is not a weekend or holiday, it will return 1.
NETWORKDAYS can also optionally take into account holidays. For the holidays argument, supply a range that contains holiday dates. These are also treated as nonworking days and will not be included in the result.
 start_date  The start date.
 end_date  The end date.
 holidays  [optional] A list of nonwork days as dates.
The NETWORKDAYS function counts the number of working days (business days) between two dates, automatically excluding weekends (Saturday and Sunday) and optionally excluding holidays. For example, with a start date in A1 and end date in B1:
=NETWORKDAYS(A1,B1) // will exclude weekends
The NETWORKDAYS function can also exclude holidays supplied as a list of dates. For example, with holiday dates in C1:C5:
=NETWORKDAYS(A1,B1,C1:C5) // exclude weekends and holidays
NETWORKDAYS can be used to calculate employee benefits that accrue based on days worked, the number of working days available during a project, the number of working days required to resolve a customer support issue, and so on.
Notes:

NETWORKDAYS calculates whole work days, ignoring any time values.

NETWORKDAYS will automatically exclude both Saturday and Sunday. If you have a custom weekend schedule, see the NETWORKDAYS.INTL function.

NETWORKDAYS includes both the start date and end date when calculating work days. This means if you give NETWORKDAYS the same date for start date and end date, it will return 1.