NETWORKDAYS.INTL function

Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days. Weekend days and any days that are specified as holidays are not considered as workdays.

Syntax

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

The NETWORKDAYS.INTL function syntax has the following arguments (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure.):

  • Start_date and end_date    Required. The dates for which the difference is to be computed. The start_date can be earlier than, the same as, or later than the end_date.
  • Weekend    Optional. Indicates the days of the week that are weekend days and are not included in the number of whole working days between start_date and end_date. Weekend is a weekend number or string that specifies when weekends occur.

Weekend number values indicate the following weekend days:

Weekend number Weekend days
1 or omitted Saturday, Sunday
2 Sunday, Monday
3 Monday, Tuesday
4 Tuesday, Wednesday
5 Wednesday, Thursday
6 Thursday, Friday
7 Friday, Saturday
11 Sunday only
12 Monday only
13 Tuesday only
14 Wednesday only
15 Thursday only
16 Friday only
17 Saturday only

Weekend string values are seven characters long and each character in the string represents a day of the week, starting with Monday. 1 represents a non-workday and 0 represents a workday. Only the characters 1 and 0 are permitted in the string. Using 1111111 will always return 0.

For example, 0000011 would result in a weekend that is Saturday and Sunday.

  • Holidays    Optional. An optional set of one or more dates that are to be excluded from the working day calendar. holidays shall be a range of cells that contain the dates, or an array constant of the serial values that represent those dates. The ordering of dates or serial values in holidays can be arbitrary.

Remarks

  • If start_date is later than end_date, the return value will be negative, and the magnitude will be the number of whole workdays.
  • If start_date is out of range for the current date base value, NETWORKDAYS.INTL returns the #NUM! error value.
  • If end_date is out of range for the current date base value, NETWORKDAYS.INTL returns the #NUM! error value.
  • If a weekend string is of invalid length or contains invalid characters, NETWORKDAYS.INTL returns the #VALUE! error value.

Example

The example may be easier to understand if you copy it to a blank worksheet.

ShowHow do I copy an example?

  1. Select the example in this article. If you are copying the example in Excel Online, copy and paste one cell at a time.
    Important: Do not select the row or column headers.

Selecting an example from Help

Selecting an example from Help

  1. Press CTRL+C.
  2. Create a blank workbook or worksheet.
  3. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Online, repeat copying and pasting for each cell in the example.
    Important: For the example to work properly, you must paste it into cell A1 of the worksheet.
  4. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.

 
1

2

3


4

5
A B
Formula Description
=NETWORKDAYS.INTL(DATE(2006,1,1),DATE(2006,1,31)) Results in 22 (31 days; 5 Saturdays, 4 Sundays)
=NETWORKDAYS.INTL(DATE(2006,1,31),DATE(2006,1,1)) Results in -22
=NETWORKDAYS.INTL(DATE(2006,1,1),DATE(2006,2,1),7,{"2006/1/2","2006/1/16"}) Results in 22 (32 days; 4 Fridays, 4 Saturdays, 2 Holidays)
=NETWORKDAYS.INTL(DATE(2006,1,1),DATE(2006,2,1),"0000110",{"2006/1/2","2006/1/16"}) Results in 22

 Note    In Excel Web App, to view the result in its proper format, select the cell, and then on the Home tab, in the Number group, click the arrow next to Number Format, and click General.

 
 
Applies to:
Excel 2010, Excel Web App