Comments on: How to calculate time in Excel - time difference, adding / subtracting times

The tutorial explains different ways to calculate times in Excel and demonstrates several methods of adding times and calculating time difference. You will learn a few useful formulas to sum times and add hours, minutes or seconds to a given time. Continue reading

Comments page 23. Total comments: 1029

  1. How can we change the real time to accumulative time:

    11:20:32
    11:32:36
    11:41:28
    11:53:36
    12:02:48

    how can I change this to
    0
    12
    .
    .
    .

  2. Hi, I need your help please let me know how to calculate the difference between two date using networkdays formula.

    exp: Start date 4/12/16 3:51 PM and end date 4/20/16 5:00PM.

    currently I am using below formula,
    =IF(INT(AJ3-F3)>0,INT(AJ3-F3)&"d","")&IF(HOUR(AJ3-F3)>0,HOUR(AJ3-F3)&"h")

    Above is not working for networkdays.

    Please suggest.

  3. HI, I need help with a time formula. C1 is 13:40, C2 is 16:40 and C3 gives me the difference of 3:00. I have these formulas set up. What i am trying to do is check another cell, (C5) for "specific text" prior to returning a result of C3 as the full value (3:00) or half value (1:30) to C6.

    Thanks in advance
    Doug

  4. HI, I need help with a time formula. C1 is 13:40, C2 is 16:40 and C3 gives me the difference of 3:00. I have these formulas set up. What i am trying to do is check another cell, (C5) for "specific text" prior to returning a result of C3 as the full value (3:00) or half value (1:30) to C6.

    Thanks
    Doug

  5. =A2 + TIME(2, 0, 0)

    hello

    thanks a lot it was very good but I have a question.

    I want to add one hour to my time but I have a large data in one column, how can I write the formulation to apply it for whole of the data in the column once?

    thanks in advance

  6. I've been reading up on Excel's date and time functions and can't really figure out the best way of doing this. Any input would be appreciated.

    (Start Date/time) A1 = 11/25/2016 14:00
    (Hour to fix) B2 = 20 hours
    (Fix date/time) C1 = fix time?
    Business hour = Mon - Sun 08:00 - 20:00

    I'd like to enter a date and time into a cell (Start Date) and have another cell return the date and time that the machine should be done with the task including weekends (End Date). This would be based on a certain number of "business hours" that would be calculated in another cell.

  7. I'm Trying to Subtract the Below said wrong time format, Answer should be =30, Please help me

    A1 = 03.00PM
    A2 = 2:30 PM

  8. Hi,

    I need to calculate day wise hour wise penalty.

    In a day (24 hours) exemption hours are 20 (total 24 months).

    If down time is > 4 hours in a day, Per Hour Rs.200/- penalty.

    Pls share formula..

  9. Best explanation I have ever seen... Many thanks to Svetlana Cheusheva.

  10. I am trying to calculate total hours worked in a day with the result being in number instead of time. For Example 8.5 instead of 8:30. Using clock in(C27), lunch out(G27), lunch in(H27), clock out(L27) to calculate total hours. I am using =(L27-H27)+(G27-C27). I also have the cell with the results formatted as (Custom [h]:mm). What can I add to the formula or how should I format the cell to change the results to my liking?

  11. i am calculating day and month difference in twodays
    cell a1 07/07/2016
    cell b1 07/10/2016
    formula =TEXT(B1-A1,"m") it displaying 4 but the difference in month is 3

    =TEXT(B1-A1,"dd") its displaying 1 but the difference in days should b 0

    plz revert

    and plz let me know also can v calculate years in two dates

  12. does anyone have a template?

  13. I would appreciate help with formulas for the following:
    Sign in time: 9:35am
    Minus max duty day: 18 hours
    Minus debrief: 30 minutes
    Minus flying time: 14 hours, 20 minutes
    What I need is the final time after the above calculations.

    Thank you!

  14. I would like to calculate end time.
    I have Start time and number of hours but looking to calculate end time. Example: Start time 5 am, 9 hours, can you help me calculate end time in excel? I have 350 entries.

  15. Hiii.,
    I need a formula for creating a sheet in excel for notification means today is 25th Oct 2016, so i need from 25th to every 29days have to remind in excel and auto deduct amount on 29th day of every month.

  16. Many of the help requests posted here exhibit a basic misunderstanding about how Excel looks at time. When we see hh:mm we may be thinking "duration", and 29 hours 57 minutes makes perfect sense to us. When Excel sees hh:mm it always thinks "clock", and I've never seen a clock with 29 hours marked on the face.

    On a blank Excel spreadsheet, pick an empty cell formatted as "General" (default). Enter "hello" in that cell. Note that the format didn't change.

    Now replace "hello" with "7:30". Did the format of the cell change to "Custom (h:mm)"? Look at the Formula Bar. Does it say "7:30:00 AM"? That's a clock reading. We may have meant 7 and a half hours, but Excel understood it as 7:30 AM.

    Now enter two durations, 14:27 and 19:42, in cells A1 and A2. In A3, sum A1 and A2.

    We expect a sum of 34:09, but we get 10:09 instead. Why? Excel is adding clock times, and there's only 24 hours on the clock. So Excel's answer is 1 day, 10 hours and 9 minutes. But cell A4 doesn't automagically format as d:hh:mm. It formats as h:mm, so all we see is 10:09 - the hours and minutes. Now change the format on cell A3 to d:hh:mm, and it will make more sense.

    But we really wanted the result in just hours and minutes, not days. Enter this into cell A4 to convert the total to hours and minutes:
    =DAY(A3)*24+HOUR(A3)&":"&TEXT(MINUTE(A3),"00")

    Note that cell A4 is formatted as General. That isn't an Excel date/time format, so we can't perform math functions on/with it.

    Excel dates are basically integers - one for every day starting with 1/1/1900. For example, 6/6/2016 is day number 42,527.

    Excel times are decimal numbers representing a portion of a day, and there are 86,400 seconds in a full day. 11:53:15 equates to
    11 hours x 60 minutes x 60 seconds
    + 53 minutes x 60 seconds
    + 15 seconds,
    or a total of 42,795 seconds. Dividing that by 86,400 seconds, we see that 11:53:15 converts to 0.4953125 days.

    So Excel represents 6/6/16 11:53:15 AM as 42527.4953125.

    Because dates and times are just numbers to Excel, they can easily be added and subtracted. The results can be formatted simply as numbers, or in a goodly number of standard date/time formats.

    If the result of your date/time manipulations don't look right, check the cell format - there may be more data there than meets the eye.

    And if you want the results of date/time manipulations to be formatted in some way other than the standard Excel date/time formats, do all the math first using standard formats - then convert the results to the format you require.

  17. That did the trick. Thank you!!!

  18. I need to add seconds with the final result of minutes and seconds i.e. 30+30+15+5 which sums to 1 minute and 20 seconds and should display as 1:20. Anyone have any idea of a formula that will work?

    1. Enter your seconds in col A as numbers.
      =SUM(A:A)/(86400) {formatted as "m:ss"}

  19. I'm trying to create a time sheet to calculate the hours for the employee where I need to round up In time and out time by quarters and deduct lunch break. For example

    In time Break In Out Out time
    08:09 = 8:15 13:00 13:50 17:38 = 17:45 Total???

    How can I formulate the last column into calculate the total hours worked?

    Thank you!

    1. Viktoria,
      Per the rules as stated (starttime 8:00 = 8:00, starttime 8:01=8:15; similar for stoptime; breaktimes not adjusted to quarter-hours), this should work for the Total column (E):
      =(HOUR(D1)+CEILING(MINUTE(D1)/15,1)/4)/24-(HOUR(A1)+CEILING(MINUTE(A1)/15,1)/4)/24+B1-C1

  20. I answer phones virtually and I am trying to calculate the total # of mm:ss.
    Each call I take has a total talk time. So like I took 6 calls.
    4:23 4:23
    1:45 6:08
    2:24 8:32
    2:00 10:32
    5:36 16:08
    10:52 3:00 (This should be 27:00). But anything over 24:00 won't calculate correctly. So how do I fix this?

    1. You think you're entering minutes:seconds, but you're actually entering hours:minutes, which is why anything over 24 minutes goes haywire.
      Format the columns as "mm:ss", but enter the data as h:m:ss - in other words enter 0:5:36 instead of 5:36. Then just subtract col A from col B.
      02:00 10:32 08:32

  21. i need over time formula
    eg.
    a2 09:00 b2 18:00 (c2 ans =a2-b2 we get 09:00)

    but we need over time after this result we want -08:00 hour working day
    if i do b2-a2-08:00=######

    what is the perfect formula for over time result will you help me please

    1. =B2-A2-8/24
      (subtract 8/24 of a day rather than 8 hours)

  22. i want formula for
    3:15 pm to 12:15 am

    if 12:15 am - 3:15 pm = ######
    what is correct formula for it how it is come
    12:15 am - 3:15 pm = 9:00

  23. Hi, I am trying to find the average for response times.
    Here is a sample of data. I have 1,607 entries.

    0:04:50 0:04 04:50 04:50
    0:23:16 0:23 23:16 23:16
    0:11:12 0:11 11:12 11:12
    0:20:38 0:20 20:38 20:38
    0:00:15 0:00 00:15 00:15
    0:02:59 0:02 02:59 02:59
    0:03:32 0:03 03:32 03:32
    0:02:54 0:02 02:54 02:54
    0:13:58 0:13 13:58 13:58
    19 11:14 7075:11:14 7075:11:14
    days hours minutes

  24. I need to figure out the total time worked by an employee. we have a program that time stamps every action they make. I need to subtract any time gaps over 15 minutes and then total the time. Please help.

    16:21:47 '06/25/2016
    16:21:43 '06/25/2016
    16:21:37 '06/25/2016
    16:21:37 '06/25/2016
    16:21:37 '06/25/2016
    16:21:34 '06/25/2016
    16:20:43 '06/25/2016
    16:19:57 '06/25/2016
    16:19:57 '06/25/2016
    16:19:57 '06/25/2016
    16:19:50 '06/25/2016
    16:19:48 '06/25/2016
    16:19:48 '06/25/2016
    16:19:47 '06/25/2016
    16:19:36 '06/25/2016
    16:19:35 '06/25/2016
    16:19:14 '06/25/2016
    16:18:58 '06/25/2016
    16:18:52 '06/25/2016
    16:18:46 '06/25/2016
    16:18:46 '06/25/2016
    16:18:21 '06/25/2016
    16:18:14 '06/25/2016
    16:17:55 '06/25/2016
    16:17:55 '06/25/2016
    16:17:55 '06/25/2016
    16:17:55 '06/25/2016
    16:17:55 '06/25/2016
    16:17:55 '06/25/2016

    1. Add column B for gaps of 15+ minutes:
      =IF(A1-A2>1/96,A1-A2,"")
      Then hours worked =LARGE(A:A,1)-SMALL(A:A,1)-SUM(B:B)
      {this presumes the same date for all timestamps}

  25. oops

    =IF(AND($Login = start time),1,0) which is
    =IF(AND($H3=M$2),1,0)

  26. I want to populate "1" for the time between login and logout
    currently Im using =IF(AND($Login=Start time),1,0) wich is =IF(AND($H3=M$2),1,0). however for the time login 10:30PM and loug out time is 7:00 am it does not give a required results . Could anyone help me on this

  27. hi,
    I want to subtract 11/09/2016 8:20:00 PM - 12/09/2016 2:00:00 AM

  28. i want to multiply time by currency with if statement like
    1:10 if time is 1:10 show me $150
    how i can make this astatement in excel

  29. Hello,

    I am Adam and just joined this forum. Could anyone help to calculate time durations in excel when data (In and Out) like in punch cards are in adjacent column and row. Is there any formula to handle this situation.

    Thank you

  30. Hello I m Sufiyan

    How to Calculate in Time and Out Time suppose here workers punching machine but machine showing this type timing 15:02:00 .but i need in one cell in time and other cell out time i need this type formula who came before 11:30:00 then will be in time and after 11:30:00 then out time
    =IF(AND(L2>TIME(11,30,0),L2<TIME(24,0,0)),"out time","in time") i m using this formula but not getting accurate result
    L2 is timing 15:02:00

    pls suggest formula

  31. A have several times in one column. first cell is starting time, last cell is ending time. Multiple combinations where number of cells between starting and ending time is not same number.
    I need to calculate durations for each.

    thanks in advance

  32. Please give me a positive feedback soon!!!!!!!.

  33. 8/22/2016 2:20:00 PM
    8/19/2016 4:35:00 PM
    how to calculate total time
    pls suggest formula and send to my mail ID

  34. in cell A1 : 26-08-2016 05:00:00 AM
    In cell B2 : 26-08-2016 10:00:00 AM

    we required starting time to ending time with a fixed interval like 00:15 or 00:30 or 01:00

    Suppose for 01:00 hr interval we required in another sheet
    A1: 05:00
    A2: 06:00
    A3: 07:00
    A4: 08:00
    A5: 09:00
    A6: 10:00

    Suppose for 00:30 hr interval
    A1: 05:00
    A2: 05:30
    A3: 06:00
    A4: 06:30
    A5: 07:00
    A6: 07:30
    A7: 08:00
    A8: 08:30
    A9:09:00
    A10:09:30
    A11:10:00

  35. Thank you so much.. its very helpful.

  36. Hi All,

    How to find the difference between 2 dates in the below format in either hours/Min.

    5/13/2016 1:20:39 PM and 5/15/2016 10:00:00 AM.

  37. I have a time set as 12:00 AM in A2.
    In B2 I try =A2-(1/24) and =A2-TIME(5,0,0)
    both give me ################################

    1. Hi Derek,

      Excel shows hash marks because your formula returns a negative value, and Excel cannot display negative times. If instead of 12:00 AM, you had, say, 12:00 PM, both formulas would work fine.

  38. I need to convert time logged into a computer from logged in time on a time card.

    Example:
    A1=Logged on for 10(hours):04 (minutes):00
    B1=Logged working hours for 10.0
    needing Column C1 to be the difference...which would be =00:04:00

    Implying the person worked 4 minutes over the 10 logged hours on the time card.

    I tried converting to many different numbers but can't seem to figure it out. Help please (-:

  39. Hi Need Help!

    i have two time A1 = 9:30 AM B1 = 12:30 PM

    Difference of hours = B1 - A1 = 03:00 hours

    Total days is 19 - Now i need to calculate no of hours per day * total days
    ie: 3:00 hours *19 , answer should be 57 hours

    but i am unable to get this - please help

  40. Hi,

    I need a formula for working out my extra hours worked - I should work 37.5 hours but often do over this and would like to be able to show this on my time sheet - how do I subtract my contracted hours from my hours worked in hours and minutes?

    Thanks!

  41. I never found such a useful and coherent information at a single page .

    It helped me a lot in my long pending project.

    Greate Work.

  42. sunsunj j7 of sell 499. oder 2 phone

  43. hi have a good day ..
    how to solve this problem.. ?
    what is the formula of time difference

  44. Hi, I'm wondering if you can help, and I'm sorry if you have covered this already. I looked bit couldn't find exactly what I was looking for.
    Basically, I work 44 hrs a week. I'm wanting to work out if my hours are in the plus or minus
    My dates are in A2 to A53. Hours worked in that week B2 to B53, and total will be in D2. I need D2 to show me if I'm at zero or plus/minus in my hours
    Hope you can help.
    Thanks

    1. D3 =AVERAGE(B:B)-44
      [format as "[Green]0.###;[Red]0.###;0"}

  45. Thanks so much ,so usefull

  46. Hi,

    I have query. How to I calculate the time difference of two given times as:

    A1= 23:40 & B1= 00:30+1

    I want to calculate the difference between B1-A1.

  47. Request Help Please.

    I need to calculate time elapsed if time is greater than 6:00pm.

    Cell 1: = 5:50
    Cell 2: = 7:50
    Answer: 1
    Logic: Only the 2nd hour was counted because the service rendered was beyond 6pm was equivalent to 1 hr only

    Cell 1: = 5:50
    Cell 2: 8:50
    Answer: 2
    Logic: 2 hours were beyond 6:00pm

    Basically what is being counted is the time that elapsed beyond 6:00pm only

    Thanks!

    Franz

  48. I need to find to total time work for a employee change clock in and out on a different times of the day where
    A1=5:00 am
    A2=9:52 am
    A3=11:15 am
    A4=2:00 pm

    What is the formula to find the total time?

  49. I am trying to enter time into Excel for MAC as minutes and seconds but no matter time format I select it doesn't seem to be correct. I've tried using the format [h]:mm:ss or [mm]:ss and others and the cell shows just hours and minutes but the formula bar shows it as time in a 12-hour format with AM.

    Is there a way to have the formula bar also just display minutes and seconds and not time as in a clock?

  50. I am trying to find the average of cells that includes (in one cell) the following information:

    [# days, # hours, # minutes, # seconds].

    The 'average' function built into Excel doesn't seem to be able to calculate that information. Does anyone have any advice? I am not savvy with custom functions.
    Thanks!

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 :)