Skip to main content

How to count the number of days, workdays, weekends between two dates in Excel?

Author: Xiaoyang Last Modified: 2024-09-03

Have you ever needed to count the number of days between two dates in Excel? May be, sometimes, you just only want to calculate the workdays between two dates, and sometime, you need to count the weekend days only between the two dates. How could you count the number of days between two dates in a certain condition?


Count or Calculate the number of days between two dates with formulas

To count how many days there are between two given dates, please apply any one of the following fromulas:

=DATEDIF(A2,B2,"D")
=B2-A2

Then press Enter key, and you will get the number of days between the two dates. See screenshot:

Calculate the number of days with a formula

Note: In the above formula, A2 indicates the start date, and B2 indicates the end date. You can replace them as your need.

a screenshot of kutools for excel ai

Unlock Excel Magic with Kutools AI

  • Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
  • Custom Formulas: Generate tailored formulas to streamline your workflows.
  • VBA Coding: Write and implement VBA code effortlessly.
  • Formula Interpretation: Understand complex formulas with ease.
  • Text Translation: Break language barriers within your spreadsheets.
Enhance your Excel capabilities with AI-powered tools. Download Now and experience efficiency like never before!

Count or Calculate the number of workdays between two dates with formulas

But sometimes, you just want to find out the number of workdays (from Monday to Friday), the above formula will not work for you. In this case, here are two functions can help you to deal with this problem.


1. Using NETWORKDAYS function to count the number of workdays

In a blank cell, please enter the below formula:

=NETWORKDAYS(A2,B2)

Then type Enter key, and you will count the number of workdays excluding Sundays and Saturdays between the two dates. See screenshot:

Using NETWORKDAYS function to count the number of workdays

Note: In the above formula, A2 indicates the start date, and B2 indicates the end date.


2. Using NETWORKDAYS function to count the number of workdays but exclude the holidays

Sometimes, there may be some holidays during the two date, if you want to calculate the business days between these two dates, you should exclude Saturdays, Sundays, and holidays. This NETWORKDAYS function also can help you.

The syntax for the NETWORKDAYS function is: = NETWORKDAYS ( Start_date , End_date , Holidays )

Type the holiday dates into the cells that you want to subtract from the dates, then enter this formula into a blank cell where you want to get the result:

=NETWORKDAYS(A2,B2,$C$2:$C$6)

Then press Enter key, the number of workdays which not include Sundays, Saturdays and holidays have been calculated. See screenshot:

Using NETWORKDAYS function to count the number of workdays exclude the holidays

Note: In the above formula, A2 indicates start date, B2 stands for end date and C2:C6 is the list of holidays.


3. Using SUM and INT function to count the number of workdays

Except the NETWORKDAYS function, there is another formula could help you to get how many workdays between two dates.

In a blank cell, enter or copy the below formula:

=SUM(INT((WEEKDAY(A2-{2,3,4,5,6})+B2-A2)/7))

And then tap Enter key, and all the workdays will be calculated. See screenshot:

Using SUM and INT function to count the number of workdays

Notes:

1. Sometimes, you have 6 workdays per week (from Monday to Saturday), so you need to calculate the number of workdays including Saturdays but excluding Sundays. In this case, you can apply this formula:

=SUM(INT((WEEKDAY(A2-{2,3,4,5,6,7})+B2-A2)/7))

calculate the number of workdays including Saturdays

2. In the above formulas, A2 stands for the start date and B2 indicates the end date.


Count or Calculate the number of weekend days between two dates with formulas

Here also have some formulas to count only the number of weekend days (Saturdays and Sundays) in a given period for you. Please enter or copy any one of the two formulas:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2)>5))
=SUM(INT((WEEKDAY(A2-{1,7})+B2-A2)/7))

Then press Enter key, and now you will get how many weekends between these two dates. See screenshot:

Calculate the number of weekend days with a formula

Note: In the above formula, A2 indicates start date, B2 stands for end date.


Count or Calculate the number of workdays, weekends between two dates with a useful feature

To count the number of weekdays or weekends between two given dates, Kutools for Excel’s Formula Helper utility which contains some commonly used formulas, you can apply them to calculate ages, word appears and so on.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...
Note:To apply this Formula Helper, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Click a cell where you want to locate the result, and then click KutoolsFormula Helper > Formula Helper, see screenshot:

click Formula Helper feature of kutools

2. In the Formulas Helper dialog box, do the following operations:

  • Select Statistical option from the Formula Type drop down;
  • In the Choose a formula list box, select Number of non-working days between two dates or Number of working days between two dates you want to use;
  • Then, in the Arguments input section,select the cells which contain the start date and end date separately.
  • At last, click Ok button to get the result as following screesnhot shown:

set options in the dialog box


Count or Calculate the number of days, weeks, months or years between two dates

With Kutools for Excel's Date & Time Helper feature, you can quickly get the various difference results between two dates based on your need without remembering any formulas, such as weeks + days,months + weeks and so on. Click to download Kutools for Excel!

Calculate the number of days, weeks, months or years by kutools

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!


More relative date and time articles:

  • Calculate Hours Between Times After Midnight In Excel
  • Supposing you have a time table to record your work time, the time in Column A is the start time of today and time in Column B is the end time of the following day. Normally, if you calculate the time difference between the two times by directly minus "=B2-A2", it will not display the correct result as left screenshot shown. How could you calculate the hours between two times after midnight in Excel correctly?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!