Comments on: How to calculate days between dates in Excel

Are you wondering how many days are between two dates? Maybe, you need to know the number of days between today and some specific date in the past or future? Or, you just want to count working days between two dates? Whatever your task is, one of the below examples will certainly provide the solution. Continue reading

Comments page 2. Total comments: 154

  1. How many days Between 3/1/22 to 3/28/22

    where, Holidays: 3/19/2, 3/26/22
    Weekend: Friday Only
    Absent Days: 3/3/22, 3/17/22

    Please Give Solution With Details Formula

  2. Hi
    I want to find the number of days from a date till today, the issue i am facing is the date format available is mmddyy but system date format is mmddyy hence i am getting value error, plz help

  3. Hello Team,

    Greeting,
    Could you please assist me on how to find the number of days between dates that includes hours.
    please see the bellow example.

    (A) Date of arrival: 01-March-2022 05:30
    (B) Date of departure: 08-March-2022 21:45

    what is the total number of days between A to B

      1. Hello Sir!
        I'd like to ask you how to calculate total days, hour, and minutes between 2 cells that both used =int formula. Is there any formula that can be used to find the sum of those 2 cells? Thank you in advance!

        1. Hi!
          I’m not sure I got you right since the description you provided is not entirely clear. Do you want to calculate the difference or sum of cells? What does the function INT have to do with it?
          Have you tried using the formula right above your question?

          1. I'm sorry for the confusing question.
            I will provide example then :)

            I had 4 cells that contain dd/mm/yyyy hh:mm information and 2 cells that used INT function

            A. Departure from X : 07/03/2022 18:00
            B. Arrival at Y : 09/3/2022 19:30
            C. Total number of days and hours using INT function like this
            =INT(F13-E13)& "days, "&HOUR(F13-E13) & "hours, "&MINUTE(F13-E13) & " minutes"
            Result : 2 days, 0 hours, 30 minutes

            D. Departure from Y : 11/03/2022 07:10
            E. Arrival at Z : 12/03/2022 14:30
            F. Total number of days and hours using INT function
            =INT(I13-H13)& "days, "&HOUR(I13-H13) & "hours, "&MINUTE(I13-H13) & " minutes"
            Result : 1 days, 7 hours, 20 minutes

            I'd like to know if there is formula I can use to calculate total number of days for trip from X to Z based on cell C and F. Usually I calculate it manually and type it to the Total Trip Duration cell.

            Thank you :)

            1. Hi!
              Based on cells C and A, you cannot calculate anything, since text is written there. Use cells A and E.

              1. Hi I ask you a question

                In my excel sheet I have two dates 26/7/2023 and 27/7/2023 I want to display one date what a formula for it

              2. I guess I have to calculate it manually. I think using cells A and E will result total days of the trip from the start to the end without subtracting the rest days (stops at Y). It will result 4 days 20 hours 30 minutes, instead of 3 days 7 hours 50 minutes.

                Anyway, thank you for answering my question. I appreciate your help.
                Have a good day! :)

  4. Hello,

    Is there a formula that can be used to calculate the total number of days for multiple date ranges in a table? I want to to avoid creating a new column (Total Days) and then adding the total number of days together to get the grand total.

    Sample Data:

    Start Date End Date Total Days
    11/9/2018 12/5/2018 26
    12/7/2018 12/25/2018 18
    12/10/2018 12/30/2018 20

    Grand Total days = 64

  5. I'm trying to workout number of days within a period and are within a period.
    for example Start Date 01/01/2022, End Date 31/06/2022, however i only want to know the days within 02/2022 within the intial period.

    Anyhelp from anyone

    1. I really wanna know how to solve this with excel formula as well, thanks

    2. Hi!
      Sorry, it's not quite clear what you are trying to achieve. Do you want to get a list of days? Or do you need to find the sum for these days of February? Or count the number of days?

  6. Hi Sir,

    I need to find the time period 00:00 to 08:00 hrs from two dates with time, for example 12/01/22 22:00 to 14/01/22 18:00. I would like to know how many times the period 00:00 to 08:00 occurred in this date range and specifically on which dates.

    Requesting your help.

  7. HOW TO DAYS CALCULATION DATE 25.06.21 TO 08.09.21

  8. I am trying to calculate the number of days between 2 dates, ensure I am including leap year thinking plus a cap at 3 years
    start date end date
    06/26/1989 07/19/2021 = 11711 days =DAYS(B4-A4)

    end date
    07/19/2021 - (minus) = new date
    how can i cap this from going back further than 3 years? 07/19/2018
    does this formula also include the extra day when a leap year is included?

    1. Hi!
      Pay attention to the following paragraph of the article above - Count days between dates with Excel DAYS function

  9. Need a formula to show the percentage reminding for a task if the start date in column A = 7/3/2021 and the due date in column B is 12/23/2021. Need to place % it in column D.

    Thanks

  10. I Have A question suppose in a cell I want subtraction of two dates and result comes Zero Day or 1 Day or 2 Days or Minus 1 Day or Minus 2 Days. How do the cells show Day or Days including the Numbers as mentioned?

  11. Formulla

    no. Of days between two dates when end date becomes first date.

  12. days between 1-4-2020 to 31-3-2021 is 365. when we use datedif , it comes 364

    1. Hello!
      The calculation is correct, since the date 31-3-2021 means 31-3-2021 00:00:00. This day is not included in your date range.

      1. Is there a way to include the start date and end date in the calculation?

  13. Hello. I opened a blank excel 2016 document and tried. None of your formula worked. I even tried making the cells formatted into Dates and they don't work

    I used

    =b2-a2

    =days

    None of them...

  14. How to calculate yeasr, months, days, hours & minutes with total number of hours ?

  15. How to calculate difference between two dates i.e. for same day 'Ok' and for last date 'delay'.

  16. Dear Sir,

    I am ins search with a formula which can be used for - difference or Addition between 2 dates with outocme in Date only

  17. Thanks a lot for your article! now I know how easy It is.

  18. How do I calculate days between two dates in Excel(in solar calendar)

  19. Sir I want to Calculate number of days between start date & time to end date & time i.e 20-11-2020 07:00 am to 21-11-2020 07:00 am 1 day if date 21-11-2020 07:01 am then 2 days it will show if DATE IS 20-11-2020 time is any time after 07:00 am to 21-11-2020 07:00 am it calculate 1 days after 07:00 am it calculate 2 days automatically can you help me ?

    1. Hello!
      What formula are you using? What format is set in a cell with a formula? Remember that dates and times are recorded in Excel as numbers.

  20. In excel 2007 database.
    I have current date in column A, there are also dates in columns AH, AX, BI and BS.
    It would be very useful if I can replace date with days between A and each of the other 4. so number of days between A and AH, A and AX, A and BI, and A and BS. Since there are in excess of 30000 rows, it would be useful to automatically calculate the days for each row with a single formula!
    Found your articles very informative and hope you can assist with this rather strange request.
    Many thanks in anticipation,
    Stay safe,
    Regards,
    Doug

    1. Hello!
      Unfortunately, you can only replace the date in a cell with the number of days using a VBA macro. If a cell contains a date, then it is no longer possible to write a formula to it.
      If there is anything else I can help you with, please let me know.

  21. As an example, let's calculate the difference between today and an earlier date in A4:

    =TODAY() - A4

    From the above example I am trying to calculate the number of working days.
    The date Column1
    21/10/2020 In this column I would like to display the number of working days from 24/10/2020 till today

    Please help.

  22. I would like a formula to calculate 21 working days from any given date, can you help please

  23. V4-INT((V4-WEEKDAY(K4)+1)/7)-1

    i have come across this formula, i just need to understand how exactly it works.

    V4= column containing the Difference between two dates.
    K4= column containing different dates and times.

    kindly help.

  24. I want a formulae to count every month as 30 days.

    1. I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used. Give an example of the source data and the expected result.
      It’ll help me understand it better and find a solution for you.

  25. I have four columns with dates. First column in date of receipt(7/1/20), second column is date of 1st response (7/5/20), third column is IF a 2nd response is needed and fourth column is IF a third response is needed. I need a column that totals # of days from date of receipt until last response (whether 1, 2, or 3). How do I build a formula for that?

    1. Hello!
      If I understand your task correctly, the following formula should work for you:

      =MAX(A1:D1)-A1

      Hope this is what you need.

  26. I have 5 customer transactions, each on different days, displayed on different rows, there is a common customer ID - i want to understand how many days from the earliest transaction date to the most recent transaction date. ie. Calculating customer lifetime in days. Help? Thanks!

    1. Note - i could have 20k rows of customer data so cannot manually take dates to calculate. Needs to be something like IF Customer ID = "Customer ID", calculate days between Newer Date and Older Date...

      1. Hello Kathryn!
        Unfortunately, without seeing your data it is impossible to give you advice.

        I'm sorry, it is not very clear what result you want to get. Could you please describe your task in more detail and send us a small sample workbook with the source data and expected result to support@ablebits.com? Please shorten your tables to 10-20 rows/columns and include the link to your blog comment.

        We'll look into your task and try to help.

  27. Hi, Hope someone could help.
    I have 2 days the same date.
    The difference of days will be Zero, 0.
    What I want is to days to todate.
    For instance,
    A1 B1 C1
    3/29/2012 3/29/2012 A1-B1 + days till today(for instance 26 July 2020)
    Hope someone could help.
    Thank you,
    Felicia

    1. Hello Felicia!
      I don't quite understand what your problem is. Read the section "How many days between dates calculation" above. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
      It’ll help me understand it better and find a solution for you.

  28. date + days = count date
    02/06/20 + 5 = 06/06/20

    1. Hello!
      Your date 02/06/20 in its entirety looks like this: 02/06/20 00:00:00. Therefore, when you add 5 days, one of them is 02/06/2020. And then add another 4 days. We get 06/06/20

    2. plz help for how to cakculate ??

  29. Hi There,
    My question is if I want to know the days gap between 2 dates, but it should not calculate the first day. From the the second day the counting should begin.

    Here is a query -
    Start Date 10-March-2020
    End Date 15-March-2020
    Leaving Date 11-March-2020, counting should begin from 12-March-2020.
    Answer should be 4.

  30. hi
    wow networkdays is properly working.
    thank you

  31. i have to do this =b2-a2 formula for over a 1000 lines. how do i do this for the entire column?

  32. Hi there,
    It appears that DATEIF doesn't work in excel online - is there an alternate formula
    Cheers

  33. i have a query:
    i want to calculate the no of days starting from say 1st Jan, 12 AM midnight( start of day) to 5th Jan, 12 AM midnight (end of day).
    this should give me 5 days but the excel formula gives me 4 days
    how do i calculate that?

  34. What's the formula if I want to know the age of an invoice as of today?
    A1 - 9-dec-2019 (invoice date)
    B1 - 9-Jan-2020 (invoice due date)
    c1 - age as of Jan 30 (date today)
    Thanks for the help in advance

  35. Positive thinking leads to positive life, and negative thinking leads to negative life

  36. Hi
    I need to enter a third date into the argument. I am counting the number of days elapsed between a date in the past (say in cell A1) and 'TODAY' (say the formula is in Cell A2) , but I then need to add in a completion date (say in cell A3) and need the number of days to stop counting once the completion date is entered. How do I tell the formula to stop counting when that completion date is entered? Oh, I also need to tell the formula that if A1 is blank, leave A2 blank. So at the moment my formula would look like this:
    =IF(ISBLANK(A1),"",(TODAY()-A1))

  37. If the date format in your excel sheet does not reflect what is displayed on your windows taskbar, then this may not work for you. In order to fix this you can change your Regional format data with the following instructions:
    Right-click on time and choose "adjust date/time"
    Under related settings choose "Date, time, & regional formatting"
    Under Regional format data choose "Change data formats"
    Select the short date format that works for you
    Bask in the glory of solving this mystery that plagued me for longer than I care to mention.

  38. This counter is not that good... He counts first and last day. And then it is not correct. For example I need to count 90 days from 17 nov. Last day I get 15 febr. But it is not right - then I have 91 day!!! He should not count the last day...

  39. I need to include start date as well end date so what to do. I just did A2-B2+1. any other formula

  40. Hello,,
    Good Morning.
    I need Deviation in days between Actual date and Desired date as per Planner,,
    Example..
    Cell A1 is last calibration date (22 August 2019)
    Cell B1 is Next Calibration date (22 Sept 2019) calibration validity is 1 month.
    Cell A 10 is calibration done date (27 sept 2019)
    how to calculate the calibration deviation in the planner,,

  41. I need to prepare a summary of different workers. how i calculate in a single formula that how many workers we have staff cadre and are regular and contract and how many staff are regular and contract.

  42. I need help with calculating the number of holidays in a per month.
    These are the holidays for 2019:
    1-Jan-19
    9-Apr-19
    18-Apr-19
    1-May-19
    5-Jun-19
    These are the holiday for 2020:
    1-Jan-20
    9-Apr-20
    10-Apr-20
    1-May-20
    24-May-20

  43. Please i need help,find the number of days between two dates

  44. I want formula for counting days between two dates. In case of from date and to date are same so here the number of days is 1. But all above formula shows 0.

    1. =IF(AND(A=E,B=F,C=G),1,difference formula)
      here A,B,C contains date 1 and E,F,G contains second date.

  45. Hi, I need help if someone knows about excel formulas. I have an excel sheet that has an ordered date and days been ordered. But some of the cells do not have requested date, in that case, I need the cells to be empty.

  46. Count days from today. If the call is blank, shows nothing.

  47. Hi I am really stryggling with the correct formulas for these columns. I think I have them done correctly, but can't seem to figure out how to get the "Days Complete" and the "Days Remaining" in real time. So if it is completed, it should show 0, and if compared to the present I don't want it to show a negative number but just a zero for completion. HELP PLEASE!! Here are my columns and their values:

    START DATE 12/18 DAY OF MONTH* 18 END DATE 1/4 DURATION*(WORK DAYS) 14 DAYS COMPLETE* 14 DAYS REMAINING*-56 TEAM MEMBER ABC PERCENT COMPLETE ?

  48. Hi...is there a way to Calculate the # of workdays between 2 dates & then allocate them by month? I just can't seem to get any formula to work?

  49. I need a formula to calculate number of days between 2 dates. However, the number of days must be separated. Example: column A: 29/1/19 - 2/2/19, then column B = number of days for January, column C = number of day for February.

  50. Dear sir,
    I want to calculate days from date to end date i.e if vacation start from 10 jan to 20 jan, by above formula it will show 10 days but atual it is 11 days. Can you explain please

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)