Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST TOOLS

Excel Tutorial

Excel HOME Excel Introduction Excel Get Started Excel Overview Excel Syntax Excel Ranges Excel Fill Excel Move Cells Excel Add Cells Excel Delete Cells Excel Undo Redo Excel Formulas Excel Relative Reference Excel Absolute Reference Excel Arithmetic Operators Excel Parentheses Excel Functions

Excel Formatting

Excel Formatting Excel Format Painter Excel Format Colors Excel Format Fonts Excel Format Borders Excel Format Numbers Excel Format Grids Excel Format Settings

Excel Data Analysis

Excel Sort Excel Filter Excel Tables Excel Conditional Format Excel Highlight Cell Rules Excel Top Bottom Rules Excel Data Bars Excel Color Scales Excel Icon Sets Excel Manage Rules (CF) Excel Charts

Excel PivotTables

Excel PivotTable Intro Excel Create PivotTable Excel PivotTable Values Excel PivotTable Filter Excel PivotTable Group Excel Calculated Field Excel PivotChart

Excel Case

Case: Poke Mart Case: Poke Mart, Styling

Excel Functions

AND AVERAGE AVERAGEIF AVERAGEIFS CONCAT COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS DATEDIF FILTER HLOOKUP IF IFERROR IFS INDEX INDEX MATCH LEFT LEN LOWER MATCH MAX MEDIAN MID MIN MODE NETWORKDAYS NPV OR PROPER RAND RIGHT ROUND SORT STDEV.P STDEV.S SUBSTITUTE SUM SUMIF SUMIFS SUMPRODUCT TEXTJOIN TODAY TRIM UNIQUE UPPER VLOOKUP XLOOKUP XOR

Excel How To

Convert Time to Seconds Difference Between Times NPV (Net Present Value) Remove Duplicates

Excel Cert

Excel Certificate

Excel Examples

Excel Exercises Excel Syllabus Excel Study Plan Excel Training

Excel References

Excel Keyboard Shortcuts


Excel NETWORKDAYS Function


Share

NETWORKDAYS Function

The NETWORKDAYS function is a premade function in Excel, which counts the working days between two dates.

Working days are Monday to Friday. Saturdays and Sundays are left out, and you can also leave out a list of holidays.

It is typed =NETWORKDAYS and has the following parts:

=NETWORKDAYS(start_date, end_date, [holidays])

Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;

The symbol depends on your Language Settings.

Start_date: The first date.

End_date: The last date.

Holidays: Optional. A range of dates that are not working days, like public holidays.

Note: NETWORKDAYS counts both the start date and the end date, if they are working days.

How to use the NETWORKDAYS function:

  1. Select a cell (D2)
  2. Type =NETWORKDAYS
  3. Double click the NETWORKDAYS command
  4. Select the start date (B2)
  5. Type (,)
  6. Select the end date (C2)
  7. Hit enter

Let's have a look at an example!

This table shows five Poke Mart orders (example data), with the date each order was placed and the date it was delivered. Column H has the days the Poke Mart is closed for holidays. Copy it and paste it into cell A1:

Example data

ABCDEFGH
1CustomerOrder DateDeliveredHolidays
2Ash2026-09-282026-10-022026-10-12
3Misty2026-10-012026-10-082026-11-26
4Brock2026-10-092026-10-142026-12-25
5Dawn2026-11-202026-11-302027-01-01
6Gary2026-12-182027-01-05

Note: Excel may show the dates in another format, like 9/28/2026, depending on your settings. The results are the same.

Type Working Days in D1. Type this formula in D2 and fill it down to D6:

ABCDEFGH
1CustomerOrder DateDeliveredWorking DaysHolidays
2Ash2026-09-282026-10-0252026-10-12
3Misty2026-10-012026-10-0862026-11-26
4Brock2026-10-092026-10-1442026-12-25
5Dawn2026-11-202026-11-3072027-01-01
6Gary2026-12-182027-01-0513
=NETWORKDAYS(B2, C2)

Ash's order was placed on Monday 2026-09-28 and delivered on Friday 2026-10-02. NETWORKDAYS counts Monday, Tuesday, Wednesday, Thursday and Friday, so the result is 5.

Brock's order was placed on Friday 2026-10-09 and delivered on Wednesday 2026-10-14. The weekend is left out, so NETWORKDAYS counts Friday, Monday, Tuesday and Wednesday: 4 working days.



Leave Out Holidays

Add the holidays as the third part, to leave them out as well. The holidays are in H2:H5.

Type Excl. Holidays in E1. Type this formula in E2 and fill it down to E6:

ABCDEFGH
1CustomerOrder DateDeliveredWorking DaysExcl. HolidaysHolidays
2Ash2026-09-282026-10-02552026-10-12
3Misty2026-10-012026-10-08662026-11-26
4Brock2026-10-092026-10-14432026-12-25
5Dawn2026-11-202026-11-30762027-01-01
6Gary2026-12-182027-01-051311
=NETWORKDAYS(B2, C2, $H$2:$H$5)

Monday 2026-10-12 is a holiday, so Brock's order has 3 working days instead of 4. Dawn's order has the holiday on Thursday 2026-11-26, so the result is 6 instead of 7.

Gary's order was placed on 2026-12-18 and delivered on 2027-01-05. Two holidays, 2026-12-25 and 2027-01-01, are in between, so the result is 11 instead of 13.

Note: The $ signs make $H$2:$H$5 an absolute reference. The holidays range stays the same when you fill the formula down. See Absolute References.

Note: A holiday that falls on a Saturday or a Sunday is not subtracted again. It is already left out as a weekend day.


Working Days vs. Calendar Days

If you subtract one date from another, you get the number of days between them, weekends included. This works because Excel stores dates as numbers. See TODAY.

Type Calendar Days in F1. Type this formula in F2 and fill it down to F6:

ABCDEFGH
1CustomerOrder DateDeliveredWorking DaysExcl. HolidaysCalendar DaysHolidays
2Ash2026-09-282026-10-025542026-10-12
3Misty2026-10-012026-10-086672026-11-26
4Brock2026-10-092026-10-144352026-12-25
5Dawn2026-11-202026-11-3076102027-01-01
6Gary2026-12-182027-01-05131118
=C2-B2

Note: If the results look like dates, change the format of column F to General or Number. See Number Formats.

For Ash, =C2-B2 returns 4, but NETWORKDAYS returns 5. Subtracting does not count the start date, and NETWORKDAYS counts both the start date and the end date.

Note: If the start date is later than the end date, NETWORKDAYS returns a negative number. For example, =NETWORKDAYS(C2, B2) returns -5 for Ash.


See Also

If your weekend is not Saturday and Sunday, use NETWORKDAYS.INTL, where a weekend code chooses the days off, like 11 for Sunday only.

TODAY returns the current date. =NETWORKDAYS(TODAY(), C2) counts the working days from today until the date in C2.

DATEDIF counts the complete years, months or days between two dates.


Free account

Track your progress

XP earned 0 Day streak 0 Spaces 0 League —

New

Learn in Adventure Mode W3Schools Adventure App

Coding fundamentals as bite-sized lessons and challenges.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.