Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

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 / Calculate the number of days between two dates

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

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

Count / Calculate the number of workdays / weekends between two dates with Kutools for Excel


Add number of years / months / days / weeks to date:

Kutools for Excel’s Formulas utility contains some commonly-used formulas, such as add years to date, calculate age based on birthday and so on. With these usual formulas, you can quickly get the result that you want without remembering any formulas.

doc add days months to date 1

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


Count / Calculate the number of days between two dates


Supposing today is 3/18/2017, your vacation starts on 11/21/2016 as following screenshot shown, and you want to count how many days there are between these two dates.

doc count days 1

In a blank cell, please enter this formula =B2-B1, then press Enter key, and you will get the number of days between the two dates. See screenshot:

doc count days 2

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


Count / 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 this formula =NETWORKDAYS(B1,B2), (B1 stands for the start date and B2 indicates the end date) then type Enter key, and you will count the number of workdays excluding Sundays and Saturdays between the two dates. See screenshot:

doc count days 3

Note:

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 =NETWORKDAYS(B1,B2,B3:E3), (B1 indicates start date, B2 stands for end date and B3:E3 is the list of holidays) then press Enter key, the number of workdays which not include Sundays, Saturdays and holidays have been calculated.

doc count days 4

2. 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 this formula =SUM(INT((WEEKDAY(B1-{2,3,4,5,6})+B2-B1)/7)), and then tap Enter key, and all the workdays will be calculated. See screenshot:

doc count days 5

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(B1-{2,3,4,5,6,7})+B2-B1)/7)).

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


Count / 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.

Type this formula =SUM(INT((WEEKDAY(B1-{1,7})+B2-B1)/7)) (B1 indicates start date, B2 stands for end date) into a blank cell then press Enter key, and now you will get how many weekends between these two dates. See screenshot:

doc count days 6

Note: Another formula to introduce you to calculate the weekends in given two dates. Please apply this =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(B1&":"&B2)),2)>5)) (B1 indicates start date and B2 stands for end date).


Count / Calculate the number of workdays / weekends between two dates with Kutools for Excel

Count / Calculate the number of workdays / weekends / specific day between two dates

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

doc count days 7

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


Demo: Count / Calculate the number of weekends / weekdays / specific weekdays between two dates with Kutools for Excel

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


Related article:

How to count the number of specific weekdays between two dates in Excel?



Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Jamirulhairi · 2 months ago
    Offday Friday and Saturday
    Public Holiday 22/08/18, 23/08/2018
    Manual count for working day are 20 days.
    =SUM(INT((WEEKDAY(L3-{1,2,3,4,5})+L5-L3)/7)) --->Total working day 22
    =NETWORKDAYS(L14,L16,L18:BS19) -->Total working days 21

    Please help
  • To post as a guest, your comment is unpublished.
    Luis · 2 months ago
    Hi i need an excel formula which calculates the number of days between two dates and will give me a warning if the count is past day 28. Also if day 28 falls on a weekend or public holiday then the formula needs to account for this so day 28 becomes the next business day.
  • To post as a guest, your comment is unpublished.
    Manoj · 4 months ago
    Hi,
    I need to compute the no. of days by month wise between the dates excluding weekends and holidays. Can you please help to derive that
    From 01-01-2018
    To 05-03-2018
    Holidays 15-01-2018 26-01-2018 10-02-2018 04-03-2018
    No. of days in JAN = ?
    No. of days in FEB = ?
    No. of days in MAR = ?
    • To post as a guest, your comment is unpublished.
      skyyang · 4 months ago
      Hello, Manoj
      May be there is not a direct formula for solving your problem, but, you can set the data as following screenshot shown, and then apply this formula:
      =NETWORKDAYS(A2,B2,$D$2:$D$5)
      Please try it, hope it can help you!
      • To post as a guest, your comment is unpublished.
        Manoj · 4 months ago
        Hi Skyyang,
        I have huge data to compute and between two long period dates. Can you please help to compute with the two different month range date.
        Thanks.
      • To post as a guest, your comment is unpublished.
        Manoj · 4 months ago
        Hi Skyyang,
        In your explanation, start date and end date are from same month. But I need to know how to compute, if start date and end date are different month. For Ex: START date: 1 Jan 2018 to END date: 31 Mar 2018. I want to find the days by month wise.
  • To post as a guest, your comment is unpublished.
    Mahbub · 6 months ago
    Hello,


    If there are some many days and some days are double or triple then how we can count the number of days between bigger and smaller days (removing duplicate days)
  • To post as a guest, your comment is unpublished.
    Sandip Trivedi · 7 months ago
    Hello, today is 17.06.2018 and past date is 05.04.2018 than how many days in beetwin both dates? How to calculate in excel by mentioning only dates.
    • To post as a guest, your comment is unpublished.
      skyyang · 7 months ago
      Hello, Trivedi,
      Your date is not real date format, you should convert them to normal date format, and then apply the above formula in this article.

      If you don't know how to convert them to date, you can apply a feature Convert to date of Kutools for Excel as following screenshot shown: