Calculating Time in Excel

Short Survey, Win a Prize

Calculating time in Excel can be very frustrating, especially when all you want to do is sum a column of times to get the total, but for some reason you end up with a random number like in the example below.

Calculating time Example

Let me explain what’s going on and how to calculate time in Excel.

Since time is a concept rather than a mathematical equation, Excel has come up with systems for handling dates and times whereby they are given a numerical value.

Download the Excel workbook and follow along.

Dates in Excel

Excel gives each date a numeric value starting at 1st January 1900.

1st January 1900 has a numeric value of 1, 2nd January 1900 has a numeric value of 2 and so on…  These are called ‘serial values’, and they enable the use of dates in calculations.

Times in Excel

Times are seen as decimal fractions. 1 being the time for 24:00 or 0:00.  12:00 has a value of 0.50 because it is half of 24 hours, or the whole number 1, and so on.

To see Excel’s value for a date or time, simply format the cell as general.

For example the date and time of 1st March 2008 9:30:30 AM has a true value of 39508.39618.

39508 being the serial value representing the date 1st March 2008, and .39618 being the decimal value for the time 9.30AM and 30 seconds.

Although the above is important to know, thankfully Excel has built in formatting so that we don’t have to enter our dates and times in serial or decimal values.

However it’s the lack of understanding of these serial and decimal values for time that cause common errors when performing calculations on time.

The Secret to Calculating Time in Excel

If you want to sum time (as in my example above) you need a custom format that uses [ square brackets ] around the hours.  Like this:

You can see in the Sample box the correct total appears.  This way I know I’ve formatted my time correctly.

These square brackets instruct Excel to add the hours.  Without them it will reset the sum to zero every time it gets to 24 hours.

There’s no need to modify the formatting of the minutes with square brackets as they automatically add up.

Note: in some versions of Excel when you insert a formula it will automatically apply the correct formatting to give you the total.  Just be sure to check the total is reasonable or check the formatting is as stated above.

This square bracket time formatting requirement also applies when using other operators like +/-.

What if you want to sum seconds to find out the total seconds?

While this isn’t the wrong answer, I want to know the total number of seconds, not how many minutes and seconds there are.  To do this you’d need a custom number format like this:

time formatting

You can see from the sample box I now get 237 seconds, instead of 3 minutes 57 seconds.

This can also be applied to minutes or hours.  Just change the formatting to [mm] or [h] respectively.

Time x rate to calculate wages or charge out fees

I quite often want to calculate wages or a charge out fee.  But if you don’t know this trick you’ll be tearing your hair out…and probably revert to using fractions like 7.50 for 7 hours 30 minutes, just so you can get the answer you expect.

While entering halves or quarters of an hour as fractions is fine as, it becomes a hassle when your billing increments come down to 10 minutes or any other fraction you can’t calculate in your head….unless you’re superhuman!

Thankfully the solution is simple.  Just multiply by 24 like I have in the example below.

Time calculations

Timesheets to Calculate Time Worked

Below is a fairly basic timesheet layout.  You can see in the formula bar that the time calculation is performed as a simple equation =I4-I2-I3.

I’ve done some funky formatting to the cells to assist the person keying in the time:

  • Rows 2 and 4 are formatted with h:mm AM/PM.  The employee has to type in their time as you see it in the cell for the formatting to work correctly.  The advantage to this is they don’t need to convert their finish time to a 24 hour clock style.  The disadvantage is a bit more typing with the need for the AM or PM distinction.  Swings and roundabouts.
  • Rows 3 is formatted with h:mm “h:mm”. This adds the text h:mm to the end of the value for presentation purposes.  The employee only needs to type in 0:30 for a half hour lunch break, and Excel will add the h:mm to the end.
  • Row 5 is formatted with [h]:mm “h:mm” to ensure the hours are added correctly.

You can then calculate wages using the total figure in cell N5 with the Time x Rate formula above.  Of course this doesn’t take into account overtime and penalty rates.  That lesson is for another day.

Is there a time calculation that you’d like me to cover? Let me know by leaving a comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Current ye@r *


  1. Janice says

    Trying to set up a timesheet formula that will take the time in/out for total hours but if ½ hour lunch do not deduct the time, if more than ½ hour lunch only allow the ½ hour to be paid
    Employee works 8 – 4, takes a ½ hour lunch = hours to be paid 8
    Employee works 8-4, takes 1 hour lunch = hours to be paid 7.5.
    Employees are allowed a ½ hour lunch period that is paid, but if they take a longer lunch, will have to work additional time to cover

    • Catalin Bombea says

      Hi Janice,
      You can try this formula:


      A2 is Time In, B2 is Time Out, and C2 is Lunch time. All cells are formatted as time, not as normal decimal format, half hour should be typed as 00:30 in C2, not 0.5.
      If you need more help, you can open a new ticket on our Help Desk, with a sample file attached, it will be easier to work with your data.
      You have to decide what the result should be when there is no Lunch Time in C2, maybe there are employees on a diet :). In this case, the formula provided will result in 8:30, not only 8 hours. You can try this version, in this case, if lunch time is 0, the result will be 8:00, not 8:30:



  2. Mats Berggren says

    Great work! I have been looking at several sites for something that helps me calculating work times in hours and minutes. You are the first to show how simple it is by using the correct cell format. Many thanks! :)

      • Mats Berggren says

        Now I trying to calculate flextime which works fine as long as it is a positive result, but when it is a negative result I get the error (#####). What cell format or formula should I use? This is my formula for flextime:
        where E39 is the sum of worked hours/minutes for this month and F4 is hours per day (8) and the COUNT checks how many days I have worked on this month, i.e. have data on. I use the cell format [t]:mm for all fields.

        • Mynda Treacy says

          Hi Mats,

          The problem is you can’t have a negative time. This post shows you how to deal with it under the heading “Shift Work Timesheets and Overtime”.

          Kind regards,


  3. Wesley says

    I’m trying to figure out how to get the average time from a date/time cell series.

    So, for example, I have a row a cells with the following format: “date”, but I write the time in the cell as well, so it looks like 01/13/2016 11:29 AM

    I then have a cell that takes the average of that row.

    The problem is the average cell is showing PM for times that are all AM and vice versa. How can I average a date/time series to just show the average time including the right AM/PM?

    • Catalin Bombea says

      Hi Wesley,
      Can you please upload a sample file with your data structure on our Help Desk? (create a new ticket). It will be easier to provide a personalized answer. There is no obvious reason for a wrong answer, it may be a data type problem.

  4. Juanita Kapp says

    Hi , Please can you help me . I need to calculate the age of invoices , from todays day .
    say date today : 26/11/2015
    invoice date 6/14/2010
    How do i do this ?


    • Catalin Bombea says

      Hi Juanita,
      The result should be in days , months or in years?
      You can take a look at this tutorial, you will find the answer here.

  5. Glory Denard says

    Good morning I’m trying to understand Military time. I work at Wal-Mart and I don’t understand military time at all. Thank you for your support and concern, hope that I can get the format of it. Thanks

    • Catalin Bombea says

      Hi Glory,
      Military times are identical to 24 hours format, not to AM/PM format. Hours are displayed from 1 to 24, 2 PM will be 1400 in military format, or 14:00 in normal 24 hours format , 4:26 PM will be 1626 (16:26 in 24 hours format)(the only difference between military and 24 hours format is that they do not use the colon to separate hours from minutes). To convert from AM/PM to 24 hours format, for example 5:10 PM, just add 12 hours to those 5 hours, and you will have 17:10 in 24 hours format (1710 in military time)
      As you can see , it’s fairly simple :)

  6. Kevin Z says

    I am trying to set up a simple spreadsheet to calculate pizza dough times.

    I want to be able to put in a time that I want the dough ready and have the spreadsheet calculate when to mix the dough.

    The variables are the fermentation time can change based on the dough type and sometimes a starter is added which can add 18 hours to the total time. Fermentation times are usually 24 or 48 hours.

    So say for example I want the dough ready to use on a Friday at 4 pm . I need 48 hours fermentation and 18 hours for the starter. what time do I start the process?


    • Catalin Bombea says

      Hi Kevin,
      Use this setup in A1:E2:
      Day Needed Ferm. Time Starter time Start Ferm. at: Start starter at:
      19/11/2015 8:00 48:00:00 12:00 17/11/2015 8:00 18/11/2015 20:00
      In Start Ferm. at: D2, the formula is simple: =A2-B2, for Start starter at: use =A2-C2
      In another column, you can fin the lowet start date: =MIN(D2,E2)

  7. Pete says

    Hi, I am trying to find a way to build a worksheet to do subtraction of hours and minutes. I have large numbers (Example 12,000:42) and want to subtract 3,724:58 from it. There are also times I will need to add similar figures. I would like to do this in excel for several reasons, for one I need to process multiple subtractions from the first number, and I would also like to be able to print the results at times. I have Excel 2013, but none of my research has led to a workable solution. Any advice you can offer would be very much appreciated.



    • Catalin Bombea says

      Hi Pete,
      You can easily substract 3724:58:00 from 12000:42:00, you will simply deduct the cells: =B1-A1
      However, if they are not the result of a calculation, times bigger than 9999:99:99 cannot be typed directly in a cell, you have to use a trick for that:
      =SUM({12000,42,0}/{24,1440,86400}). You have to edit only the first constants array, the second array represents hours per day, minutes per day (24*60) and seconds per day (24*60*60)
      The result cell should be formatted as: [h]:mm:ss to display times larger than 24 hours.

  8. Jim says


    I have a raw data set that displays Name, Start Pull Time, Stop Pull Time, and Filled Time as columns. A name can appear multiple times within an hour (1st 9:00, 2nd 9:15, 3rd 9:35). I then need to look for the last filled time (say 9:50). Once that is determined, I need to subtract the last filled time from the 1st start time to determine the total amount of time the person spent working in the 9 O Clock hour. I cannot do it individually because I would be double counting time.

    Basically, trying to find a formula to find/match the name, then check and see the first start time, then see the last start time for that person in that hour and subtract the last fill time.

    Here is a sample data

    Athlete Name Bin Range Start Pull time Stop Pull Time Stop Fill time
    Jim Bin 1-5 09:00:00 09:15:00 09:45:00
    Nithin Bin 25-35 09:10:00 09:16:00 09:45:00
    Jim Bin 15-30 09:16:00 09:35:00 09:45:00
    Mike Bin 99-110 09:01:00 09:30:00 09:45:00
    Swoosh Bin 23-45 09:17:00 09:23:00 09:45:00
    Jim Bin 210a-220b 09:46:00 10:10:00 10:25:00

    • Catalin Bombea says

      Hi Jim,
      Try this file from our OneDrive folder: Start time-last fill time
      The formula used is:
      It’s an array formula, press Ctrl+Shift +Enter to enter this formula.
      Not sure if i understood right the requirements, the first part of the formula (LOOKUP) is extracting the last fill time in that hour for that person, and the second part, with index match, will extract the first start time in that hour for that person.
      The formula is in F7 in the file attached.
      If the last fill time is in the current row, you shoud remove the LOOKUP, and use current row:
      To handle situations where there are no other hours in the same hour, you will have to use the current row to calculate the time:
      Again, array formulas.

      • Jim says

        Thank you for your help. This looks like it might help. I will continue to play around with the formula.

        One last question, if i am trying to find the difference between two times but want to keep it in the answer in a general format cell how would i do that? It seems that it always wants to default back to h:mm


        A1 9:00 formatted in h:mm
        B1 9:55 formatted in h:mm
        Result C1 55 general format

        • Catalin Bombea says

          Hi Jim,
          If you format the cell as Number, it should stay that way if you are not reediting the formula cell.
          You can try also this in C1: =TEXT(your formula here,”#,##0.00000″). Keep in mind that the result of the formula is a text string, not a number, if you want to use it in other calculations.

  9. Kerri says

    I am doing an electronic patient log. I am trying to use it to help me with statistical information. It is filling in other forms in real time. the patients time spent is calculated by the majority of hours spent on either an am 7A-7P shift or a pm 7P-7A shift I need to calculate the number of patients that spent the majority of time here in the am or pm

    • Catalin Bombea says

      Hi Kerri,
      Please prepare a sample file with your data structure and open a new ticket on Help Desk, it will be easier to help you with a personalized solution based on your layout.
      As a general solution, you need a fairly simple formula to add them: =SUMPRODUCT((rng1>=7/24)*(rng2<=19/24)) , where 7/24 is the number corresponding to 7 AM and 19/24 is the number corresponding to 7 PM. Cheers, Catalin

  10. Kris Rutko says

    I have a combobox on a form that the user can select a time in increments of 15 min. The rowsource is a simple list on an excel sheet from 12:00 pm to 12:00 am. Funny thing happens when user selects 12:00 pm on the list, the box value becomes 12:05 am. Also when the user selects 6:00 pm, the value shown in the box becomes 12:25 am. Why is this? On the combobox CHANGE event, I have a format command using h:mm. Should it be [h]:mm?

    • Catalin Bombea says

      Hi Kris,
      Can we take a look at your file? Looks like not the formatting is the problem, might be the calculation you are doing with those times, because 6:00 pm + any number of 15 min increments will not make 12:25, it should make 12:00, or 12:15, or 12:30.
      You can upload the file on our Help Desk (open a new ticket)

  11. Darren Allen says

    Calculating time where the entries are simplified with minimum typing by using the format 0\:00. The totals do not add up correctly with the same format. I have attempted all other formats available with no success. Is the a different format or a separate calculation that needs to be used? Time is of the essence (no pun intended). Please advise. Thank you!

    L.E: How do I add time worked and subtract time away (lunch) when the format used is 0\:00 for input simplicity. All available format codes give wrong answers. Please advise, Thank you.

    • Catalin Bombea says

      Hi Darren,
      Please upload a sample file on our Help Desk (open a new ticket), it will be easier to help you with a personalized solution to your problem.

  12. imane says

    hi Mynda
    i have a project for school in VBA (my vrsn in 2010)
    and i’m asked to calculate the time between 2 clicks on the command button of the userform using the function Now ,then i have to place the difference of the two moments as integer in the column with this equation
    the pb is that the difference is always zero even if i wait for 5 min so i can’t find how to program the now function PLUS it’s giving me overflow in the time equation
    thank you in advance ^_^

    • Catalin Bombea says

      Hi Imane,
      An integer can hold values up to 32767, this is the source of error. If the command button is the same always, you have to store the value of the NOW function, to be able to deduct it next time you click.
      You can use a tag property to store it:

      if len(CommandButton1.Tag)=0 then exit sub
      CommandButton1.Tag=Now() ‘ update the new value for the next click

      • imane says

        thank you catalin
        but it’s still not working
        when i’m clicking nothing’s changing on the sheet even in the simplest case i applied (Range(“A1”).value=time

        • Catalin Bombea says

          Hi Imane,
          Only if I see your code I will be able to help, I have no idea what is your code doing. Upload a sample file with your code on Help Desk (open a new ticket)

  13. Rebecca says


    I’m attempting to find the formula to work out the hours between 2 times. I think the problem I’m having is the final time is midnight ie 00:00. For example I would need it to work out 19:30 – 00:00.

    Thank you

  14. Eraweti says


    I want to know how to make a formula or rather excel to calculate some data for me.
    The data is –

    Length of greyhound (e.g. 4.5 lengths)=Time Allowance (e.g. 0.31sec)

    What I want to know is how do i make excel calculate for me if I just enter the Length of greyhound and excel gives me the time allowance. Example –

    I enter in excel 4.5 into cell A1, excel then gives me answer 0.31 into cell A2.

    Is there a method or formula for this?

    Your feedback will be much appreciated. =D

    • Mynda Treacy says

      Hi Eraweti,

      It’s more of a math problem than a formula.

      In another cell, say D1 enter =0.31/4.5
      In cell A2 enter =A1*D1

      This will give you .31. Just remember this is a decimal representation of time. i.e. 31% of 1 second or 0.31 seconds, so if your result exceeds 1 minute then it will also be fractions of minutes. e.g. 1.5 minutes is 1 minute 30 seconds.

      Kind regards,


    • Eraweti says

      Hi Mynda,

      Ty for the reply.

      So far I have done this –

      Cell A1 I enter 0.1 Cell B1 I enter =0.1/0.1 Cell C1 I enter =A1*B1.Answer in Cell C1 has 0.1

      Basically I have entered into Column A all the lengths.
      In Column B I have entered equals sign Time allowance Divided by length.
      In Column C I have entered equals sign Nominated Cell multiplied by Nominated Cell.

      I got another question, If I enter all my data into excel, can i set excel to do the same calculation automatically ?

      • Mynda Treacy says

        Hi Eraweti,

        Sorry, but your question isn’t making sense to me. Why would you divide 0.1/0.1? I thougt you wanted length divided by time to give time per length?

        Can you please upload your Excel file via the help desk and give me examples of the results you’d like for 3 different rows so I can understand the math you want and translate that into a formula.


  15. David says

    Hi, I am trying to do an ongoing (more than 7 days) timesheet in Excel 2013 on Window2s 10. Hours worked formula is SUM(D3-C3)*24 which gives correct hours. I then add these summed hours in an autosum – SUM(E3:E12) which also gives the correct number of added hours. BUT when I multiply that referenced field E13 by either a number of hourly rate, or a reference to a cell with that number in it, the result is wrong by several cents (answer=$473.75). I can determine this by typing the calculated numbers into another cell as 13.54*35 which gives $473.90. Any idea what is going wrong?

  16. Johan says

    Hi, I do a training session where 1 minute is equal to one day, 5 minutes equal to a work week. We neglect weekends.

    I am trying to do a simple countdown timer for 240 minutes that can show me which “week” and which “day” we are currently in, so teams can do theiractivity accordingly.

    It is probably some division activity but I seem not to be able to accomplish it.

    Please provide some advise.

    thank you

    • Catalin Bombea says

      Hi Johan,
      If we have 28 “minutes”, this will give you the week number: =INT(28/5), and this is the day: =(28/5-INT(28/5))*5
      You can replace the number 28 from the formulas with a cell reference, to make it dynamic.

  17. Chris Benner says

    I am trying to write and “If” statement in excel and I am striking out.

    cells column “K” I have average hours worked for my employees. 42:30:00 and 21:02:12 and 12:56:36 and so forth, straight down the column.

    In column “L” I am trying to get the following “If” statement to work:
    =IF(K2=>30:00:00,1,IF(K2<30:00:00,0)) Meaning if the hours in column "K" are greater
    than 30 hours plug in a "1" into the cell in column "L" if the hours in column "K" are less than 30 hours then plug in a "0" into the cell in column "L"

    However excel will not recognize this formula.

    Can you please help me figure this one out?

    Thank You!

    • Catalin Bombea says

      Hi Chris,
      Date and times are special in excel. The cell contains a number, which remains a number, no matter if it’s formatted to LOOK like: 30:00 or 30:00:00 or any other format.
      You should refer to the value of the cell. To see the real value behind the time format, format the cell as Number, not time. Now you can use that value in your formulas. 30 hours will be : =30/24 , which is 1.25, this is the value you should use.

  18. DONNA WALKER says

    I need to set up a timesheet for employees who work 24 hour shifts. Example 7:00 am to 7:am the following day. No lunch breaks. Is there a way to do this.

  19. Alison Stewart says

    How can you get an average of lap times. For example, I am running 8 laps of the field and time each lap. I then want to find my average lap time. I have tried the custom format but it automatically creates a clock time – AM or PM

    • Catalin Bombea says

      Hi Alison,
      please upload a sample file on our Help Desk, it will be easier to provide a personalized soluton for you. Normally, if you use the AVERAGE function and format the cell as hh:mm, it will be enough. If you want the result in decimal system, you have to multiply the result by 24: =AVERAGE(….)*24, with the cell formatted as General or Number.

  20. Shalaka says

    in time is 9:36:00
    out time is 18:53:00
    hours worked =9:17:00
    required hrs =9:30:00
    the diff between hrs req and hrs worked is = -0:13:00 formula used==IF(D2>E2,”+”,”-“)&TEXT(ABS(D2-E2),”h:mm:ss”)

    As I want to add the diff between hrs req and hrs worked there are many records sum times the employee worked extra time den +1:14:00 is displayed and sumtyms if he worked less den -0:13:00 is displayed but as I am adding these records it shows 0:00:00
    please provide solution as soon as possible

  21. Cindy Stoeckl says

    I am trying to do an automatic sprinkler schedule. I have 24 zones, Run Time, and Start time. Zone 1 starts at 6 pm and runs for 20 minutes, which makes zone 2 start at 6:20. I want the start time to change based on how many minutes I enter as Run Time. So if I typed in 25 minutes in zone 2, it would make zone 3 start time 6:45. Can’t figure out how to format so the time adds the minutes and then displays new time. Thanks for your help.

    • Catalin Bombea says

      Hi Cindy,
      You can use this formula: =A1+$D$1/24/60 , in D1 you should type the interval in minutes (20, or 25, or any number of minutes), in A1 is the start time for the first zone. The formula will convert the number of minutes typed in decimal system to time system.

  22. Debbie says

    I would like to calculate the difference between total hours worked and total hours paid.
    Say I have 26.10 hours worked and total hours paid was 32, the difference is coming up as 5.90 but I need it to read as 5.50. I’m new to formulas so I’ve not been able to figure this out.


  23. will wakeman says

    Hi, I am trying to combine a logical argument in Excel 2010 that returns an “on time” display when subtracting a late arrival time (hh:mm) – 15 minute cushion from a scheduled time also in hh:mm.

    So, if the difference between scheduled time and arrival time is 00:00 or less than person is “on time”, if not than formula should display lateness in minutes – again hh:mm.

    • Catalin Bombea says

      Hi Will,
      If in cell A1 we have 8:00 (the scheduled time), and in B1 the arrival time, 8:25 for example, the following formula will give you the result you want:

  24. Amanda says

    I would like to calculate a time delay between dates i.e. over 24 hours.

    Example: Visit to MD on 2013-07-12 at 07:00 and Antibiotics stared on 2013-07-13 at 23:59.
    My excel will not calculate this.

    • Catalin Bombea says

      Hi Amanda,
      If you type 12/07/2013 7:00 in A1 and 13/07/2013 23:59 in B1, a simple operation will give you the result:
      =B1-A1 will result in 40:59 , if you custom format the cell with this format: [h]:mm , or, if you want the result in decimal sistem, not in time format, use =(B1-A1)*24 this will result in 40.98333333.

  25. Sean B says

    Can some one possibly help me with the formula. we have 2 shift running and the over lap AM to PM and night shift goes from PM to AM and in getting these problems.

    Cell 1 Cell 2 Cell 3
    Start time End Time Completion Time
    10:15 PM 12:15 AM ########### ( error code ) times are negative or to large to display?

    Any help would be great!!

    • Catalin Bombea says

      Hi Sean,
      12:15 AM minus 10:15 PM is negative, excal cannot display negative times. To avoid this, you have to check if the result if negative and add a day:
      =IF(B1-A1<0,B1-A1+1,B1-A1)*24 (the result is in decimal system, remove *24 if you want the result in time format)

  26. Rafiq says

    I need to calculate hours and minutes of two given time ranges i.e. 10:00 pm to 2:00 am which returns error. Ideally this should return 4:00 hours.

    • Catalin Bombea says

      Hi Rafiq,
      2:00 AM minus 10:00 PM is negative, excal cannot display negative times. To avoid this, you have to check if the result if negative and add a day:
      This cell must be formatted as numeric, it will show 4 as the result. If you want the result in time format, remove that *24 that converts time format to decimal format.

  27. Leo Andre says

    What formula can be used if for example. your schedule is 10:00am and you are late . your time in is 10:06am how can i get the 6 minutes late? and you need to minus that 6 minutes in 90 minutes. so became 84 minutes. what formula i will use. thank you.

    • Catalin Bombea says

      Hi Leo,
      Assuming that in A1 we have actual time (that 10:06), in A2 the Start Time (10:00), you can use =90-(A1-A2)*24*60 . The result will be 84, this cell must be formatted as number, not time format.

  28. Eric Fritsche says

    I have a list of tasks with duration times. Each task must be done in order with the start time of task #2 equal to the finish time of task #1 and so on. I would like to calculate the finish times of each task in the list but take into account the work schedule. A task cannot complete outside of the standard scheduled work hours.

    • Catalin Bombea says

      Hi Eric,
      Without a file to see how data is organized, all i can say is that you need a formula to do that :)
      Please upload a sample file with all the details you can give, it will be a lot eaqier to understand the situation. Use our Help Desk system.

  29. Scott says


    I’m having a problem.
    I have a time/date in the same column
    ex: “0800 26JAN2015”
    I want extract the time so I can compare it to other times to get the minute difference. I first separate by “text to column” to get the time alone in a column to work with. Once I’ve done this my time comes up as 800. This is were I run into problems. I want to get it in custom format for hour and minute {t}:mm but I get 19200:00 instead of 08:00?? Can you help?


    • Catalin Bombea says

      Hi Scott,
      You can use a formula to extract the time, and reformat it to a time format:
      =TIMEVALUE(LEFT(LEFT(A1,FIND(” “,A1)-1),2)&”:”&RIGHT(LEFT(A1,FIND(” “,A1)-1),2))
      Text to columns returns a number, 800 hours, not 8 hours.

  30. Bob says

    Hi I am working with excel 2010.. and I am working on time logs.. I have gotten the spread sheet to do as required up to a point.. it adds the individual days hours ( ok so 31 hours now I want to subtact 4 hours on the spread sheet to show final hours for the week… just cant seem to figure this out.. the 31 is formatted in hours minutes what do I format the 4 to? And the sum? Thanks bob

    • Catalin Bombea says

      Hi Bob,
      Please prepare a sample workbook with your calculations and details on what are you trying to do, and sent it to us using the Help Desk, it’s hard to say what’s going on without seeing the data and formats.
      Thanks for understanding,

  31. Ted says

    That is great to know, since I have to do exactly that to pay someone.
    It would have been nice to have the example include the pay rate and total pay.

    However two minor things were left out that would have helped:
    1. You have to enter the 5:30 PM time as 17:30 (24 hour clock) or else you will get 5:30 AM
    2. If you compute the pay, (which is the reason for all the work above), you must multiply the hours X pay-rate X 24.

    I was initiall befuddled because when I multiplied a pay rate of $9.00/hr * 8:30 h:mm on Monday, I got $3.00 instead of $72.


    • Mynda Treacy says

      Hi Ted,

      Glad you found it helpful.

      You can enter the time as ‘5:30 PM’ but you have to type in the “PM” for Excel to know which ‘5:30’ you mean.

      In the 3rd paragraph under the “Time x rate to calculate wages or charge out fees” heading I state that you must multiply it by 24 but I obviously could make it clearer if you missed it.

      You might also find this tutorial useful:

      Kind regards,


  32. Vanessa Barrs says

    I am trying to set up a time sheet to calculate daily hours worked with in/out times for lunch. However, some days there is no lunch taken, and other days the time out is the next day; e.g.,:

    A B C D E F
    4 Tuesday 9:00 AM 1:00 PM 2:00 PM 1:30 AM 15.50
    5 Wednesday 9:00 AM 5:00 PM 32.00
    6 Thursday 9:00 AM 1:30 AM 40.50

    This formula calculates Rows 4 correctly: =((IF(C4>B4,C4,C4+1)-B4)+(IF(E4>B4,E4,E4+1)-D4))*24; but F5 and F6 both return an incorrect results when there is no in/out for lunch. What am I doing wrong? Please note: all of the formatting should be as shown above.

    • Catalin Bombea says

      Hi Vanessa,
      You can add a new check to your calculation, to calculate the second IF only when column E is higher than 0:


      Note that *(E4>0) at the end of the second IF statement, this will multiply the IF function with 0 if column E is empty, and with 1 if there is a value higher than 0 in column E, so it will not change the result of IF calculation.

      • Vanessa Barrs says

        Thanks Catalin. This works perfectly except where there is no in/out for lunch, or on rows (days) where there is no time entered (in which case the result should be 0, which I have conditionally formatted to have white text so the cell appears blank). The complete worksheet is below and may better explain. As you can see, Rows 4,5,7 and 8 still do not calculate properly:

        1 Date Log in Lunch OUT Lunch IN Log Out Total Hours
        2 Monday 9:00 AM 1:00 PM 2:00 PM 8:00 PM 10.00
        3 Tuesday 9:00 AM 1:00 PM 2:00 PM 1:30 AM 15.50
        4 Wednesday 9:00 AM 5:00 PM 32.00
        5 Thursday 9:00 AM 1:30 AM 40.50
        6 Friday 9:00 AM 1:00 PM 2:00 PM 8:00 PM 10.00
        7 Saturday 24.00
        8 Sunday 24.00

        9 TOTAL 156.00

        • Catalin Bombea says

          Glad to here that it works :)
          But who is stopping you to apply the same method on the first IF statement to disable it if there are empty cells?



  33. Guy says

    I’m attempting to come up with a way to determine elapsed time between two events. The format for the start-time and end-time are in the form: ddhhmmZ MMMyy, where dd=day, hhmm are hours & minutes, ‘Z’ indicates GMT, and will appear in all time/day entries, MMM = the month abbreviated to three capital letters, and the yy = the last 2 digits of the year. The output should be in the form: ddD hhh mmm, or dd”D” hh”h” mm”m” where the “D” “h” and “m” characters appear in the output as letters, minus the “” marks.

    I think I can come up with a way of doing this, but so far I’m still working on it. Unfortunately the format requirement is pretty rigid.


    • Catalin Bombea says

      Try setting the result cell to a custom format like : dd”D” “GMT” hh”H” mm”M” . Change this format as needed.

  34. Russell says

    how do i get the total (21:30) to show as a fraction i.e 21.5hrs
    D E F G
    START FINISH LUNCH hours worked
    10:30 14:30 00:00:00 04:00 Formula used is Exx-Dxx-Fxx
    10:30 14:30 00:00:00 04:00
    10:30 15:30 00:00:00 05:00
    18:00 22:30 00:00:00 04:30
    10:30 14:30 00:00:00 04:00
    00:00 00:00 00:00:00 00:00
    00:00 00:00 00:00:00 00:00

    21:30 (total of Gxx:Gxx

    • Catalin Bombea says

      Hi Russell,
      That result of 21:30 must be multiplied by 24 (if G10 contains the formula =SUM(G1:G9), change it to =SUM(G1:G9)*24) and cell G10 should be formatted as a number, not as time.

  35. Maureen Preece says

    I am calculating schedule maintenance and have worked out the hours per task, but now need to break into one working day, cannot find anything to help with this and as there is thousands of activities and does take huge amount of time to do manualy?

    thanks Mo

    • Catalin Bombea says

      Hi Maureen,
      Please send us a sample file with your calculations and details on what you are trying to achieve, a manual example of expected result will be very helpful for us to understand exactly what you need.
      Use our Help Desk to upload the file.

      • Maureen Preece says

        HI Catalin
        I emailed you the file few weeks ago, just wondering how you were going with a solution?
        thasnk mo

        • Catalin Bombea says

          Hi Maureen,
          Seems that you did not used our Help Desk system to upload your file, as adviced. Anyway, it’s my fault that i missed your 24 nov. email.
          You have a reply by email.

  36. mawi says

    is this about like hmmm… i don’t now how to explans. i found it for excamples if it is 9.30 am on tuesday, what will the the date and time be in 49 1/2 hours? that’s what i meant

    • Catalin Bombea says

      Hi Mawi,
      Type in a cell 11/11/2014 03:22:00, format the next cell as [h]:mm then type 49:30 . Then, in another cell, just add those 2 cells with a simple sum: =A1+B1
      The final cell should be formatted as: d/mm/yyyy h:mm AM/PM, it will show 13/11/2014 4:52 AM.
      Is this what you wanted?

  37. Robin says

    Monday employee was late by 8 minutes (7.52)
    Tuesday employee was late by 13 minutes (7.47)
    Wednesday employee was on time
    Thursday employee is on a rest day
    Friday employee is on a rest day
    Saturday employee was on time
    Sunday employee was on time
    Total of 38.99
    I took 60 minutes away from the 99 minutes
    I believe the time should convert to 39 hours and 39 minutes

    • Catalin Bombea says

      Hi Robin,
      Now i understand where the error comes from.
      Excel works by default in decimal system. The date system used in excel is considering a day as beeing 1 unit.
      The system is described in this article, right from the beginning: Times are seen as decimal fractions. 1 being the time for 24:00 or 0:00. 12:00 has a value of 0.50 because it is half of 24 hours, or the whole number 1, and so on.
      There is a huge difference between 7:50 and 7.50, and this is the point where you are making a confusion between decimal system and time system.
      7:50 is a time format, and means 7 hours and 50 minutes. But 7.50 is in decimal system, where integers are days, and hours are fractions of a day! 7.50 means 7 days and a half!
      Considering that a day is 1 integer, and a day has 24 hours, 1 hour is equal to 1/24 days, that means that 1 hour equals to 0,041666667
      days (=1/24), is that correct?
      Times under 24 hours cannot be over the value for 1 day (which is 1, of course). 8 hours represents 1 third of a day, that can be written in decimal system as =1/3=0.3333 , not 8 integers! 12 hours is half a day, so it represents 0,5 units in decimal system.
      You should learn these things, and you will never have problems again with times. Try this: instead of typing 8, 8, 8, 7.52, 7.47 in those 5 cells, type the values in time system: type 8:00, 8:00, 8:00, 7:52, 7:47. In the next column (considering that you typed those times in A1:A5, type in cell B1 this simple formula: =A1, and copy it down to B5. Format column A as time, and column B as number. You should have now in column B these numbers: 0.3333, 0.3333, 0.3333, 0.3278, 0.3243; in column C, type =B1*24, or =A1*24 (as those columns holds the same values, only the formatting is different); you will get: 8, 8, 8, 7.87, 7.78; the sum of these 5 values is 39.65, and this is in decimal system, if you want to convert it back to time system, divide it by 24: 39.65/24=1.652083. Format this cell as [h]:mm and you will see 39:39 for the value 1.652083, this value means 1 day and almost 2 thirds of a day.
      Hope i removed some clouds :)

    • Catalin Bombea says

      38.99 converts to: 38 hours and 59 minutes.
      38 hours and 39 minutes coresponds to 38.66 in decimal system, and the result is very simple to evaluate, because 39 minutes represents almost 2/3 from an hour, and 0.66 is 2/3 from 1 unit in decimal system.
      Can you explain why should 38.99 convert to 39 hours and 39 minutes?

  38. Robin says

    How about lateness or early quits. For the week the total using excel is 38.99. How do I convert this time to 39 hours and 39 minutes

    • Catalin Bombea says

      Hi Robin,
      To convert 38.39 from excel’s decimal system to sexagesimal system (time is in this system), just divide by 24: =A1/24, make sure you’ve formatted the cell as [h]:mm, the result should be 38:23.
      For other question, you better open a ticket on our Help Desk system, if you still need an answer.

  39. helen orchard says

    Hi can you tell me why is it when I put down 4pm start and 1am finish (night shit) it calulates the wrong hours ?

  40. Giorgio Iurcotta says

    Hi, you said Overtime is going to be in another lesson, did you post this already?
    Here is my question. Thank of you I figured out how to sum the working hrs of the days minus the breaks.
    Now, I tried to put a formula that says =IF(Cell_Total hrs>8, Cell_Total hrs-8, 0) in this case I should see the overtime (after the 8th hr) hours but it doesn’t work with the time format. If I can figure this out I’d like to change the entire sheet with a formula like this: =IF((Ending time-Starting time-Break time)>8, (Ending time-Starting time-Break time)-8,0) to be able to have two totals, the regular hrs and the overtime hrs. Am I working on the right direction?
    Thank you a lot for your help!!!

    • Giorgio Iurcotta says

      I figure out a way to do it. I just put 8:00 in a Cell_X and I used this formula: =if((Ending time-Starting time-Break time)>Cell_X, (Ending time-Starting time-Break time)-Cell_X, 0)

      Maybe not the right way but a simple way :)


      • Mynda Treacy says

        Hi Giorgio,

        Well done finding a solution. When you are working with time in Excel you must convert it to the decimal equivalent in order to make comparisons, or put the time in another cell as you have done.

        This tutorial here might help you understand how time is actually handled in the background in Excel, i.e. the decimal equivalents.

        Kind regards,


  41. Monique says

    Hello love this form.

    I would like to create a time sheet that deduct lunch breaks. We work 40hrs each a week and take 1hr lunch break. My company pay for 30mins. So I would like for the hour lunch break to be deducted for 30mins so our sheets could equal 8 hours a day

    ex. 9:00am Clock In
    12:00 Lunch Out
    1:00 Lunch In
    5:00PM Clock Out

    this should equal to 40 hours weekly with an hour lunch

    • Catalin Bombea says

      Hi Monique,
      Please prepare a sample file with your calculations, an example of manual calculations will be a great help to understand your situation.
      Use our Help Desk to upload that file.
      Thanks for understanding

  42. mark says

    Heres a complex one, I can’t quite get my head round

    We have working hours of 8am to 6pm on a site

    we are also restricted to working 2.5 hours either side of low tide
    I want to be able enter the low tide time into a sheet that will then give us the working hours on site taking into consideration the start and end times of the working day

    For instance todays low tide times are 5.40am and 6.21pm
    One week from today the times are 12.03am and 12.24pm

    This has a major impact on our available working times on site and being able to program resources to carry out the works


    • Catalin Bombea says

      Hi Mark,
      Please prepare a sample file with your calculations, an example of manual calculations will be a great help to understand your situation.
      Use our Help Desk to upload that file.
      Thanks for understanding

  43. Jim says

    Very nice page. It took a while to search for the answer on how to add and calculate hours. The brackets worked. I would have never figured that out on my own. I’m glad I found your page. Thank you.

    • Catalin Bombea says

      Hi Elaine,
      If in cell A1 you have 14:31, in cell B1: 1:20, you can simply deduct them: =A1-B1 (you can put this formula in C1)
      All cells must be formatted as time: [h]:mm or hh:mm

  44. Robyn says

    Hi Catalin.

    Something like that but this (1 11:13) is on cell F2. So I’d like G2 to calculate it in days, H2 in hours and I2 in minutes.
    Thank you but this didn’t seem to work. However, I might have done it incorrectly. So I’m trying to break it (1 11:13) down. I need one column with it broken down into days, one in hours and one in minutes. I put in the formula =INT(F2) and just got #VALUE and the same for the others.

    Is there something I’m missing?

    Please let me know and thank you for your help.

    • Catalin Bombea says

      I have to see the data you work on, if it’s a text string (1 11:13) and not a Date, then we have to treat it like a string, not a number.
      Please use our Help Desk to upload a sample file.

  45. Robyn says

    I’m trying to convert this ddd hh:mm (1 11:13) to something where I can add up the column to come out correctly. 1 = 1 day, 11 = hours and 13 = minutes.

    I hope you can help me.

    Thank you

    • Catalin Bombea says

      Hi Robyn,
      this value: 1 11:13, can be split in components with simple formulas: =INT(A1) for days, =HOUR(A1) for hours and, obviously, =MINUTE(A1) for minutes.
      Is this what you were trying to do?

  46. Bharathi says

    i know the start time ie current time and i want to know the end time where the time difference is 8 business hours how to calculate the end time

  47. Arlene says

    Can you tell me if there is a formular to convert a single column in Excel 2007 from Eastern Standard Time to Military Time, example 3:00 PM to convert to 15:00

    • Mynda Treacy says

      Hi Arlene,

      You don’t need to convert the value, you can just change the number format to h:mm.

      1. To change the format first select the cells containing time >
      2. CTRL+1 to open the Format Cells dialog box >
      3. On the Number tab go to the Time group and select the format that doesn’t have AM/PM after it.

      Alternatively you can se your own custom format: h:mm

      Kind regards,


  48. Judith says

    So, I have an excel spreadsheet for timekeeping that the users key in integers for their hours. Example 6.3, 5.15 or 8 for the equivilant of 6:30, 5:15, or 8:00 hours. I’ve used the custom format for [h]:mm in updating the spreadsheet and getting the total fields to calculate time correctly. Yeah. Now I’m getting flack for “making” the users type additional characters. 6:30 or 5:15, or 8:00 for each entry to meet the cell format requirements.

    Is there a formula for converting entered integer data into the the time format without having to create additional fields? User keys in 8 and spreadsheet converts to 8:00 or 6.3 and converts to 6:30 (H:MM) of hours.

    • Mynda Treacy says

      Hi Judith,

      I’m not sure I’d call a colon instead of a decimal place an ‘additional character’. It’s different but not additional.

      If you can’t educate them to enter time properly then you can use this formula to convert their incorrect time into the correct format:


      Obviously this will require additional columns for all of the time that gets entered.

      Alternatively you could use data validation to force/educate them on how to enter the time properly. They’ll soon get the hang of it :-)

      Here is an example file with the Data Validation in cell F6.

      Good luck.


  49. Michael McCann says

    I have a workbook with several pages in it. Each page tracks time invested on behalf of a different client.
    My summary page summarizes time invested by client and looks like this:
    Client A 4 01:34
    Client B 2 19:27
    Client c 4 15:20
    Client D 0 07:06

    Where each line represents days, hh:mm

    I sum the lines to 11 19:27 11 24 hour days, plus 19 hours plus 27 minutes.

    I want to calculate actual working days (8 hour days) by multiplying the 11 by 3 (33 work days). I should do the same with the hours if over 8 (19 hours is 2 days plus 3 hours).

    Perhaps I need to convert to text and then convert back to a number to do the calcs. Is there an easier way?

    • Catalin Bombea says

      Hi Michael,
      Can you please upload a sample of your calculations with details on what are you trying to do? It will be a lot easier to understand and work on your data structure. You can use our Help Desk
      Thanks for understanding.

  50. Dwight says

    I have no problem calculating day or night hours so long as they are in the same day. However, how many hours are there between 5:00 PM and 7:00 AM of the following morning? When I subtract 5:00 PM (17:00) from 7:00 AM (7:00) I get the wrong answer. From 5:00 PM to midnight is 7 hours, and from midnight to 7:00 AM is 7 hours, so the correct answer should be 14 hours. I use the formula =IF(D96>C96,D96-C96,SUM(24)-C96+D96) which gives me 14:00. However, when I then add that 14:00 to the number of hours worked so far (35:00) I get the answer 601:00, which of course is incorrect. What I have had to do, is manually change the total cell to 49:00.

    • Catalin Bombea says

      Hi Dwight,
      Please upload a sample file with your calculations, it will be easier to understand the situation. If you format those C96:D96 cells as numbers, not date or time format, which are the numbers shown?
      You can use our Help Desk to upload a file.

    • Jan Bolhuis says

      Hi Dwight,

      Try this formula.


      C4: 17:00 (05:00 PM)
      D4: 05:00 (05:00 AM)

      Outcome: 12:00

      I added 35 hrs (hard coded value) and with the correct cell format ([u]:mm), I got the right answer (47:00)


  51. Jill Fowler says

    Would you teach us the trick of adding or subtracting time – such as in cell phone mapping the time of the call may be recorded in a different time zone, so we have to add or subtract an hour or two from a static time stamp, depending on daylight savings time.
    Thank you!!

    • Mynda Treacy says

      Hi Jill,

      It sounds like you need to lookup the time zone of the static time stamp and find out how many hours need to be added/subtracted, then it’s just a case of simple maths – time stamp +/- hours to adjust.

      You can use a VLOOKUP formula to locate the time zone and number of hours to adjust by.

      If you get stuck it would be best to send us an example Excel file via our Help Desk so we can give you a custom solution.

      Kind regards,


  52. mike says

    I’m trying to create a formula that will allow me to take tasks that have a duration. (15 min, 30 min, 1.5 hours)
    create a schedule that if I use a cell to show start of day 7:00a. I can add task and the cell that has time in will show how long it will be in time.
    7a start of day (fixed cell with time)
    7-7:30a task 1 :30 min. (7-7:30a is the calculated cell)
    7:30-9:00a Task 2 (1.5 hours)

    • Mynda Treacy says

      Hi Mike,

      I’m not sure I fully understand your question but it sounds like the best solution is to use a VLOOKUP formula to lookup the duration of each task. You can then add the task duration to the start of the day fixed cell using a simple formula e.g.

      =A2+B2 (where A2 contains your start time and B2 contains your task duration).

      Note: You can’t enter your start time as “7a” as this is text and Excel can’t perform math calculations on text. You must enter it as a time value i.e. literally type: 7:00 AM into your cell and press ENTER. Likewise for the task durations.

      I hope that helps. If you get stuck please email us your file via our help desk so we can see what you’re working with and give you a tailored answer.

      Kind regards,


  53. Stephen Rohr says

    I just wanted to be able to enter a daily start time in one field and an end time in another using a 24 hour format to derive the total time (hours and tenths of a 60-minute hour). Example: Start Time 11:00 and end time 16:20; total time being 5 hours 20 minutes and the number in the cell should be 5.4 hours.

    Thanks, Steve

    • Catalin Bombea says

      Hi Stephen,
      A1: 11:00
      B1: 16:20
      C1: =B1-A1 , this will be 5:20 in time format (sexagesimal)
      D1: =C1*24 , format as number (not time); the result will be 5.33333 (in decimal system), not 5.4, as 20 min is a third of 60 min. You can do the calculation in a single cell: =(B1-A1)*24
      Hope this helps :)

  54. Marlene says

    I have Numerous columns :
    A: 07:30 B: 10:30
    I then have columns to the right of this starting from (C-N)
    07:30, 08:00, 08:30, 09:00,9:30, 10:00,10:30,11:00,11:30
    I would like to input the A and B figure and conditional format the rest of the columns to the right to colour in the times(columns that are 07:30-10:30)

    • Catalin Bombea says

      Hi Marlene,
      You can try this sample file created on our OneDrive folder.
      The formula is:
      =AND(C$3>=$A4,C$3< =$B4) You have to be careful when locking rows or columns (with $ sign), this is the detail that makes the conditional formatting to work (or not). Hope it helps :)

  55. John Soppet says

    Thank you for your explanation. It was exactly what I was looking for.
    How to add hours beyond 24:00?
    I can now make my flying logbook work properly.
    I will be back

    • Mynda Treacy says

      Hi John,

      Glad we could help.

      You can add hours past 24:00 wit a regular formula, the only difference is you need to format the cell with this number format:


      Select the cell containing your formula > CTRL+1 to open the Format Cells dialog box > on the Number tab in ‘Category’ select ‘Custom’ > enter [h]:mm in the ‘Type’ field.

      Kind regards,


  56. joy says

    Hi po!

    Good afternoon,

    I would like to request simple computation on how to get late, tardiness and undertime computation.

    More power!
    Thank you,

  57. MT says

    i want to charge the client the minutes i spend on a phone call
    how do i get the minutes
    Start time End time total minutes
    7:30 am 8:30 am (entered formula: C6-B6 but it gives me 1:00, need to get the minutes….
    thanks a lot!

  58. Scott Fer says


    I’ve calculated an arrive time and a depart time (hour, minute, second). e.g. Arrive time 20:20:48, Depart time 20:21:24.

    When I report the time I truncate the seconds.
    If the minute in the arrive time is the same minute in the depart time, I only report the departure time. The arrive time in this case is left blank in the arrive time cell.

    How do I set that arrive time cell to only show when the minute is different ?

    Thank you.
    – Scott.

    • Catalin Bombea says

      Hi Scott,
      What do you mean by: “If the minute in the arrive time is the same minute in the depart time” ?
      What if the hour is different, but the minute is the same? My guess is that you intended to say that the hour AND minute is the same…
      Try setting a conditional format on Arrive time column (column B in this example), using a formula like this:
      Set the font color to be the same to cell color(if cell color is white, or no color, make the font white in conditional format settings)
      Where this formula is true, the value will not be visible, simply because there will be no contrast between font color and cell color.
      Hope this is what you need :)
      Cheers, Catalin

  59. Ruth says

    I can’t figure out how to calculate Total of 1 week times time in excell formulas
    to get this time i used this formula =Text(C2-C1, “h:mm”)
    Mon. Tue. Wed. Thur Fri. Total
    8:39 8:34 7:48 8:33 7:38 ?
    Now I need a weeks total I’m not getting it!

    • Mynda Treacy says

      Hi Ruth,

      When you use the TEXT function you convert the numbers into text. Excel cannot add up text which will be why you’re not getting a total.

      Just enter your formula as:


      Then format your cells as time [h]:mm (CTRL+1 to open Format Cells dialog box > and enter that format in the Custom number format field).

      Let me know if you get stuck.

      Kind regards,


  60. Gui says


    What do I do if I have employees whose rates increase by a half on peak hours. (from 3 to 6pm and then from 8 to 10 example). All I have in terms of input is when they started to work and when they ended work. thank you

    John enter 1:00 Ended 11:PM

    • Catalin Bombea says

      Hi Gui,
      You can view the sample file created for your problem on One Drive: Excel Online
      The formula is not tested for many scenarios, please test it and let us know what do you think.

  61. Bahram Khan says

    Thanks a Lot,

    It’s usable for everyone i am so thankful to you and again please send me such type of training links

  62. Frances says


    We have three different shifts. What is the formula horizontally for a person that would work from 11:00 pm to 7:00 am =? Then I add up the hours vertically to get my total hours.

    • Catalin Bombea says

      Hi Frances,
      Please upload a sample of your data structure, there can be thousand templates for this type of calculations, there is no unique formula for all.
      You can use our to upload a sample workbook.

  63. Nivaldo says

    I’m trying to build a table where the reference Times are: “In-core Hours: Start -08:00, Finishes – 16:00” and “Out-core Hours: Start – 06:30, Finishes -17:00”. Kind of overtime that can be done between 06:30 to 08:00 and 16:00 to 17:00.
    Now the actual excel sheet has Start and Finishes times only for each day, Monday to Friday. Is there a formula that I can use without the need to add any more columns??

  64. Erich says

    Hi i need to calculate standing times for machinery that are used on three shifts per day. when i try to calc times where the start time is greater then end time excel gives me a error how do i correct this. eg.
    Start time 23:25:00 minus End time 02:30:00 Standing time:xxxxxxx I am using OFFICE 2010
    Thank you

  65. Dave says

    I’m trying to make a schedule. We have 3 shifts 700-1500, 1500-2300, and 2300-700. I have the time in and time out input cells formatted to 0\:00 so that I dont have to constantly enter a (:) colon for every entry. How can I add these cells up as a 0.00 format?

    I do have an example of the schedule I am working on if you needed to see it for an example.


  66. CHRIS says

    Hi. I am trying to make my spreadsheet give me total time by which a job is overdue or missed. The problem is I need to subtract the times from different days…. For example: If the job came in on 3/3 at 13:00 hrs, and it was not completed until 3/6, at 7:00 hrs, can I make the spreadsheet calculate the difference? Thank you!

    • Catalin Bombea says

      Hi Chris,
      I you deduct those dates, with simple calculations like : =B1-A1 , the result is 2.75 days, in decimal system. That decimal fraction of 1 day, 0.75 days, means 18 hours (0.75*24). If you multiply 2.75 to 24, you will get the total number of hours:2*24+18=66=2.75*24.
      If this is not what you needed, please upload a sample workbook with your calculation and details on what are you trying to do. You can use our Help Desk system:

  67. Jeff Enright says

    I’ve downloaded to a spreadsheet time data from our time management web program. After downloading I wanted to sum the time entries. I’ve tried to format and sum without results. Is this something you could look at and let me know how to accomplish the task?

    • Mynda Treacy says

      Hi Jeff,

      It may be that the data you have downloaded is formatted as text and not a number. This is a common problem when importing data from external systems. Excel cannot sum text so you will need to convert it to numbers first.

      Depending on your data format you may be able to use the VALUE function to convert it. In a blank column beside the numbers you want to convert simply enter:

      =VALUE(cell reference containing number formatted as text)



      Then copy down column. If this doesn’t work it’s best if you can send us a copy or extract of your data so we can see it and understand the problem. You can send it to us via the Help Desk.

      Kind regards,


  68. Suzie Williams says

    I am trying to calculate how many calls per hour were made for the month.

    Saying Cell A1 = Total Calls of 486
    and Cell B1 = total staff time 166:05:39

    whats the right formula?

  69. Harish Lohar says

    How to auto converted 1.20 to 2.0 when i reach 1.20.

    Example :
    1. : 1.01 = 1.01
    2. : 1.02 = 1.02
    10. : 1.10 = 1.10
    19. : 1.19 = 1.19
    20. : 1.20 = 2.0

  70. Rebecca Ross Christie says

    I work with a spreadsheet that is an agenda with start times for each segment of an event. Sometimes I need to change the start time of the event or the length or placement of a segment within the event. That then changes the start times for everything following that changed segment. I would like Excel to automatically adjust the subsequent segments’ start times.

    • Catalin Bombea says

      Hi Rebecca,
      Can you upload a sample workbook with your data? If you change the start date, it can be done with simple formulas, but if you change intermediary times, depending to the functionality you need, you may need a macro to do it. For now, best thing to do is to show us your data structure, with as many details you can share. You can use our Help Desk:

  71. Manjeet says

    Could you help me to write the value 14/1 or 25/1 because whenever I type the same it gives me the result 41288 and 41299 respectively.

    • Mynda Treacy says

      Hi Manjeet,

      41288 and 41299 are the serial numbers for the date. You can read more on how Excel handles dates and time here.

      To format the serial numbers as a dates 14/1 and 25/1 you need to format them with a custom number format:


      To do this select the cells and press CTRL+1 or right click and select Format Cells > on the Number tab under Category choose ‘Custom’ > in the Type field to the right of the categories enter dd/m and press ok.

      I hope that helps.

      Kind regards,


  72. Diana Lueras says

    I have a column of time each operator was logged on for the month and need to get an average for the center. How would I go about calculating the average? Thanks

      • Diana Lueras says

        Thanks – I tried that but it doesn’t work. I’ve been reading other posts and it sounds like I need to use an array formula but I’m not familiar with that.

        • Diana Lueras says

          I figured it out. I had imported the data from a reporting system into Excel and though I had formatted with the custom number format, when I either added the column or averaged it, it would return with 0:00:00. I found a post where you need to highlight the column, select Data, Delimited and enter. The formula then works just fine. Thanks!

          • Mynda Treacy says

            Oh, good. Cause I was going to say it worked just fine for me when I copied it into Excel from your comment. Glad you figured it out.



          • Alexandra says

            Hello Diana,

            Could you please tell me where did you find Data-Delimited ? I cannot find it in MS Excel 2013.


          • Mynda Treacy says

            Hi Alexandra,

            I think Diana is referring to the ‘Delimited’ option in the Text to Columns tool which you will find on the Data tab of the ribbon.

            Kind regards,


  73. Isak says

    Dear Mynda
    I worked with the sample given in your Time X example. The first column
    83.33 and in the second multiplying the same columns I get this answer 2000:00
    Please help

    • Mynda Treacy says

      Hi Isak,

      In my formula I am doing this:

      0:50 * 100.00 * 24 = $83.33

      However I’m not sure how you got 2000:00. If you’re still stuck you can send me your workbook via the help desk so I can take a look.

      Kind regards,


  74. JOHN says


    I need to identify the start time and finish time of a shift that may span midnight in a series of clockings.

    Sat 17/08/2013 18:00 22:00 4.0
    Sat 17/08/2013 22:00 02:00 4.0
    Sun 18/08/2013 02:00 05:30 3.5
    Sun 18/08/2013 05:30 06:00 0.5
    Sun 18/08/2013 18:00 21:00 3.0
    Sun 18/08/2013 21:00 01:00 4.0
    Mon 19/08/2013 01:00 06:00 5.0
    Mon 19/08/2013 18:00 23:00 5.0
    Mon 19/08/2013 23:00 06:00 7.0
    Mon 19/08/2013 18:00 06:00 12.0

    From the table above you can see that the shift starts at 18:00 and ends at 6:00 the next morning. I need to identify these two times in two cells such as shift start time and shift end time.

    Your help is much appreciated

  75. Brian says

    Good day!

    I have read through many of the questions and haven’t seen one similar to mine. If it is there, I apologize for the duplicate message. I understand how to calculate time, but I cannot figure out how to have a manually entered number of hours added to a calculated number of hours. For instance, and employee works from 8:00 – 4:00. 8 hours of work. Simple enough. However, we ask that our employees indicate their travel time separately. So, if cell A1 is 8:00, cell B1 is 4:00, cell C1 is the formula calculating the total hours worked (B1-A1) of 8 hours. Cell D1 would be 1 (for illustration purposes representing 1 hour of travel time). Therefore, what formula is necessary in cell E1 adding the 8 hours worked found in cell C1 with the 1 hour of travel time manually entered in cell D1 to illustrate 9 hours total?

    Thank you for your help!

    • Mynda Treacy says

      Hi Brian,

      Perhaps I’ve missed something but this should be all you need:


      Let me know if that doesn’t work.

      Kind regards,


  76. Shawna says

    Hi Mynda…

    I need your help. I have a timesheet that I need to deduct lunch breaks based on if the shift is 6, 7, 8 hours they get a 1/2 lunch, if they work a 9 hour shift they get an hour lunch. Anything below 5.75 hours and below does not get a lunch.

    I have a start time (D1) and end time (E1). I was hoping to write some kind of IF statement that would automatically calcuate what time I had to subtract from the hours worked based on total hours.

    My formula now for a shift from 6:00 am to 3:00 pm is 9. I need it to show 8 hours paid.

    Please help!

    • Mynda Treacy says

      Hi Shawna,

      =IF((E1-D1)< =5.75,0,IF((E1-D1)>=9,1,0.5))

      Based on your times being represented in decimal format, not time format. If you’re using a time format you’ll need to replace the numbers with the serial number equivalents.

      Kind regards,


  77. B.Nagendram says


    when I am trying to convert the loss to % I am getting eratic reading can you help me out

    time time duration day/mt loss loss %
    7:00 8:10 70 811 0.563194444 39 6.5 23742.11732

    • Mynda Treacy says

      Hi B.Nagendram,

      What figure are you dividing the 6.5 over to get 23742.11732?

      Kind regards,


  78. Tanya says

    How do I go about automatically calculating individual employee’s hours using Microsoft Excel when creating the schedule for the week? I would like for Excel to automatically tally each individual person’s hours as I create the schedule; i.e.
    Monday: Tuesday: Employee: Hours:
    Lynn 11am – 3pm Paul 11am -3pm Lynn
    Rick 9:15am – 3pm Rick 9:15am – 3pm Rick
    Darius 10:30am – 3pm Lynn 11am – 3:30pm Darius
    Shon 12pm – 4pm Eric 12pm – 4pm Shon
    Any help with this would be GREATLY appreciated…

    • Mynda Treacy says

      Hi Tanya,

      I recommend you lay your schedule out in such a way that you can use the SUMIF function to SUM the times IF the match the individual’s name.

      Ideally you’ll have each record on a single row like this:

      Column A ColumnB Column C Column D
      Name Start Finish Hours
      Lynn 9:15 AM 3:00 PM 5:45
      Rick 9:15 AM 3:00 PM 5:45
      Darius 10:30 AM 3:00 PM 4:30
      Lynn 10:30 AM 3:00 PM 4:30

      Then to sum the hours for Lynn you can use this formula:


      I hope that helps.

      Kind regards,


  79. Wendy says

    Here is my question: I need to be able to roundup and round down in the same cell. I am thinking it needs to be an IF or an OR statement but I am not sure. For instance the spreadsheet I am using is for tracking billable time. If someone attended only 30 min we can’t bill so it would be 30=0 and if they attended 31 then it would be 31=1 or it could be .50=0 or .51=1. can you help me solve this??? thank you in advance

    • Mynda Treacy says

      Hi Wendy,

      Where your time is in cell A1:

      =IF(A1< =(30/1440),0,TIME(HOUR(A1),CEILING(MINUTE(A1),30),0))

      I'm assuming that after the first 30 minutes you bill in 30 minute increments after the time becomes billable.

      Kind regards,


  80. Teneille says

    Hi There

    I have made a timesheet that states employees start and finish times, and calculates the hours they have worked for the the day, week and month and also shows any accrued hours, however, if the employees do not work the full daily hours, this is not accounted for in the accrued hours.
    any idea how I can do this?

    • Mynda Treacy says

      Hi Teneille,

      What is your definition of ‘accrued hours’? How do you calculate it?



  81. Chia says

    How would I set it up so it doesn’t show negative numbers for when my starting time is in the evening and ending time is in the morning ie.

    In – 9:06pm
    Out – 10:07am

    SUM = -11.38

    if correct the sum should have shown 13.02 instead of -11.38

  82. Jabbar Patel says

    Hi Mynda,
    I have Time punching Machine in our firm,
    and i want to calculate our workers wages from punching m/c data:
    data is in this format:
    Employee No Name In Time Out Time
    1 A 08:30 17:00
    2 B 08:30 21:00
    And my wages calculation sheet is in this format:
    EmpNo Name Rate(Per Hr) Duty(8:30Hr) OT(Hr) TotalHr Amount
    1 A 50 8:30 0 8:30 425
    2 B 50 8:00 4 12:00 600
    Please give me formulas for calculate wages or if you have any other format for calculate wages plz send me that excel file on my mail id

    Jabbar Patel

  83. Chrispy says

    Hi Mynda,

    I have a spreadsheet with a Start Date and Time in one cell (H1), an End Date and Time in another cell (I1) and the Time Taken in the next cell (J1) with the formula ‘=I1-H1’

    It calculates the time correctly all through the day, however when I change the Regional setting of the computer to 24hr format, the formula only works until midday, then when the end time is after midday it displays #VALUE!.
    If I change it back to 12 hour format, it works again! I would like it to work regardless of what setting the user has set on their computer.

    Do you have any ideas?
    (The formats of the cells are d/mm/yyyy h:mm:ss for the first 2 and [mm]:ss for the time difference cell)

    With Thanks,

    • Mynda Treacy says

      Hi Chrispy,

      Have you tried to enter the time in a 24hr format irrespective of which time format the computer uses?

      e.g. 17:50 instead of 5:00 PM

      Kind regards,


      • Chrispy says

        Hi Mynda,

        I just hit a button and the VBA code uses the Now() function to get the date and time and inserts it into the cell.

        • Chrispy says

          Just found the problem in the VBA code, the Start Time had Format(Now()) and the End Time used the code, Format(Now(), “d/mm/yyyy h:mm:ss”)…put them both as the latter and it works for both 12 and 24hr regional settings now

          Thanks for your time Mynda

          • Mynda Treacy says

            Ah, I see what you mean now by your previous comment “I just hit a button and the VBA code uses the Now() function to get the date and time and inserts it into the cell”.

            I thought you meant you fixed it by doing this, but now I realise the VBA was the culprit. Glad you figured it out. Well done.

            Kind regards,


  84. Stuart says

    I have a series of steps that must occur at unique fixed amounts of time before a given ‘zero hour’. (All events will be within a total of 10 hours elapsed time during a single day.) Using 1830 as the zero hour for example: Step 1 must begin six hours prior, at 1230. Step 2 must begin 2 hours 45 minutes prior, at 1545. I’ve read and read and just can’t grasp how to set up the calculations. Thanks in advance!

    • Mynda Treacy says

      Hi Stuart,

      You can use the TIME Function for these type of calculations with HOUR, MINUTE and SECOND functions where necessary. I’m not sure how your workbook is set up but to calculate 6 hours before 1830 you could do the following (Where A3 contained the time 18:30):


      And 2 hours 45 minutes:


      If you get stuck please send me the workbook via the help desk and tell me what you want to calculate and where.



  85. catkruz says

    I have created a worksheet for different tasks I perform while at work. I used CTRL + SHIFT + ; to enter the time and clock in and out.

    I used the formula “=TEXT(C13-B13, “h:mm”)” to get the total time spent on an individual task.

    When I try to add those results, I only ever get 0:00. I have tried a sample page where I’ve made up time amounts and “SUM’d” them, and I get the correct amount.

    Is there something in the fact that my time amount column is a result of a formula? I cannot get that column to sum up at all. Any help you have is greatly appreciated.

    • Mynda Treacy says

      Hi Catkruz,

      When you use the TEXT function you are converting the data in the cell to text. Excel can’t SUM text, that’s why you get a zero result.

      What you need to do is just enter a simple formula like =C13-B13 and then you can SUM the results.

      Make sure you format the cells as [h]:mm so that Excel accumulates the results correctly.

      Kind regards,


  86. RICHARD says

    I am trying to automate a time sheet to have a check figure so the beginning and end time I enter will tell me if the detail of time in columns to the left will match.

    I have Time arrive and Time Departed (expressed as clock time).
    Subsequent columns are the categories of hours/minutes I want a formula to the right of the sheet to compare by beginning and departure times to the detail of the entries of hours and minutes.

    I have tried all my tricks and I am getting inconsistent results. Is there a webpage you might know of that can explain this specifically? I would appreciate any help provided.

    • Mynda Treacy says

      Hi Richard,

      Can you please send your workbook or an example to me via the help desk and I’ll give you a solution.

      Kind regards,


  87. Janelle says

    Hi Mynda,
    I am trying to set up columns which will add days and weeks to days and weeks. Eg if a baby is born at 36w 3d gestation and is now 4 days old, what is its corrected gestation? It is 37 weeks (obviously), but I need it to calculate this automatically.

    • Carlo Estopia says

      Hi Janelle,

      You may use a formula like this:

      =A2+INT((B2+C2)/7) & "wks" & " & " &(B2+C2)-( INT((B2+C2)/7) * 7) & "days"

      basing on the data below:

         A            B                 C                D 
      1 weeks	  days of gestation	days old       Formula	
      2   36	       3	           19	       39wks & 1days

      This involves the INT function which isolates whole number from decimals.
      So, when we divide the sum of days(B2+C2) by 7 we only get the whole number part
      (note: not the rounded off number). This can be shown in the weeks part computation
      in the formula above. In the second part, we use the same result of the INT Function this time in getting
      the equivalent days in a whole week by multiplying it by 7 and deducting it from the the total days of age
      and gestation.



        • Carlo Estopia says

          Hi Janelle,

          It’s our pleasure here in MOTH.

          On behalf of Mynda, you’re welcome!



          • Janelle says

            Hi Carlo, these formulae are working really well for calculations where there are values entered in the cells as above. But when we have rows that don’t have data in them what is displayed is a 414**number, which I assume is the excel time format. I need these cells to stay blank when there are no patient details entered in them. I have tried conditional formatting, but that ends up displaying values I dont want, and not displaying values I do want. How do I fiddle with the formula to only show values when there is data entered in the required cells?

          • Mynda Treacy says

            Hi Janelle,

            You can prefix the formula with an IF function that tests to see if A2 is blank, if it is do nothing, otherwise perform the calculation. e.g.:

            =IF(ISBLANK(A2)=TRUE,"",A2+INT((B2+C2)/7) & "wks" & " & " &(B2+C2)-( INT((B2+C2)/7) * 7) & "days")

            I hope that helps.

            Kind regards,


  88. S Williams says

    I am trying to calculate the difference in time between hours which are scheduled vs actual hours worked to show me ONLY when they are in late or out early.

    For instance :
    Schedule Start 9:00 AM (cell A1)
    Schedule End 6:00 PM (cell B1)

    Actual Start 8:58 AM (cell C1)
    Actual End 4:58 PM (call D1)

    For the “Start” calculating the difference in times is successful with the formula =IF(C1>A1,C1-A1,””) shows me any occurances of “in-late” time or leaves the call blank if there is none.

    BUT when I try to use that formula for the “End” times I am coming up with an error of unending ######### and I cannot seem to identify why. Can you help? (( this is not due to the cell being too small — the ## just continues))

    the “End” formula I am using is
    =IF(D1<B1,D1-B1,"") it does leave it blank if they leave late BUT if the employee was "out early" it gives me the error instead of the time difference. The cells are formated correclty.

    • S Williams says

      Along with that – Cell E1 is where the formula lives for the “starts” difference and Cell F1 is where the formula lives for the “ends”.
      if the Actual Start and End are blank. It is also possible that the Actual Start and End time cells would be blank.

    • Carlo Estopia says

      Hi S Williams,

      The reason your formula is displaying ###### is because Excel can’t display negative time. You can ‘fix’ this using the 1904 date system but it is not recommended. Instead I recommend you use this formula:


      Format the cell with custom format [h]:mm

      This will show any time left early as a positive number. So using your figures it will show that this employee left 1 hr 2 minutes early.

      If you want to hide results where the actual start and finish time is not entered you can use this formula which checks if the finish time is blank and if so enters nothing, otherwise it calculates:


      I hope that helps.



  89. Morse says

    I want to calculate time based on distance and speed
    A1 = 10km
    A2 = 50kph
    A3 = should come to 12 minutes

    Excel shows this as 04:48

    How do i fix this to show 00:12 like it should be in HH:MM format?


    • Carlo Estopia says

      Hi Morse,

      To begin with, I don’t know where and how you arrived at 4:48.
      The good news is, we don’t need that. lol.

      Anyway, whatever your formula is in arriving at 12 just divide it by 1440 and then format the cell as time format hh:mm:ss or something like it.
      For example:

      (yourformula or result)/1440
      format this as hh:mm:ss or similar time format

      reference: calculation tricks



  90. Payal says

    Hi Mynda,

    I have converted value into time by using =TIME(LEFT(B8,2),RIGHT(B8,2),0) function.

    E.G. 1420 converts into 2:20 PM

    However, When I drag this function to the cells below it gives me #VALUE! and I would like to use same column into a formula SUMPRODUCT in the different sheet. Due to this #VALUE! the SUMPRODUCT function is not giving me any answer.

    Can you help??

  91. nrupesh says

    vinu bhai 03/04/13 8:45:00 AM 10:30:00 AM 1:45 1:45
    vinu bhai 04/04/13 4:00:00 PM 7:00:00 PM 3:00 4:45
    vinu bhai 04/04/13 2:15:00 PM 4:45:00 PM 2:30 7:15
    vinu bhai 04/04/13 8:45:00 AM 10:30:00 AM 1:45 9:00
    vinu bhai 07/04/13 4:30 13:30
    vinu bhai 10/04/13 8:30 22:00
    vinu bhai 11/04/13 1:30 23:30
    vinu bhai 14/04/13 8:20:00 AM 8:45:00 AM 0:25 23:55
    vinu bhai 14/04/13 10:45:00 AM 12:20:00 PM 1:35 25:30
    vinu bhai 14/04/13 3:10:00 PM 6:10:00 PM 3:00 28:30
    vinu bhai 14/04/13 6:40:00 PM 8:20:00 PM 1:40 30:10
    vinu bhai 15/04/13 8:10:00 AM 11:05:00 AM 2:55 33:05
    vinu bhai 15/04/13 11:40:00 AM 12:25:00 PM 0:45 33:50
    vinu bhai 15/04/13 2:50:00 PM 3:50:00 PM 1:00 34:50
    vinu bhai 15/04/13 4:35:00 PM 6:00:00 PM 1:25 36:15
    vinu bhai 17/04/13 4:45:00 PM 8:10:00 PM 3:25 39:40
    vinu bhai 18/04/13 7:40:00 AM 10:10:00 AM 2:30 42:10
    vinu bhai 18/04/13 10:15:00 AM 12:45:00 PM 2:30 44:40
    vinu bhai 18/04/13 3:05:00 PM 4:25:00 PM 1:20 46:00
    vinu bhai 18/04/13 9:45:00 PM 11:55:00 PM 2:10 48:10
    vinu bhai 18/04/13 0:05 48:15
    vinu bhai 18/04/13 12:00:00 AM 2:15:00 AM 2:15 50:30
    vinu bhai 19/04/13 8:00:00 AM 11:00:00 AM 3:00 53:30

    • Carlo Estopia says

      Hi nrupesh,

      Thanks for dropping by, but
      what is your problem here?

      Please clarify a little bit.



  92. Ricky says

    How do I get 0.49 to show as 00:49? I need it to show in hours and minutes. I have number like 1.17 that I need to display as 01:17.

    • Carlo Estopia says

      Hi Ricky,

      you may use a formula like this:


      and then copy and paste special-values.



  93. Christina says

    Im working on a schedule for work and need to calculate how many employees we have at a certain time. I have the hours aranged in colums. Id like to see if I can get a formula to calculate how may employees come in before a certain time. How many stay untill a certain time.

    • says

      Hi Christina,

      You can use the COUNTIFS or COUNTIF formula for this. e.g.

      =COUNTIF(start_times, "< ="&TIME(8,0,0))

      Will count the number of employees who started on or before 8am, or

      =COUNTIFS(start_times,"< ="&TIME(8,0,0),finish_times,">"&TIME(17,0,0))

      Will count the number of employees who started on or before 8am and finished after 5pm.

      Kind regards,


  94. vamsi says

    how to calculate total hours if the “Clock In” time is 20:00 and “Clock Out” time is 5:00 in 24 hours format, am using the formula =SUM(B2-A2)*24,but it shows…..

    Start End total Hrs Break Working Hrs
    7:00 16:00 9.00 1.00 8.00
    7:00 16:00 9.00 1.00 8.00
    20:00 5:00 -15.00 1.00 -16.00
    20:00 5:00 -15.00 1.00 -16.00

    • Carlo Estopia says

      Hi vamsi,

      Please try a formula like this:


      Note: Use numeric format for the formula and the other factors (total Hrs, Break, Working Hrs)

      This post involves purely time format: Excel Time Calculation Tips
      Please read particularly how to compute shifts.



  95. Helaine says

    I’m having difficulty figuring out how to format (???) a formula for calculating time between PM and AM. I used the formula =D2 (Time Out) – B2 (Time In) and it works like a charm for AM to PM. But when the Time Out is 4:00 AM and the time in is 3:00 PM I get ########. I had chosen 13:30 from the “Type” list as recommended in the How to Calculate Time in Excel 2007 tutorial.


  96. Sameh Mohamed Adel says

    Dear Mynda Treacy,
    1st of all I would like to thank you for your wonderfull website,
    I needed to ask, I am making a formula to calculate working hours & minutes, but I need 2 things:
    1) Result to be in words. (For Example: 45 Hourse and 40 Minutes)
    2) Hours above 24 to be included in the words. Why I am asking this point, because if I just applied [H]:mm to the cell containing words it doesn’t recognize it.

    And to make it easier, here is the source/range of data to be calculated:


    Sameh Adel

  97. Jean-Philippe says

    Hi Mynda,

    I am trying to calculate the lead time of many small projects. I use the formula below that take in consideration the working days and the working hours. I have a start date and an end date in the format (05/01/2013 08:30). Each project has a different lead time. It could be 3 hours like 4 days. I would like to subtract the lunch time (12:00 to 13:00) of the answer when it is needed.

    In example: with a start date of 05/01/2013 13:30 to 05/03/2013 17:00, the formula return me 20,5 hrs based on a 8,5hrs working shift.(8:30 to 17:00) In this range of time, there is 2 lunch of 1 hrs. The answer should be 18,5 hrs.

    Yours help on this will be very helpful, because I am getting headache trying to solve this.

    Thanks much


    • says

      Hi Jean-Philippe,

      Will this work?

      =NETWORKDAYS(G2,J2,Variable!$H$2:$H$10)*8.5-24*(MOD(G2,1)-8.5/24+17/24-MOD(J2,1))-(INT(J2-G2)+IF(MOD(H2,1)<=TIME(12,0,0),1,0)+IF(MOD(J2,1)<=TIME(12,0,0),-1,0)) This part counts a lunch hour for every whole day worked INT(J2-G2) This part counts an hour for start days that begin before 12 IF(MOD(H2,1)<=TIME(12,0,0),1,0) This part subtracts an hour for end days that finish before 12 IF(MOD(J2,1)<=TIME(12,0,0),-1,0) Kind regards, Mynda.

  98. Raj says

    Hi Mynda,

    While I had another question altogether, when I came across your post, it cleared so many things for me. This is definitely better than even Chandoo!

    So here’s my question. I process documents in batches and record the page count and for every such batch have also calculated the time taken(end time minus start time).
    But the problem arises when I try to calculate how much time does it take me to process one single page from a batch.
    Please help.



    • says

      Hi Raj,

      Thanks for your kind words :)

      You should be able to calculate the processing time per page by dividing the time by the page count. If you’re getting an error you can send me the file and I’ll take a look.

      Kind regards,


  99. Asif Qureshi says

    can you help?

    We have statistical data regarding times of sunset and sunrise which we need to calculate various points in the day.

    We receive this document in the form of an excel sheet.
    unfortunately, time is displayed in 2 cells.. so 4.40 is shown as
    4 in cell 1a and 40 in cell 1b.

    i need to get from this format of the time split in 2 boxes to 4:40 in one cell so i can then start my calculations. please advise on how to do this.


  100. Richard says

    Hi Mynda,

    Is it possible to input time and date (eg in cell B,1) whenever there is a number or words was being input into cell A, 1?

    • says

      Hi Richard,

      Yes, it’s possible, although you haven’t given me enough information to enable me to give you a solution.

      Perhaps you could be more specific about what date/time you’d want to enter and based on what numbers or words are input in A1.

      Kind regards,


  101. Jorge Vargas says

    Hi Mynda,

    I’ve a question? I need to calculate the working time between two dates
    e.g. start time and end time from Monday to Saturday and from 08:00 AM till 18:00.
    I’ve try several ways as datedif, int but no luck.

    could you help me out of this please

    in advance thanks



    • says

      Hi Jorge,

      If you know you’ll always work from 8am to 6pm (i.e. 10 hours) then all you need to do is subtract the start date from the end date to give you the number of days and then multiply this by 10 to get the total hours.

      If this isn’t the case then perhaps you could send me your workbook so that I can see how you are capturing your data.

      Kind regards,


      • Jorge says

        Start Actual End Work Day Duration
        02/04/2013 02/04/2013 Tue 0.007:15
        02/04/2013 02/04/2013 Tue 3.358:49
        02/04/2013 02/04/2013 Tue 0.001:37
        02/04/2013 02/04/2013 Tue 0.006:34
        02/04/2013 02/04/2013 Tue 0.000:07
        02/04/2013 02/04/2013 Tue 0.001:56
        02/04/2013 02/04/2013 Tue 0.000:10
        02/04/2013 02/04/2013 Tue 2.236:05
        02/04/2013 02/04/2013 Tue 2.237:32
        02/04/2013 02/04/2013 Tue 0.000:26
        02/04/2013 02/04/2013 Tue 0.000:28

        Work Days : =CHOOSE(+WEEKDAY(A2,2),”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”,”Sun”)

        Duration : =INT((B2-A2)*24)&”.”&TEXT(B2-A2,”[h]mm:ss”)


        If a call is coming in at 07:00 AM then the first hour won’t tell as well as calls coming in after 18:00 PM, the last one need to be added to the following day.
        I need to create an automated workbook, this is a monthly work?
        Please your help is more than needed.

        Kind Regards


        • says

          Hi Jorge,

          I’m sorry but I don’t understand your time format 3.358:49 and neither does Excel. I can’t see any start or finish times in your data.

          Can you please send me your workbook with your data and explain where I find the start and finish times. I also didn’t understand what you mean by ‘if a call is coming in at 7:00 am then the first hour won’t tell’. Do you mean you don’t want to count the time before 8:00 AM?



          • Jorge says

            Start Actual End Work Day Duration
            02/04/2013 13:07:16 02/04/2013 17:06:05 Tue 3.58:49
            02/04/2013 10:35:52 02/04/2013 13:11:57 Tue 2.36:05
            02/04/2013 10:54:45 02/04/2013 13:32:17 Tue 2.37:32
            03/04/2013 09:03:38 03/04/2013 14:13:45 Wed 5.10:07
            02/04/2013 12:20:23 02/04/2013 15:07:52 Tue 2.47:29
            02/04/2013 12:46:48 03/04/2013 11:21:07 Tue 22.34:19
            02/04/2013 11:25:23 02/04/2013 13:50:47 Tue 2.25:24
            04/04/2013 08:28:59 04/04/2013 10:04:59 Thu 1.36:00
            05/04/2013 09:02:45 05/04/2013 10:40:31 Fri 1.37:46
            03/04/2013 10:27:57 03/04/2013 14:10:13 Wed 3.42:16
            04/04/2013 13:24:50 04/04/2013 16:13:49 Thu 2.48:59
            15/04/2013 17:46:44 16/04/2013 09:45:03 Mon 15.58:19
            12/04/2013 10:23:41 12/04/2013 14:16:07 Fri 3.52:26

            • Start on Tuesday 02/04/2013 at 12:46:48 End on Wednesday 03/04/2013 at 11:21:07
            18:00-12:46:48=5:53:52 from Tuesday and 11:21:07-08:00:00=3:21:07
            The duration time should be 5:53:52 from Tuesday and 3:21:07 from Wednesday
            I hope that this example made easier for you to understand the issue.
            1. How can I solve this issue?
            2. Is it possible to create a template containing all the formulas and so one ready just to copy and paste the data, if yes could you tell me how to do this.
            In advance thanks for all your effort’s

            Kind Regards


          • says

            Hi Jorge,


            Where your start time and date is in A2 and your end work time and date is in B2.

            Note: I didn’t get the same answer for 18:00 – 12:46:48 as you. I got 5:13:12.

            Kind regards,


          • Jorge says

            Hi Mynda,

            thanks a lot for your input the formula is working like a charm; for the difficult cell’s, but for the cell’s within the same day not see example below:
            this is correct with the formula:
            02/04/2013 12:46 03/04/2013 11:21 Tue 08:34:19
            15/04/2013 17:46 16/04/2013 09:45 Mon 01:58:19

            if I apply in the rest of the workbook I get the following:

            02/04/2013 13:07 02/04/2013 17:06 Tue 13:58:49
            02/04/2013 10:35 02/04/2013 13:11 Tue 12:36:05

            the output should be as follows:
            02/04/2013 13:07 02/04/2013 17:06 Tue 03:58:49
            02/04/2013 10:35 02/04/2013 13:11 Tue 02:36:05

            do you know how can I achieve this?

            again thanks for all your efforts

            kind Regards


          • says

            Ah, sorry. How about this:


            Kind regards,


          • Jorge says

            Hi Mynda,

            Thanks a lot this is the one; I’m getting the right out put..!!!
            again many tanks for all your help.

            Kind Regards


          • Jorge says

            Hi Mynda,

            Hope you are doing great?
            I’m back again 😉
            the formula is working good but now I need to take a 30 minutes from the total time.
            e.g. the time after the formula is 1:30:38 should be
            1:30:38 – 30 minutes 1:00:38
            Could you be so kind to give me some advice please.

            Kind Regards

          • says

            Hi Jorge,

            If it’s just 30 minutes you want to take off at the end I’d just append it to the existing formula like this:


            Let me know if that’s not what you meant.

            Kind regards,


          • Jorge says

            Hi Mynda,
            Sorry for the delay but I have some days off.
            Thanks for your input it works. Now I have another question?
            I have a column order and another deliver; I need to calculate the time between those columns.
            I’ve used your previous formula:
            This formula is working approx. because give me a time but not the one I need.!!!
            What I need is as follows:
            From Monday to Thursday I believe its ok but for Fridays when the orders are coming after 15:00 don’t count as incoming on Friday but as incoming on Monday.
            Could you be so kind and correct me please.

            in advance thanks for your help

            Kind Regards


          • says

            Hi Jorge,

            There comes a time in a formulas life where a helper column is the best approach. I think this formula is in danger of getting overly complicated (read; difficult to follow and troubleshoot months down the track) if we start nesting more IF’s and AND criteria.

            A simpler solution is to add a helper column to your data for the ‘effective start date’. The formula below can check if the start date and time (in cell A2) is > 3pm on a Friday, if TRUE, put Monday’s date at 8am, otherwise use the current date and time:


            If you really want it in one formula then you’ll need to take the above formula and nest it in your formula, but I don’t recommend it.

            I hope that helps.

            Kind regards,


          • Jorge says

            Hi Mynda,
            Tanks I have followed your recommendations and as I have expected is working like a charm 😉
            Now the next problem
            01/05/2013 07:41 01/05/2013 12:43 02/05/2013 13:04
            01/05/2013 08:12 01/05/2013 12:43 02/05/2013 12:31
            01/05/2013 08:18 01/05/2013 12:43 02/05/2013 12:15
            01/05/2013 08:40 01/05/2013 12:44 02/05/2013 10:31
            01/05/2013 08:40 0 1/05/2013 12:44 02/05/2013 10:21

            as you can see i have three columns for me the most important are the Order and Delivery ones; I’ve use the old formula see below:
            but the output isn’t correct because the order was issued on the 01/05/2013 07:41 and this was delivered on the 02/05/2013 13:04.
            the formula that I’m using counts working hour and not 24/7
            could you be so kind an help me out of this please 😉

            again thanks for your help and understanding

            Kind Regards


          • says

            Hi Jorge,

            I thought you wanted to count working hour? If not you can simply subtract the delivery date & time from the order date & time and format the cells as time [h]:mm

            This will give you the total number of hours and minutes.

            Kind regards,


          • Jorge says

            Hi Mynda,

            Thanks again I really do not know how to do this with out your help great of you and your colleagues.

            yes indeed my problem was the [h] for the rest all seems to be ok.

            Now the next problem:
            For the same workbook and the same columns I need to exclude the Friday after 15:00 as well as the Saturdays and Sunday for the whole weekend, and start counting from Tuesday, this is just for the orders that are coming the Fridays after 15:00.
            Furthermore how to exclude the bank-holidays e.g. 25 of may and so one.

            I hope that you can help me with this one? I have try several formulas but not the right results please.

            Kind Regards


          • Mynda Treacy says

            Hi Jorge,

            NETWORKDAYS can help you handle the weekends and holidays.

            You should already be handling the Friday after 3pm requirement in the additional helper column I mentioned earlier.

            Kind regards,


          • Jorge says

            Hi Mynda,

            Indeed the Friday issue is ok now; the formula for the networkdays that I have it has two typos that was the reason. But I’ve corrected them and now it’s working like a charm.
            =NETWORKDAYS.INTL(D2, F2, 1,2)
            Furthermore thanks for the link to the alternative solutions I think to give a try with the VBA script. I’ll let you know if this is also working.
            Thanks for your time and efforts
            Have a nice weekend
            Kind Regards

  102. Linda Cooper says

    How would one calculate the “after 5pm hrs” from a time sheet below…. it is not overtime or anything like that, just a differential for after 5……… all I need is the decimal hours after 5 calculated so I can multiply it by the $ differential.

    Regular Hours 10/5/2012 14:30 10/5/2012 21:12 6.7 (6h 42m)

    This is driving me crazy…….I need help.


    • says

      Hi Linda,

      I’m not sure I fully understand but I think this is what you mean:


      Answer: 4.2 (time in decimals)

      Wher your start time is in A1 and your finish time is in B1.

      Kind regards,


  103. Kevin says

    Hi, I am trying to simply put AM, PM, NS in a cell based on the shift times worked, e.g if the AM shift start at 06:00 and finish at 14:00 put AM, if the PM shift start at 14:00 and finish at 22:00 put PM and finally if the NS start at 22:00 and finish at 06:00 put NS. The start and finish times will be entered just need the logic if it is AM, PM or NS

    • says

      Hi Kevin,

      =IF(AND(A1>=TIME(22,0,0),B1< =TIME(6,0,0)),"NS",IF(AND(A1>=TIME(6,0,0),B1< =TIME(14,0,0)),"AM",IF(AND(A1>=TIME(14,0,0),B1<=TIME(22,0,0)),"PM",""))) Where A1 is your start time and B1 is your finish time. Kind regards, Mynda.

  104. Ganttic says

    Wow! I never knew about calculating time in excel before seeing this post. Thanks a lot for the great information and reminder! You have greatly helped me here. I am looking forward to your updates. Keep it up!

  105. Ravi shekhar says

    i need to calculate night time day time is calculated perfectly like in time 09:00 AM to out time 05:00 PM it shows correctly as 8:00 h:mm
    but when i input night shift time as

    in time 11:00 PM (23:00 hrs) to out time 07:00 AM it shows negative value even i change the formula (Actual formula is out time – in time) at this it shows negative value but when i change it opposite as =out time – in time it shows 16:00 h:mm but actually its 8 hours is it possible to calculate the time diff of night shift
    i think excel only calculates day to night it cant calculate night to day ??? is it
    pls if any answer let me know urgently :)

    • says

      Hi Bala,

      Simply enter your GMT time in cell A1 (or any free cell) like so:

      9:42:30 is 9 hours 42 minutes and 30 seconds.

      Then in cell B1 enter this formula:

      =A1-2 to subtract 2 hours, or

      =A1+2 to add 2 hours.

      I’m not sure if that’s what you wanted. If not you might find the answer here.

      Kind regards,


  106. Kathryn says

    I’d love to give an employee an excel timesheet template where they can enter time without having to convert to military time or type the AM/PM. Is there a solution so we can have accuracy?

  107. chandra says

    Hi Mynda,

    I’ve an issue, i’m making my daily activities minutes to minutes
    I made sum of time function
    let say in A1 i input the total times in minutes
    B1 is started time, e.g. =time(8,0,0)
    C1 is sum of B1+A1, the function is =B1+time(0,A1,0)

    It works ok so far, but the problem came out when i put decimal in A1.
    For example i put 1.5 the C1 didnt show the correct sum of the time

    could you pls help me to solve this matter?

    • Carlo Estopia says

      Hi Chandra,

      Please try a formula like this one:

         A1            B1         C1-Formula
      12:00:00	12.5     12:12:30
      =A1+("00:"& INT(B1) & ":" & MOD(B1,1) * 60 )



      • chandra says

        Dear CaloE,

        Thanks a lot, works like a charm
        Though i couldnt understand the Formula XD
        But it’s work (y)

        • Carlo Estopia says

          Hi Chandra,

          Our pleasure!

          Well, INT isolates the non-decimal part
          while the MOD isolates the decimal.

          The formula in a hardcode looks like this A1+”00:12:30″



  108. Vicky says

    Hi Mynda,
    How can I get my start time column to add up to get this:
    start time item time(mins)
    12:00:00 intro 1
    12:01:00 music 2.5
    12:03:30 music2 2.25
    12:05:45 interview 7
    12:12:45 etc

    • Carlo Estopia says

      Hi Vicky,

      Please try this set-up:

         A1           B1       Formula
      12:00:00	125	14:05:00
      =A1+("00:"& INT(B1) & ":" & MOD(B1,1) * 60 )

      Note : Format for both times(A1 and C1-Formula) are: hh:mm:ss
      B1 is numeric.



  109. Lisa P says

    How about calculating rate (lb/hr) if the start & end times bracket midnight? (example: start a 100-lb batch at 23:52 and end at 00:29, so a 37 minute time, roughly 200 lb/hr). This works if I enter the date with the time: 4/15/2013 23:52 and 4/15/2013 00:29, then I can subtract these to find the difference, etc, no problem. But if I just have the times (not the calendar dates) in a column the subtraction works fine until I get to the situation I described, then I can’t get it to work easily. There must be a simple way to do it, add 1 or add 24 or something, I just haven’t figured it out yet. Thanks!

    • Joe says

      or rather how do i convert 124 to minutes without going through each cell manually, is there a formula?

    • Carlo Estopia says

      Hi Joe,

      Just use this formula:


      Note : Your Formula’s cell must be a time format.
      In this case, you should get a result of 2:04 or 2 hours and 4 minutes.
      Supposing of course, 124 is in A1.

      See Excel’s Time Conversion Table



  110. Audrey Robeson says

    I’d like to check if a shift is over 6 hours total time, if so deduct 1/2 hour (30 mins) for a lunch break. If not do nothing.

    • Carlo Estopia says

      Hi Audrey,

      Use this formula:


      Assume your data is:

      START	  END    Result
      8:00 AM	3:00 PM  (formula here) 6.5

      Please format your formula cell as Number.



  111. Michelle says

    Thank you so much for this.
    I have been trying to get my hours to add up and the above changing to [h]:mm has solved the problem.

    So well worded and easy to follow.

    Thank you!!

  112. Kishor Bhoir says

    I am stock market trader, and getting live market data in excel from my broker. I want average of two cell say HIGH and LOW of the stock price, but the condition should be, say market opens at 9.15 AM. I want average till 9.30 AM. After 9.30 AM it could not affect my average value even if HIGH and LOW might change later-on.

    Thanks in advance

    • Carlo Estopia says

      Hi Kishor,

      Please send this through HELP DESK.

      I have an idea as to what you are looking for but
      I want to know what’s the structure of your data.
      Do you want to average all high’s only? or only low’s?
      or all? and so on…



  113. Venkatesh says


    I would like to subtract one hour from the below formatted time in excel. Please help! I tried subtracting but it ends up with #VALUE…

    20120102 00:00
    20120102 00:30
    20120102 01:00
    20120102 01:30
    20120102 02:00
    20120102 02:30
    20120102 03:00
    20120102 03:30
    20120102 04:00
    20120102 04:30
    20120102 05:00
    20120102 05:30
    20120102 06:00
    20120102 06:30
    20120102 07:00
    20120102 07:30
    20120102 08:00



    • Carlo Estopia says

      Hi Rick,

      Please right click the link and then ‘Save Link As’ in your folder or drive.



  115. Mike John says

    Hi, after looking at your example for Time x Rate to calculate wage, i have noticed to you have forgot to mention within your example that the “Charge Out Amount” cell value, the cell has to be formatted to either general or currency. Without this formatting users will experience incorrect or spurious answers as I have just experienced. Please can you update your page accordingly.


  116. scott says

    Hi – I need some help adding summed lapsed time formatted [h]:mm back to decimal value in order to check totals entered into payroll software. If A1 = 30:15 B1=1:46, I use formula =Sum(a1:a2) to return 32:01. But, I need a check column that adds these two lapsed time totals to 31.61. Any help is greatly appreciated.
    Thank you

    • Carlo Estopia says

      Hi Scott,

      Try this formula:

      =INT(((A1)*1440)/60)+INT(((B1)*1440)/60) & "." &INT( MINUTE(A1) + MINUTE(B1))

      Assuming the data is

         A              B
      30:15:00	1:46



      PS: your formula cell should be in a Number format

      • scott says

        Carlo – thank you for your help. The formula worked…almost. I actually have 24 cells (formatted lapsed time) that I need to add together, converted to decimal. I was able to add to your formula additional cells. However, when seconds keep adding together past .99 and do not convert to the next whole number. For example 47.104 (I need this summation to convert to 48.04). Is there a seconds addition I need to add to the formula? Again, thanks for your help…this is way past my basics knowledge of excel!

        • Carlo Estopia says

          Hi Scott,

          Try this :

          =IF(INT(MINUTE(A1)+MINUTE(B1))>99,INT(((A1)*1440)/60)+INT(((B1)*1440)/60)+1 & "." &TEXT(INT( MINUTE(A1) + MINUTE(B1))-100,"00"),INT(((A1)*1440)/60)+INT(((B1)*1440)/60) & "." &INT( MINUTE(A1) + MINUTE(B1)))



          • scott says

            Carlo – thanks again for your help. The true for this formula works; however, the false is coming up #Value!. I have tried several changes but none work. Here is what the false is returning based on just adding 2 summed lapsed time cells:
            A1=30:15 B1=1:56
            False calculates to IF(FALSE,#N/A,INT(“31.25″&71)) then..
            Formula evaluator says the very next calculation will return the error.

            Any thoughts? Thank you.

          • Calvin says

            Anyone, please help. How can I calculate time start and time end in one cell? Ex: (9:30am – 6:30pm) = hours worked


  117. Luke says

    Hi Mynda,

    Could you help me please?

    I would like to calculate an average using a time field and a numeric number. (I’m using Excel 2010)

    For example:

    Total Number of Calls: 33
    Total time for all Calls: 00:42:06 (hh:mm:ss)
    Average length of call minutes: ?

    Thanks for any help.

  118. Curtis Dunzello says

    Hi, using excel, how do I find total time (days, hours and minutes between to dates and times. I am trying to calculate “time to restore service.

    • Carlo Estopia says

      Hi Curtis,

      Simply format your minuends and subtrahends (your dates and times) to Date time format (dd/mm/yyyy hh:mm:ss).
      Format the difference to custom format [hh]:mm:ss.

      After you formatted the corresponding cells, you can simply do a formula like: End Time – Start Time = Difference .



  119. Aikawa says

    Hi – How do I calculate total time from 23th March 2013, 10:30 PM[Fomat h:mm] to 24th March 2013, 2:30 AM[Format h:mm]. I would like it display total time is 3:00 in format [h].mm. Thank you so much.

    • Carlo Estopia says

      Hi Aikawa,

      Try this formula:


      With your A1 and A2 having m/d/yyyy h:mm format
      and A3 with [h]:mm format where your formula is.



  120. Jamie says

    Hi i have a question.

    I am making a employee rota i need excel to add up the amount of hours an employee is rota’d

    cell c1 i have a shift start time 21:30 then cell d1 i have a finishing time 03:30 and i have this 5 times across the row. then i want a cell at the end of the row with the amount of hours worked? but cant seem to work it th formulas out?

    please help

    • Carlo Estopia says

      Hi Jamie,

      All you need to do is simply format your formula cell to custom format [h]:mm:ss.
      It doesn’t what time format your addends are.



  121. Sharon says

    I need formulas for a simple time sheet, but do I have to use military time in order for it to work? The times are set to Custom: hh:mm and the Reg. hrs are: =((E12-B12+(E12<B12))-(D12-C12+(D12<C12)))*24 (and copied down for each row). Here's a copy of my sheet:

    Start Time Lunch Out Lunch In End Time Reg Hrs.
    08:00 12:00 4
    10:00 14:30 4.5
    10:00 14:00 4
    08:00 12:00 13:00 17:00 8
    10:00 14:00 4

    • Carlo Estopia says

      Hi Sharon,

      You don’t need a military time format to have this particular formula going.
      All you need is a consistent time format to avoid confusion.



  122. Maulik says


    I want to add time formatted hh:mm:ss like below


    please help me.

    • Carlo Estopia says

      Hi Maulik,

      Just format your formula cell to custom format : [h]:mm:ss

      You can do this by right clicking first the cell where your
      formula is and click Format Cells, choose Custom and Select [h]:mm:ss



  123. Anas Tamim says

    Can you help to calculate flight time duration between two airports of different time zone when I know 1- departure time,2- arrival time and 3- time difference between two time zone(+ or -)

    • Carlo Estopia says

      Hi Anas,

      presuming difference is likely less than a day:

      departure (Philippines)	arrival (USA)	timediff	Flight Duration
               12:30 AM	  9:30 AM	  -8	           1:00:00
      Formula Flight Duration: =B2-A2+(B2<A2)-TIME(ABS(C2),0,0)

      with dates:

      departure (Philippines)	 arrival (USA)	timediff	Flight Duration
        1/23/13 12:30 AM	1/25/13 9:30 AM	  -8	           49:00:00
      Formula Flight Duration: =(B3-A3)-TIME(ABS(C3),0,0)

      The difference in these two approaches are the formats in the minuends and subtrahends.
      The first one has simply a time format and the second one has a date time format.
      The formula/difference should always have a custom format [h]:mm:ss.

      Please take a look at Calculating Time In Excel



      PS: The reference time here is the date of arrival. Hence, Per USA point of view it’s a -8 vs Philippine time.

  124. Jim Simmons says

    I am trying to calculate the minutes between 3:30 PM (fixed starting time) and a departure time (example) 4:30 PM without having to enter a colon and using 24 hr time. Also trying to add the total number of minutes (total from each day) x the entries for 5 days and not to receive the total hours and minutes or a method to multiply hr/mm X a specific rate per mm.

    • Carlo Estopia says

      Hi Jim,

      You might want to use a structure like this:

      Number	Formula To Convert Time	Formula to Convert Into Minutes
      130	        1:30 AM     	                    90

      Formula To Convert Number to Time: =(INT(MOD(A2,10000)/100)&”:”&MOD(A2,100))+0
      Formula to Convert Into Minutes : =B2*1440



  125. Philipp Grunwald says

    I have the problem that Excel for some reason changes my data:
    I have the situation that I want to sum up mm:ss to [h(h?)]:mm:ss.

    Now I have values such as 14:30 (mm:ss). But Excel just makes 14:30:00 (hh:mm:ss) out of it, i.e. I get wrong results! I tried to remove the last “:00” via several ways, but it just shows up again. Even worse, if I don’t use the “Time” format, this matter of fact is hidden. Luckily I noticed that my sum can’t be correct.

    So again, my values are all < 60 minutes/1h, but all the tutorials I found on the internet only take about the SUM(hh:mm) case, not the mm:ss case.

    Thanks in advance.

    • Carlo Estopia says

      Hi Philipp,

      12:23    --addend formatted as hh:mm:ss
      14:30    --addend formatted as mm:ss should still be entered as 00:14:30
      12:37:30 --Formula should have a format of [h]:mm:ss
      I think you typed in your minutes omitting the hour part. You should still
      use the syntax in typing it : hh:mm:ss (00:00:00); otherwise, 14 will be interpreted as 
      hours and omitted due to the mm:ss format while 30 interpreted as minutes.
      Your Formula's Cell Format should be [h]:mm:ss. The h with the brackets always.
      It doesn't matter what time format your addends are.
  126. Paul Greatorex says

    How do you add up these in excel



    • Carlo Estopia says

      Hi Paul,


      Simply, format the cell where your formula is to:

      custom format: [h]:mm:ss

      note: always with the brackets.
      Then use this formula:



      No need to format the formula’s cell. You just need
      this formula


      Please read more: Calculating Time in Excel



  127. febra says

    1. how do i calculate running hours of my Genset from its time counter?
    e.g, start time: 2990Hrs17mins
    stop time: 3026Hrs23mins
    i want to calculate the total running hours using excel.

    2. i want to calculate time for a machine don’t have time counter.just use clock.
    eg. start; 7.30am on 5/3/13
    stop; 7.30am on 6/3/13
    how can i calculate using excel to got 24hours?

    • Carlo Estopia says

      Hi Febra,

      Regarding number 1, well that is not a Time nor Date format in Excel.
      So all you need to do is convert these times first.
      At any rate, once you have converted them to Excel Time/Date Formats
      more or less you will need to select these time formats:

      For the difference: for 1 and 2, [h]:mm:ss
      Note: Always with the brackets.

      For the minuends and subtrahends:
      For number 1: any time format will do
      For number 2: Date with time i.e. 3/4/2013 12:30

      Please read more on : Calculating Time



  128. Paula says

    I am calculating how many hours class videos are. Some are 00:01:54:02, some are just minutes… how do I add all these in Excel to come out with a total of hours? I have formatted the cells to time in the 00:00:00 format. Thanks!

  129. Zobair says

    can u please tell me the way to calculate 2:00pm-12:00am in excel as work hour.Whenever I try to do that I get ###### this sign. But if I calculate 2:00am-12:00pm then it doesn’t make any problem .

    AM-PM, AM-AM, PM-PM all are okay. But PM-AM makes problem. ????

    Thanks in advance for your help .

  130. Randy says

    I have a check sheet built for a large construction project with a date column of when I need to receive submitals from the contractor. The project has been delayed so I want to add two weeks (10 work days) to every entry just one time. I don’t want to include weekends or holidays?

    • Carlo Estopia says

      Hi Randy,

      Use the WORKDAY Function.
      Add a named range for your holidays.
      1 Go to Formulas
      2 Click Name Manager
      3 Click New and name it Holidays
      4 Click Refers to and select the range of your Holidays
      in my case A1:A2
      (you may add more)

      Named Range: Holidays
      1 1/3/2013
      2 1/4/2013

      The formula:

      case: add january 2, 2013 plus 10 working days. 
            result is 1/17/13.
      note: use the DATE function for the dates DATE(yr,mth, day)

      3 and 4 are holidays
      5,6,12,13 are Saturdays or Sundays.

      See our Workday Function Here
      SYNTAX: Workday(date, number of days, Holidays)



  131. Darren says

    Hi, I am having a little trouble with subtotal average.

    I have an open time & close time in separate columns to return total time open which works as it should in another column, S. The issue I have is in the subtotal average at the base of the chart as when the formula, =r5-5b, is entered for minutes open column 0:00 is displayed as no time has been calculated which is fine. However, 0:00 is added onto the average subtotal changing the average i.e time open in s5 = 0:10, s6 = 0:12, s6 = 0:21 with an average subtotal of 0:14 though when formulas are entered below in s7 0:00 is displayed & reduced the average in the subtotal, =SUBTOTAL(1,S5:S64), to 0:10 as no open or close times have been entered yet.

    How do I stop 0:00 time from either being printed in S column until times are entered in the first place or can the average subtotal not add the 0:00 time?

    Your assistance is greatly appreciated.

    • Carlo Estopia says

      Hi Darren,

      I really couldn’t understand where your formula is coming from and what and how…

      But I used an IF function and IFERROR to show a blank should there be no entries yet or if
      the data entered results to error.
      Try the formula below. just replace the parts “R1-B1” with your formula r5-5b…or whatever it is.


      I hope this helps.

      More on IF’s and IFERROR.



  132. Simon says

    I’m doing a time sheet and I need % on it

    For example: dep. arr Total %
    12:00. 15:00. 03:00. 100%

    And if I changed 15:00 to 13:30 the total would be 01:30 and % would be 50%
    Is there a SUM for this
    3hrs must be 100%
    1hr30min 50% and so on


    • Carlo Estopia says

      Hi Simon,

      Please use the formula.
      Be sure to format the cell in your formula as “PERCENTAGE”.

      dep(A2) arr(B2)	Total(C2)	        %
      12:00	13:30	  1:30	       =((C2/3)*1440)/60 

      Read more: Time Calculations




  133. Shirley says


    I have a spreadsheet and I have a column with contracted hours and one for actual hours worked. I also need to create another column with the difference between the 2, e.g if contracted hours are 14 and I work 16 then obviously the difference is 2 hours. I have created a formula that works when the difference is a positive but it won’t work when it is a negative. Any suggestions?

  134. NANDITA GHOHS says

    some amount mentioned in the column A and some amount mentioned in the column B,
    less than .50 pick up column A & upto 1 pick column B

    • Carlo Estopia says

      Hi Nanditha,

      Here’s how I understood your problem.

      Assumptions and Data:

      A        B               D  
      0.44	0.8	    paste formula
      0.45	0.8		0.45
      0.46	0.8		0.46
      0.47	0.8		0.47
      0.48	0.8		0.48
      0.49	0.8		0.49
      0.5	0.8		0.8
      0.51	0.8		0.8
      0.52	0.8		0.8
      0.53	0.8		0.8
      0.54	0.8		0.8
      0.55	0.8		0.8

      Copy and paste formula in col D:


      Read More on IF FUNCTIONS



  135. tara says

    HI there,

    I have to put all emplyoee hours on an excel spreadsheet ( I am new to this )
    The Payroll manager is asking I make a summary of all hours worked .
    How do I go about this (wht formula do I use )
    Also the spreadsheet layout goes horizontal not vertical EX :
    A18 to Q18
    Thanks for the help Tara

    • Carlo Estopia says

      Hi Tara,

      Here’s the formula you need:

      Time Format:

      Format the cell of your Formula to [h]:mm:ss
      or any of those custom formats with: [h].

      Then simply SUM up your time



      Format the cell of your formula simply to numeric
      then enter this formula.


      The difference between the two is that
      the former is in time format; hence, you get
      the hours and minutes as totaled; while
      the latter converts everthing to hourly equivalent.
      So when you get a result of 7:30 it will be converted
      to 7.50 hours.

      Please see Calculating Time.



  136. danny says

    i have to create a weekly employee schedule, however, i need to factor in a 30 minute lunch for any hours that exceed 6 hours some employees only work 5 hours. how can i modify the formula to accomodate this. I was thinking using the “IF”<6 THEN -0.20086(the numeric for 30 minute) but not sure.. Please Help! Thank you!

  137. Nayeef says


    I want to create a timesheet in my office.

    I want to know how to add times in excell i used the formula (A2-A1)*24 ie..
    Start (A1)= 7:00 AM Finish (A2)= 4:45 PM and the answer is 9:75
    but it should be 9:45.

    Please Help me


    • Carlo Estopia says

      Dear Nayeef,

      Please look for the heading How To Sum Time In Excel here.

      Now I am not quite sure how you got 9:75 there, but all you need to do is just convert the format to Custom: [h]:mm:ss and you will
      get 9:45. In fact, you just need the TIME format to get that result.

      just in case it’s the other way around you wanted.

      Just do this


      This will get you a numeric result of 9.75 hours.



  138. Ty says

    Hi Mynda
    Hopefully you can help me. I need to make an excel program for clocking in and out where the time punched is rounded to tenths, but it has to match the following table:
    :58,:59,:00,:01,:02,:03= :00 :04.:05,:06,:07,:08,:09=:06 :10,:11,:12,:13,:14,:15 = :12
    and so on. I can get it to round to the nearest tenth, but it doesn’t match the table.

    • Carlo Estopia says

      Hi Ty,

      I suggest a table like this: Just put this starting at D4, E4 and F4

      (D)Mins (E)Formula (F)Your Tenths
      (1-59) (=F4-D4)
      1 ——-(-1)——————-0
      2 ——-(-2)——————-0
      3 ——-(-3)——————-0
      4 ——–2——————-6
      5 ——–1——————-6
      6 ——–0——————-6
      58 ——-2——————60
      59 ——-2——————60

       Place your time in A1
            Place your Main Formula in B1 

      Note: Make sure your cells are in time format


      For Example: 1 A1 = 13:04:00 or 1:04 PM
      2 A1 = 13:02:00
      IF the result of E col above is positive then
      A1 plus(+) the value in E col
      (i.e. the index-match combo will search the minute part in A1 which is
      4; hence it will pick up 2 to be added to A1
      13:04 + 2 = 13:06)
      the INDEX-MATCH COMBO will simply be multiplied by -1 to get a positive
      value for the TIME FUNCTION; however, it’s substracted this time.
      i.e. 13:02 PM – 2 = 13:00 PM
      (Note again that the MInute 2 will return the value -2 (frm col e) but
      multiplied by -1)

      Read also Excel Time Calculation Tips
      Index and Match Function



  139. Manny Mendoza says

    OK, I have 2 columns – Start & End time. I calculate how many hours a person worked by subtracting End-Start times then I subtract 30 minutes for lunch break. That’s fine except when a person works less than 7.5 hours per shift, then by law, we cannot subtract the 30 min lunch break. So, on the same cell I calculate the total hours per shift, how can I conditionally calculate NOT to subtract the 30 min break if they work less than 7.5 hours?!

    Thank you for the help as I am tearing my hair out.

  140. Leena says


    I’m trying to add duration of tasks. Some of them are more than one hours and some are less than an hour. When I do the normal sum I end up with the sum of the cells which contains hours only e.g


    Total should be = 43:11:40
    But I am getting total = 42:13:45 using formula =SUM(C4:C9)

    I’ve formatted all the cells [h]:mm:ss as the duration of the task comes from different sheet.

    Would you please help to get the correct total of hours?


    • says

      Hi Leena,

      It looks like some of your times are formatted as text. Your formula is only adding up 27:17:15 and 14:56:30. The other numbers aren’t formatted as time and so the SUM is ignoring them.

      You need to enter a 0 before the colon on the other numbers so that Excel knows they are time.

      Kind regards,


      • Sue Williams says

        I have this same issue and find it cumbersome to have to manually correct these. Is there a formula that can accomodate this to be included? I am pulling the raw data in on several tabs and want it to calculate correctly on a seperate summary tab within the same workbook without having to fuss around with manually changing :30:08 to 0:30:08. I know some of it is coming in as text but do not know how to automate this correctly as a formula. What is the formula for this??

  141. Gabriela says

    Buenas tardes!
    Tengo un problema en calcular las diferencias de horas trabajadas en Excel, por ejemplo tengo el horario de 09:00-A1 hasta las 15:30-A2 y haciendo la resta =A2-A1 me sale la diferencia de horas pero después tengo el horario de tarde que es 15:30-A1 hasta las 00:30-A2 y para calcular las horas trabajadas he hecho este calculo =(a2-A1)·24 , pero no me sale las horas me sale ####### y aunque lo transforme a hora o hora personalizada no me sale, por favor si me puede ayudar le agradecer mucho.
    Muchas gracias.

    • Carlo Estopia says

      Buenas Tardes Gabriela,

      visitar este sitio y traducir la web al español:
      véase más adelante

      To display the number correctly, do either of the following:

      Change the date system to the 1904 date system.

      Use the TEXT worksheet function to change the displayed result.

      Steps to Change to the 1904 Date System
      In Microsoft Office Excel 2003 and in earlier versions of Microsoft Excel, follow these steps:

      Open, or switch to, the workbook.
      On the Tools menu, click Options, and then click the Calculation tab.
      Click to select the 1904 Date System check box.
      Click OK.

      In Microsoft Office Excel 2007, follow these steps:

      Click the Microsoft Office Button, and then click Excel Options.
      Click the Advanced category.
      Under When calculating this workbook, click to select the Use 1904 date system check box, and then click OK.



      • Gabriela says

        Buenas tardes,CarloE.,muchas gracias por su respuesta , he intentado lo que me recomendaste para Office2007, y me ha dado la respuesta correcta pero en negativo lo que al calcular el total no me sale el resultado, ademas si cambio la primera celda como texto y la segunda como tiempo me sale ero neo el resultado , me explico a1-9(horas) a2-0,30 minutos y para calcular el tiempo trabajado restando la pausa de 00:30 minutos me da 23:30 horas y si lo pongo como texto me sale 00:00, he cambiado en opciones excel y también intento cambiar la forma de la celda pero nada no me sale con la formula =a1-a2 que lo normal debería darme las 8:30 h trabajadas.Muchas gracias.

        • Carlo Estopia says

          Buen día Gabriela,

          para ser honesto, yo sólo uso google traductor ya veces no siempre se traduce ese bien.

          Le sugiero que me envíe el archivo a través de “HELPDESK” para que podamos echar un vistazo a lo mejor.
          Tal vez usted puede añadir algunos comentarios en allí para explicar un poco más.


          Carlo Estopia

  142. Trish says

    I need to create a formula to calculate stand by charges. For example, an employee who was on standby for 9 hours would get paid 1/2 hour for each 4 hr period or part thereof he was on standby. So he would be paid 1.5 hours for 9 hours. What is the formula that I would use? Thank you so much!

    • Carlo Estopia says

      Hi Trish,

      I’m just trying to give you a quick solution:


      This follows your logic:

      If on standby for each 4 hr period
      gets .50 hour payment.

      Read more on RoundUp Functions



      • Trish says

        Hi Carlo,

        I was thinking that roundup work work too however if you get .5 hr for every 4 hours or part thereof, the answer should be 1.5 not 2.0 (as I get when using the formula).

        • Carlo Estopia says

          Hi Trish,

          Try formatting the cells where your formula is.

          Right Click, Choose Format Cells, Select Number and set the decimal places to 2.

          Please try that as of the moment.



  143. Elly B says

    I am having problems with a timesheet where a member of staff is working fewer hours than expected. This gives the problem of negative times on occasions. Also, I am trying to get a cumulative figure, which is reverting to 0 once 24 hours are reached.

    C2 = Clock in Time
    D2 = Clock out Time (lunch)
    E2 = Clock in Time 2 (lunch)
    F2 = Clock out Time 2
    J2 = in Office? (allows SL or AL for sickness and annual leave)
    M2 = Hours Worked = =IF(J2>0,+N2,IF(AND(D2=0,E2=0,F2=0)=TRUE,””,IF(AND(E20,F2=0)=TRUE,””,+D2-+C2+F2-E2)))
    N2 = Expected Hours = 7:30 each day
    O2 = Hours Owing = =+N2-M2
    P2 = Cumulative Calculation = =+M2-N2 (with P3 being =+M3-N3+P2 etc.)
    Q2 = Cumulative Hours = =IF((D2=0)=TRUE,””,IF(P2<0,+"-"&HOUR(P2*-1)&":"&IF(MINUTE(P2*-1)<10,"0"&MINUTE(P2*-1),MINUTE(P2*-1)),P2))

    It is the Hours Owing, and Cumulative Hours which are causing the problems,

    • Carlo Estopia says

      Hi Elly B,

      Can you please add more explanation, or better if you send me your file with your example data via the help desk.

      Anyway, I just tried to solve Hours Owing through this formula. Please try it.


      Points of Clarification:

      1)Expected Hours is converted to numeric: 7:30 to 7.50. Please do clarify what format are you trying to get in O2-Hours Owing
      I presumed it’s numeric.
      2)I see that M2 results a percentage of total hours(24) per day So I multiplied it with 24 as you can see in the formula.
      Again I converted this into numeric terms.
      3) As far as Cumulative Hours (Q2) I need more info in that. Please clarify if the formula is okay already after O2-HOurs Owing
      is improvised. In other words, Please explain the what are you trying to achieve in this Q2-Cumulative Hours formula.

      Of course this would be clarified much better if you will put in your Excel file some mock data and there supposed manual results
      so it would be easier to follow and correct.



  144. Joseph Horling says

    Hi Mynda,

    Some of my employees work the night shift. Can you go over how to calculate that type of time. Thank you for your help. I like your simple explainations, great site. Joe.

      • Joseph Horling says

        Hi Mynda,

        Thanks for responding. I like using that formula but what do you do if they don’t have a break? Do I just take the finish time-the start time if they don’t record the break? Thanks Joe.

          • Joseph Horling says

            Hi Mynda,

            I didnt quite understand the above. Here is an example:
            Start 10:00 PM 8:30 AM OFF 1:00 PM 9:00 PM
            Finish 5:00 AM 5:30 PM 9:00 PM 2:00 A
            Hours ????? ????? ??? ???? ????

            Thanks, Joe

          • says

            Hi Joe,

            Sorry, the HTML in my comment above got messed up. I was using the example in this post.

            Let’s say Monday’s times are in column B, with start in cell B2 and Finish in cell B3, your formula for ‘Hours’ in cell B4 would be:


            Kind regards,


          • Suneetha says

            Hi Mynda,

            I’ve seen few of your replies which are useful.
            But didn’t solve my problem. Here is my problem
            I take the working hours by subtracting the in & out timings.
            In 9:33:37
            Out 12:00:34
            Worked 2:26:57

            Like this I did for no. of swipes in a day and added the total hours for that day.
            Now I want to sum those day hours to get the hours worked in a month i.e,
            01.12.2012 7:43:06
            02.12.2012 9:34:78
            31.12.2012 14:45:36

            Could you please help me how to add the day hours to get the monthly hours.

            Thanks in advance.

            Kind regards,

          • Carlo Estopia says

            Hi Suneetha,

            By now, you know that you can’t add large number of hours in a time format.
            So the best thing to do is to use a formula like this.
            For example:


            you have a time in (B3):14:45:36
            result: 14.76 hours
            Note: the result is numeric which is in hours.

            Please refer to Calculating TIme in Excel
            to understand the time serial concept.



          • Carlo Estopia says

            Hi Suneetha,

            Forgive me for my hasty answer. Anyway, It just occur to me while answering a similar question that I was wrong in claiming that we cannot add time.

            In fact, Yes we can!

            Just convert all of your time to Custom Format :[h]:mm:ss.

            My previous answer refers to adding time by converting it to numeric in an hourly basis.



  145. Kayla Cantrell says

    I am trying to make a time sheet that will calculate weekly time for my robotics team. They have to complete 88 hours at the end of our build season. I thought it would be best to put their time into an excel workbook to calculate the time they have put in. I am subtracting the end time from the start time, and I have used your format changes for the “h:mm” and still can not get my formulas to work. Could you take a look at my workbook formulas to see what I can do to get the formulas to work?

  146. Tara says

    I have a question about adding time worked. example if i worked from 8pm – 10:30pm how do I display it in the cell to say 2.5 hrs? I want to get away from it saying 2:30.

    • Carlo Estopia says

      Hi Tara,

      Hi I have answered a similar question
      and here’s the formula:


      In your case, let’s say, 10:30 PM is in A1 and 8:00 PM is in B1 the result would be 2.5 hrs.
      You will not need to worry about the minute part as it will be converted to its hourly equivalent.

      For more discussions click Time Functions
      You may also view the Post found on the right side of this/your thread. In answer to Jessica Reece’s question dated January 17, 2013 with my comment dated
      January 18, 2013. Calculating Time in Excel



  147. Elly says

    Hi – i hope you can help!

    I am trying to add times in a timesheet, particularly where a member of staff has not been working full hours, so the worked hours are often lower than expected hours. This would often involve 2 starts and 2 end times in any day, to account for a lunch break.
    I then need to sum the total worked in a week, but keep getting errors.
    is there anyway I can send my spreadsheet to you to have a look at please?


    • Carlo Estopia says

      Hi Elly,

      Please do send me your file through HelpDesk .

      Anyway, I can already picture what you need and this might just work for you.
      2 starts and 2 ends. Assumptions: AM Start(A3), End(B3); PM Start(D3), End(E3).

      AM PM
      Start End hrs Start End hrs
      8:00 12:00 *4 13:00 17:00 ^4

      Note: The result of this formula is in numeric hourly terms already and not in a time format; that is, ready
      to be multiplied by your hourly rate.


      You may also just do this on an adjustment basis. Say you have a uniform expected hours of 9 for each employee but none of it
      are the real hours rendered. The formula would still be basically the same except that you need to enter the Actual Time Break
      in a Time Format. In this example, 1:30 represents 1 hour and 30 mins to be converted through a formula in Breaks for hourly rate
      to be deducted from the Expected difference/hours of 9.

      (A8)Start : 8:00
      (B8)End : 17:00
      (C8)diff : *9
      (D8)Actual Time Break : 1:30(Time Format)
      (E8)Breaks/Adj for hourly rate: ^=((D8)*1440)/60 –>1.5
      Actual Time for hourly rate : ^^=C8-E8 –> 7.5

      *=((B8-A8)*1440)/60 note: this formula may not be necessary if the expected hours is a given i.e. 9

      ^=((D8)*1440)/60 note: this is the same formula except that there’s only one cell argument i.e. D8
      if you want to use the two range argument version then you may simply add a column i.e.
      =((E8-D8)*1440)/60 the result would be the same: 1.5 hrs diff
      ^^=C8-E8 result is 7.5 hrs

      I have also answered a similar question here in this post:

      Calculating Time in Excel
      just look for Jessica Reece’s and Tara’s questions dated
      Jan 17 and 18 respectively and my comments are dated January 18 and 19 2013 respectively.
      see also Time Functions



  148. ERICA says

    Thank you so much for this explanation! How could I calculate overtime per day? In your example “Use Excel in Timesheets to Calculate Time Worked”, could you take the Time Worked minus 8 hours to calculate overtime? If so, what would that formula look like?

  149. Jessica Reece says

    This is probably something very simple, but I’m adding up work hours i enter the formula =(b2-B9)*24 and it even highlights what im doing, but my total is always #value! please help me :(

    • MikeBanawa says

      Hi Jessica,

      The “#VALUE!” error means that you are trying to calculate a non-numeric value or TEXT. Try re-check your entries in B2 and B9 and look if one of them is being considered as text by Excel. You might notice a green triangle on the upper left corner of the cell where your number is located. This means that excel knows that the data inside is a number but was entered as TEXT by the user. Hope this helps :)


      • Jessica Reece says

        Hi Michael,

        You was right, but I’m still not for sure why its not working. In cell A2 i have the text saying clock in in sell B2 I have 6:00AM then in the rest of cell A3-A9 it says clock in, clocked out, lunch time and ect in B2-B9 it has numbers like 11:00AM, 2:00PM and so on til time to clock out. When i put the sum in it says value but other then the am and pm which i thought i had to put in thats the only text i have.

        Im very new to this program only been missing with it for about 3 days. Please help me figure this out :)

        • MikeBanawa says

          Hello Jessica,

          I truly understand. Excel is a tough software to master but you’ll enjoy its benefits once you get a hang of it. Don’t worry, I’m more than happy to assist you with your concern. :)

          The reason you’re getting an error is probably because of the way time is being entered. Based on what you typed above, the data in Cell B2 is “6:00AM”.

          There should be a space between “6:00” and “AM”, so it should look like this: “6:00 AM”. Can you try that and tell me if it worked? BTW, can you also give me an idea on the way you clock in? Do you type the time manually, or do you press something that updates column B automatically?


          • Jessica Reece says

            Hi Mike,

            Thanks so much I forgot to check for your reply, I cant believe it was something so simple (lol). Yes I type the time in manually I didn’t think you could do it automatically :o. I have a feeling its going to take me months to master excel, but if I run into more problems I’ll ask. :)

            Thank you so much!
            lol I keep forgetting to check if Im human xD

          • Jessica Reece says


            I have one more question and I think I’ll get this down. I made a more advanced time chart for employees but now I need to make late fee deductions.
            Example in cell A1 it says Start Time, 6:40 AM then in B1 it says Real Time 6:00 AM how do i deduct that time I tried =(A2-B2) and it said 12:40… lol so I know that’s way off. How would i fix it and make it deduct money from there check?


          • Carlo Estopia says

            Hi Jessica,

            I have here a simple formula that will do the trick.

            =(((A1-B1)*1440)/60) * 30

            *where 30 is your hourly rate. Result is 20

            Now you could also isolate the rate into a different cell so your formula will look like this:


            In your case 6:40 AM minus 6 AM, The result will show the difference in minutes converted to its hourly equivalent: .666667.
            You can then multiply it with your hourly rate or whatever your preference is. This is accurate
            to the minute. You may then multiply .666667 with your hourly rate. Assuming it is 30 USD, The result will be 20 USD
            to be deducted from your payable wages/salaries.

            For more discussions click TIME Functions



  150. Yvette says

    I am using destiny patrol software it has a feature for the Officers to clock in and clock out as follows

    1003 / Sgt W. Lomax V 2013-01-06 03:00 OUT
    the date and punch in time is in the same column
    how can I create a formula and copy and paste the
    employees punch in time and clock in time so that
    the total hours are done for me…HELP

  151. Sasi says

    Hi Mynda,

    I want to calculate the time difference in excel. How should i do that?
    Need the formula.
    For e.g say,
    Start Time : 23:27:49
    End Time : 23:52:32
    how should i get the difference?

  152. Tasha says

    Hi Mynda,

    Is there a formula that can convert a given number of hours into days, hours, and minutes using 8 hours for the length of the day and display it as “X days, X hours, and X minutes”?

    For example – take a cell showing 66.25 hours and convert it to “8 days, 2 hours, and 15 minutes” displayed as the result.

  153. Kyle A says

    I have a custom time table for calculating time as follows:

    1-7 minutes = .1
    8-14 minutes = .2
    15-22 minutes = .3
    23-29 minutes = .4
    30 minutes = .5
    31-37 minutes = .6
    38-45 minutes = .7
    46-52 minutes = .8
    53-57 minutes = .9
    58-60 minutes = 1.0

    What is the best way I can calculate the time worked (i.e. 8:00am to 5:00pm in decimals using the above time table).

    Thanks in advance,

      • Kyle A says

        I hate to be a bother, but I read the tutorial and I just can’t seem to get it to do what I need it to do with the above time table. Do you have any advice?

          • Kyle A says

            My specific problem stems from a time table I use and that the increments aren’t divided equally into an hour. For example .2 on my time table represents a 6 minute increment while .3 is a 7 minute increment. I need a way for excel to add a start time and end time while resulting in the corresponding decimal listed below:

            1-7 minutes = .1
            8-14 minutes = .2
            15-22 minutes = .3
            23-29 minutes = .4
            30 minutes = .5
            31-37 minutes = .6
            38-45 minutes = .7
            46-52 minutes = .8
            53-57 minutes = .9
            58-60 minutes = 1.0

          • says

            Hi Kyle,

            Since there’s no consistent increment the best solution I can suggest is to use a VLOOKUP formula that references your table of times and corresponding decimal value.

            You can see an example of a VLOOKUP formula referencing a sorted list here.

            So, you would take your start time from your end time to get your elapsed time and then you’d reference the table to find the corresponding decimal value for your elapsed time.

            I hope that helps.

            Kind regards,


  154. sampson orisakwe says

    Hello Treacy,
    I am trying to calculate time duration in hours and minutes, i used a simple formular of end time-start time and evrything seem to be ok but i have some results that display ############### and from the time, i could see that all that have this problem are to calculate from PM to AM example 11:14 PM to 1:14 AM, 11:20 PM to 3:05 AM, 6:17:00 PM to 12:08:00 AM, 11:33 PM to 2:35 AM all others seem to be ok. what do i do pls?

  155. Cathie says

    OK. Lets see if I can expain this where its understandable. I have several tabs Jan – Dec in workbook. I also have YTD Summary Sheet. On each month I have several columns that have totals. I want total to automatically update on YTD page. I know how to do the formula for each column by itself but I would like to have a formula that I can copy over and it picks up the same totals on each sheet (Feb, mar, apr)…etc. and the YTD updates. Does this make sense? When I copy the first set of numbers and try to copy it down in the YTD worksheet the totals are zeros.

  156. Selena says

    Hi, hoping you can help me.

    I have a basic roster with start time and finish time, eg start 07:00, finish at 17:30. I want to calculate each person’s daily hours, so finish time MINUS start time and I need to automatically deduct their 30 minute lunch break without adding an extra column (so in fact they have been at work for 10.5 hours, but I only want to show up 10 hours as somehow I need to minus the 30 minute lunch break). Hope this makes sense.

    Many thanks

  157. john morrall says

    very helpful
    but having got timesheet working, i wanted to compare actual hours with contract hours to get hours worked over / (under)
    but, if the result is negative it will only display as ###########
    how can it be done?

    • says

      Hi John,

      You can convert the time to a decimal value first then subtract one from the other like this:


      Format the cell as general, not time.

      The result will be in fractions of hours. e.g. 1.5 which is the same as 1hr 30min.

      Kind regards,


  158. Cathie says

    I have a formula =mod(d3-c3,1) in a cell (formated with [h]:mm:ss) The answer is coming up “value! due to text being in d3…..which is ok? But now I need to add the whole column up and I’m getting “value! due to that word showing up in the column. How can I get a total for the rest of the times in that column.

    Thanks for your help in advance.

    • says

      Hi Cathie,

      You can use SUMIF like this:


      Where D1:D10 are the cells you want to sum. This will ignore any #VALUE! errors.

      Kind regards,


  159. Stephanie says

    I am trying to set up a work schedule that will add up each employees hours scheduled. Our store is open 5 a.m. – Midnight so we have every shift imaginable around the clock. I have the formula set up to accomodate basic shifts like 8 a.m. – 4 p.m. What I can’t get to work is 4 p.m. until 12 a.m. (I cannot use military time on my schedule). When I enter 4:00 p.m. – 12:00 a.m. I get 24 hours worked instead of 8 hours worked. I need a formula that will accomodate every employee working both the 8 a.m. – 4 p.m. as well as the 4 p.m. – 12:00 a.m. Make sense?

  160. Neil says

    Pls advise how can I arrive to real date of Nov.17 since the time is not yet arrived to 0600H to be tagged as Nov.18

    11/18/12 2:45

    *This should be round down to 11/17/2012 since the time is not yet arrive to 0600H. thanks!

    • says

      Hi Neil,

      Let’s say your date and time are in cell A1, you can use this formula:


      This assumes you don’t care what the time is you’re just interested in the date displaying correctly.

      If you want the time component to be left off on dates that are rounded down you can use this formula:


      Kind regards,


  161. says

    Hello I would like to calculate the total hours worked in a day, which are spread over 3 separate jobs on a timesheet. For Example:

    Start Finish Admin time
    Monday Cell A1 Cell B1 Cell D1
    8:00 12:00 1:00
    Cell A2 12:00 14:00 0:00
    Cell B2 14:00 19:00 1:00

    Is there any way that I can merge cells E1 – E3 to calculate the total hours worked in that day – the admin hours worked in that day? I want to see them in the one cell, and not in three different totals for that day. when the cell is merged, it only sees the sum for the first line.

    Tool Working Hours/Mins Admin Hours / Mins chargeable
    02:00:00 1:00 1:00
    03:30:00 1:00
    03:30:00 1:00

    Many thanks in advance for your help and I look forward to hearing from you.

    Kind regards,

  162. Sachin Zarkariya says

    I want to add timing in serial number with increasing order +3min,+15 min,+30 min etc.please help me to find out formula

  163. Venus says

    Hi Mynda,

    I saw your blog and find it easy to understand. Maybe you can help me with the solution of this problem, create a solution related to time – when time in is entered on the declaration cell solution will tell if an employee is late for how many hours &/or minutes or an employee is on time or early.
    WorkTime: 8:00 AM
    TimeIn: 9:15 AM
    Time check result: 1 Hour and 15 minutes Late

    • says

      Hi Venus,

      You can do a simple sum to calculate the difference between two times.

      Let’s say WorkTime is in cell A1 and TimeIn is in cell B1, you can simply enter =B1-A1 in a spare cell and it will calculate the time late. Format the cell with a time format and it will display the ‘time check result’ 1:15

      Kind regards,


      • Venus says

        Hi Mynda,

        Thannks for the help. I already did what you have told but the thing is the result must exactly be “1 Hour and 15 minutes Late” not just 1:15. What condition can I used in order to show the Hour and minutes Late?

        • says

          Hi Venus,

          You can set up a custom number format as follows:

           [h]" hour(s) "mm" minute(s) late"

          This will format 1:15 as ‘1 hour(s) 15 minutes(s) late’.

          To insert a custom number format select the cell containing the time you want formatted > press CTRL+1 to open the format cells dialog box.
          On the Number tab under Category choose ‘Custom’.
          In the ‘Type:’ field enter the format above then press ok.

          Kind regards,


  164. Evelyn says

    I’m trying to make a worksheet that calculates time plus drive time into hrs. Time In time out, time in time out plus drive time = how many hrs: 6:00am 11:00am, 12:00pm 3:00pm plus 1hr 15min drive time.

    • says

      Hi Evelyn,

      You can use this formula:


      Where your 4 time values are in cells B1:D1 and you add the additional 1 hr 15 minutes using the TIME function.

      Alternatively you can put the 1hr 15min in another cell, entered as 1:15, and add that cell to the formula in place of the TIME function.

      Kind regards,


  165. Laura says

    CORRECTION — Sorry, it’s late and I made some errors.

    I hope you can help me unravel a mystery. We have one customer who insists that we bill jobs in tenth hour increments only (.1, .2, .3, etc.), but allows us to round everything up to the next tenth of an hour. Examples:

    Amount of time worked: Amount we bill:
    .01 of an hour to .10 of an hour .1 of an hour
    .11 of an hour to .20 of an hour .2 of an hour
    .21 of an hour to .30 of an hour .3 of an hour

    To simplify the spreadsheet, let’s say I am using the following columns:

    A — Start Time
    B (formula) =(A1-INT(A1))*24
    C — Stop Time
    D (formula) =(C1-INT(C1))*24
    E (formula) =D1-B1
    F (formula) =ROUNDUP(E1,1)

    If I enter the following:
    A — 6:10 AM
    B (formula result) is 6.16666667
    C — 6:40 AM
    D (formula result) is 6.66666667
    E (formula result) is .5
    F (formula result) is .5

    This is CORRECT! This is exactly a half hour, so it’s the amount I want to bill.

    But, if I enter the following:
    A — 7:10 AM
    B (formula result) is 7.16666667
    C — 7:40 AM
    D (formula result) is .66666667
    E (formula result) is .5
    F (formula result) is .6

    This is NOT CORRECT! This should be exactly a half hour, not 6/10ths of an hour.

    Some time ranges work correctly, but others do not work correctly. More examples that do not work correctly are:

    7:20am – 7:50am
    12:10pm – 12:40pm
    1:10pm – 1:40pm
    3:10pm – 3:40pm

    These are just a few examples. We work and bill for any amount of time, but I have only been working with 1/2 hour increments to make it easy for me to troubleshoot, but I don’t know what is happening. It seems like ROUNDUP would be the correct formula to use and that an exact amount should NOT round-up to the next tenth of an hour. In other words, if the amount we worked was 1/2 hour, ROUNDUP should result in .5, not .6 as some of the above examples show. If we worked .51 hours, it should round up to .6.

    Can you help me figure this one out? It has me stumped.

    Thank you for your help!

    • Laura says

      Hi again, Mynda…I’ve spent hours on this. Incidentally, =TIMEVALUE does not work properly in all cases either. I’ve tried all iterations of ROUNDing that I can think of, increased/decreased the number of decimal places, etc. If you can help, I would be most appreciative! The formulas seem to work in “most” cases, but not all which I assume is related to the conversion of time values to numeric values.

      BTW, to clarify how we bill this customer:

      If we work .01 of an hour to .10 of an hour, we bill .1 of an hour
      If we work .11 of an hour to .20 of an hour, we bill .2 of an hour
      If we work .21 of an hour to .30 of an hour, we bill .3 of an hour

      Thank you for any insight you can provide!!!

      • says

        Hi Laura,

        You can use this formula to round up to 10 minute increments and show as fractions of an hour:

        =ROUNDUP((stop time - start time)*24/(10/60),0)*10/60

        Kind regards,


        • Laura says

          Thank you for your help, Mynda. I’m still having trouble and am hoping you can steer me in the right direction.

          1. I entered 12:10 AM in A1 and 12:40 AM in A2, then 1:10 AM in B1 and 1:40 AM in B2, all the way down to 11:10 PM in A24 and 11:40 PM in B24 — therefore, all 24 time ranges should return .5 hour. I ensured that all 48 cells (A1-B24) were formatted as Time.

          2. I entered =ROUNDUP((A2-A1)*24/(10/60),0)*10/60 in cell C1 and copied the formula down through C24, and ensured all 24 cells (C1-C24) were formatted as Number.

          3. Some of the formulas returned .50 perfectly, and some of them returned .67.

          4. In an attempt to troubleshoot, I then entered from and through values that correctly returned .50 into cells where the formula was returning .67 to see what happened, and they STILL returned .67! In other words, sometimes 3:10 AM – 3:40 AM returned .50 and other times it returned .67.

          I checked, double-checked and triple-checked to ensure that everything looks right, formatting is the same, etc. I cannot see anything that looks “off” at all.

          Do you have any ideas what I may be doing wrong? Or is it Excel? I am using Excel 2008 for Mac version 12.3.4 — could that have anything to do with this problem I’m encountering?

          Thanks again for any wisdom you can impart. I truly appreciate your time and expertise!


  166. Ray Maruschak says

    Let me applaud your writing style. I enjoy readying your material.

    The calculation I’d like you to cover is this:

    I need to arrive at work at 9:00 AM.
    I need 90 minutes to get ready in the morning and travel to work.
    I need the calculation to tell me what time I should get up. That would be 7:30 AM. I hope to learn what formulas to use to calculate what time I should get up. I hope to learn what formatting to use to calculate what time I should get up.

    Thanks for asking.

    • says

      Hi Ray,

      Thanks for your kind words :)

      Let’s say in cell A1 you have your arrival time of 9:00, in cell A2 you can enter this formula:


      Result = 7:30

      The syntax for the TIME function is =TIME(hour,minute,second)

      Kind regards,


  167. Judy England says

    Hello –
    Do you know an “IF” formula for determining if a list of times is between (for example) 7:00 PM and 7:00 AM, then marking these as FREE and any other times outside that window, as PEAK?

    Thanks for any help you can provide.


  168. Monica says

    I am trying to calculate the number of 15 minute increments. I have the time stated in hours, minutes and seconds (1:01:16) in cell A1. I’d like to calculate this to be 4 increments in cell A2. How do I do that?

  169. andrew says

    i would like to know if there is a formula to calculate working time minus breaks ie 45 mins within the 24 hour period and above so if start time is 02:00 and finish time is 17:00 minus 45mins brk and also within the same cells the same could calculate for 14:00 start to 05:00 finish minus brks and still leave the correct answer after the 24hour clock

      • Katie says

        Hi Mynda, thanks for your explanation, it is the clearest one I’ve been able to find anywhere! You’ve already solved half of the trouble I was having.

        What I could use help with now: how can I sort rows by time of day? I’m trying to make a schedule for cooking a complicated menu and I was able to input the prep and cooking times I would need for each item (and display as actual h:mm using your tips, thank you!).

        Now I want to make a schedule, working backward from the meal time. So if we want to eat at 7pm, the roast needs to go in at 3pm (7pm-4 hours), roast prep begins at 2pm (7pm-5hrs), etc. I have each to-do on its own row and was able to get the calculations to work. But when I try to resort them to see which thing needs to be done first, second, last, all of the calculations get screwed up.

        I’m not including the meal time cell in the cells for sorting. I used smallest to largest for the sort, is there another criteria I should use?

        Thanks for your help!

        • says

          Hi Katie,

          There is no easy way to do this with sorting. You can use an array formula to extract a sorted list for the times:

          =SMALL(IF(ISNUMBER(list), list, ""), ROWS($B$1:B1))

          Entered with CTRL+SHIFT+ENTER
          Where your list of numbers is in a named range called ‘list’ in column B, and cell B1 is blank.

          This will extract the times sorted, you can then use an INDEX & MATCH functions to match up the tasks to the times:


          Please refer to the attached file for an example.

          Kind regards,


  170. ramesh narne says

    =09/30/2012 23:45+”9:30″ then its giving #Value!
    =10/08/2012 04:01+”9:30″ then its giving 10/08/2012 13:31
    in excel 2007
    same above working fine on my friend PC giving date time at line 1
    i.e. 09/31/2012 9:15
    this we do for convering EST to IST
    do i need to change any options in my excel options, please help.

    • says

      Hi Ramesh,

      I don’t know. I get errors with both of those scenarios on my PC. Why are you adding the 9:30 as text, i.e. surrounded by double quotes like this “9:30”? Have you tried to add it without the double quotes?


  171. Nigel says


    I am using a macro to format the content of a CSV file and convert it to an XLSX file. My only problem is that chargeable time (in minutes) is shown in the CSV file as a bare figure e.g. 6, rather than 00:06. What formatting should I apply to the chargeable time column in Excel (2010) to get it to show ‘6’ as ’00:06′?


    P.S. Article above about time formatting is very useful – thanks.

  172. Lee Graves says

    I am having a problem adding up timings for build project. I am able to add hh:mm:ss, but my timings are in dd:hh:mm.
    Currently have times in seperate columns, (dd, hh, mm) but then have to work out the carry overs. And dont really want to covert days to hours for inputting. Any ideas of best way to add….
    Typical values are 1d,20h,37m…2d,10h,0m…3d,3h,24m..

    • says

      Hi Lee,

      I’m assuming the data in your columns are simply the number value, you don’t have d, h or m appended to each value. If so you can use this formula to calculate the time for each row (where column A contained your days value, column B = hours and C = minutes):


      Then you can SUM the column for the above formula and format the time as [h]:mm and it will correctly add up the total as a total hours and minutes.

      Note: if the number of days is >31 the above formula will not work.

      I hope that is what you were after. Please let me know if not.

      Kind regards,


  173. Alice Cansdell says

    I have time sheets entered in Excel that I need to calculate down to 5 minute time periods at the lowest for billing of clients. I am going around in circles.

    So if the staff enter 9.00 (in cell A1) and 9.05 (in cell B1)
    I want it to calculate the 5 minutes in cell C1, so my bottom total shows total hours for the month and we can calculate charge out rate on that in cell D.
    It is not always 5 minutes though could be 1hr, half hour, 25 minutes, so I need a formula that covers all possible scenarios between 5 minutes and 8 hours (max day) for a task.

    Hope that makes sense…

    • says

      Hi Alice,

      I wasn’t sure if you meant the minimum amount you charge out is 5 minutes or, you want to charge out in 5 minute increments or both. If the minimum amount is 5 minutes then you can use this formula:


      Or, if you want to charge out at a minimum of 5 minutes and then in 5 minute increments you can use this formula:


      In both cases the total of your column needs to be formatted as custom number format [h]:mm so that the hours calculate correctly.

      I hope one of those is what you were after. Please let me know if not.

      Kind regards,


  174. Tracey says

    I need to create an autocalculating timesheet for my work. There is an error somewhere in my formula’s which, when converting the decimal calculation (Column F) into time (Column G), displays o’clock minutes as h:60 rather than h:00. for example, if the amount of hours was 8, rather than displaying as 8.00, the cell displays as 8.60, see below
    C D E F G
    Start Meal Finish Calculation Normal Hours
    8.00 0.3 17.00 8.5 8.30
    8.30 0.3 17.00 8.0 8.60 (Should display as 8.00)

    Formula for column F is
    =IF(E7>=1,(INT(E7) +( (MOD(E7,INT(E7))*100)/60)),(E7*100)/60) – IF(C7>=1,(INT(C7) +( (MOD(C7,INT(C7))*100)/60)),(C7*100)/60)-IF(D7>=1,(INT(D7) +( (MOD(D7,INT(D7))*100)/60)),(D7*100)/60)

    Formula for column G is
    =INT(F7) & “.” & RIGHT(“0” & ROUND(MOD(F7*60,60),0),2)

    Can you please help??



    • says

      Hi Tracey,

      For some reason the MOD function in column G is calculating MOD(F7*60,60) as 59.99999′ when it should be 0. The round is then rounding the 59.999′ up to 60, hence your result of 8.60.

      That aside, I would have thought if you wanted your fractions converted to time you should end up with a time value as opposed to a decimal value.

      i.e. your end result should be 8:30 not 8.30 since 8.30 is actually 8 hours and 18 minutes (60 minutes x .30), not 8 hours 30 minutes. If you were to use your result in a formula it would give the incorrect time.

      If you simply want to convert your fractions to time then in column G you can use this formula:

      =G7/24 and then format it with a custom number format h:mm.

      This will display 8.5 as 8:30.

      I hope that gives you the desired result. Please let me know if not.

      Kind regards,


      • Shazif says


        I just want the sum of a month’s overtime to be displayed in HH:MM format how can i do that because i couldn’t find the format specified by you in excel 2003.


        • says

          Hi Shazif,

          Sorry, to format time as hh:mm create a custom time format:

          1. CTRL+1 to open Format Cells dialog box
          2. On the Number Tab select Custom from the ‘Category’ list and type hh:mm in the ‘Type’ field.
          3. Press OK

          Kind regards,


  175. Suzanne Ramsden says

    Hi I am trying to work out a finishing time based on a variable rate, my rate calculations seem to be fine, it is when i try and divide the quantity by the rate, and then add the current date/time that i am generating impossible times, can you help please!!

  176. Sophia German says

    Hi i need excel to count down in time ie i have to work 24 extra hours and every time i work i take of the time worked until i have no hours left. how do i do that as it wont count down in minutes.

    • says

      Hi Sophia,

      You need to make sure you do two things:

      1. enter your time in this format hh:mm:ss e.g. 24:00:00 is 24 hours, zero minutes and zero seconds.
      2. make sure your number format is set to [h]:mm:ss

      You can then enter the following:

      Cell A1 extra hours to work: 24:00:00
      Cell A2 extra hours worked day 1: 0:24:00
      Cell A3 extra hours worked day 2: 0:45:00
      Cell A4 =A1-SUM(A2:A3) 22:51:00

      I hope that makes sense. Let me know if you’re still stuck.

      Kind regards,


  177. Angelica says

    hi can you teach me how to add up duration of calls in seconds?

    what formula should i type in and how to customize it on format cells.. thank you so much! :)

    • Mynda Treacy says

      Hi Angelica,

      First of all you need to format your data so that you record the hour:minutes:seconds. I presume your data above is just minutes:seconds.

      e.g. the first value is actual 0 hours, 0 minutes and 6 seconds. If so, in Excel you need to enter it as:


      You can then simply SUM your column and set your cell format to a custom number format [ss] as in the example in the tutorial above.

      Kind regards,


  178. Kaushik Dutta says

    The workbook that you have asked to download does not have any xlsx file, instead all are xml files, so not able to view.

    It would be great if you could explain hoe to capture start time and end time for certain activities (in a day) using excel formulas only..


    • Mynda Treacy says

      Hi Kaushik,

      The workbook is a .xlsx file. Your browser is changing the file extension (probably to a .zip) when you download it. All you need to do is download it again but before you save it make sure the file extension is .xlsx by typing over the file extension in the ‘file save as’ field (or equivalent in your broswer).

      I hope this helps.

      Kind regards,


  179. Amy says

    How do I add/subtract time as a function? ie. 6:00:00AM is the first time and I want each row following to add 22min30sec / 00:22:30 (row 2: 6:22:30AM, row 3 2:45:00AM and do so on).

    Also, in the next column, I want to copy the same formula as above but at a 2hr time difference (ie. starting at 4am).

    • Mynda Treacy says

      Hi Amy,

      Thanks for your question. You can use the TIME function to specify how many minutes and seconds you want to add. Let’s say your start time of 6:00:00AM is in cell A1. Your formula in cell A2 will be like this:


      The syntax for the TIME function is =TIME(hour,minute,second)

      You can then copy the formula from cell A1 down the column as far as you need.

      You can use the TIME function to solve your second problem too. Let’s say your starting time of 4:00:00AM is in cell B1, your formula will be:


      I hope that helps.

      Kind regards,


  180. Martin says

    I am trying to calculate how much time is “owed” if an employee works a shorter day than normal. however when i subtract the total time worked from the number of hours that should be worked i get ######. Can you help

    • Mynda Treacy says

      Hi Martin,

      The #### error indicates that the column width is too small. You need to widen the column to see the result. It is then possible that the cell formatting is not the one you want, so you may need to change the number format to see it as a number as opposed to a time or vice versa.

      Kind regards,


  181. Donna says

    I’m trying to create a time card where I can enter time as for example: 8:30 AM to 12:45 PM (4 hours 15 minutes) but need the total hours displayed as 4.25 How can I do this in Excel? Thanks!

    • Mynda Treacy says

      Hi Donna,

      You need to calculate the 4:15. In one cell enter your start time (say A1), in another enter your finish time (say A2) and in a third cell enter your formula =(A1-A2)*24. Format your cell as a number.

      You should be good to go.

      Kind regards,


  182. Shalini says


    Let me know the time calculation indetails as we have to calculate the working hours where in emplyee has been on break very frequently.



  183. Tarak says

    Dear Madam,
    I am typing 10:30 but the cell is showing 0.4375. Why and how can it show 10:30. I have gone to custom and done everything as per your guidelines.
    Thanks for sharing such useful tips. Regards,

    • Mynda Treacy says

      Hi Tarak,

      The 0.4375 is displaying because the cell is formatted as ‘General’. You need to change the format of the cell to a Time format. To do this:

      1. Press CTRL+1 to open the Cell Formatting dialog box
      2. On the Number tab choose ‘Time’
      3. Choose the time format you want from the list or,
      4. Create a custom number format by clicking on ‘Custom’ in the ‘Category’ list, then enter hh:mm in the ‘Type’ field and press OK.

      If this still doesn’t work then I suspect the value of 0.4375 is entered as text. If so; delete the value, then format the cell as described above and re-type the value in the cell. Don’t copy and paste it from somewhere else, but if you do make sure you Paste Special > Values.

      I hope that helps.

      Kind regards,


  184. Nyhsiro says

    I have a for me difficult question. Couldyou help me out.
    I like to have a formule where i can calculate the hours i worked in shift.
    For some hours i get a surcharge on my hourly rate.
    I give an example.
    i have worked on saturday from 06:30 to 22:30
    The formule should show me the foolowing result.
    1½ hour against 138% (time between 06:00-08:00) * hourrate
    4 hours against 100% (time between 08:00-12:00) * hourrate
    8 hours against 138% (time between 12:00-22:00) * hourate
    0,5 hours against 149% (time between 22:00-24:00) * hourate
    14 hours (total) Total : earnings

    could help me to find the formule.
    I also start my work in the evening, for example
    start sun 23:30 = 0,5 hour 160%
    monday 07:30 = 6,0 hours 144% * hourrate
    1,0 hours 122%
    0,5 hours 100 %
    total 8,0 hours


    • Mynda Treacy says

      Hi Nyhsiro,

      I think the simplest solution is to use helper cells to identify which hours worked fall into the ‘surcharge’ rates. You can use an IF statement to identify the number of hours that are at 138%, 149% and 100%, then apply your rate to that.

      Combining all these rules into one formula would be cumbersome and I’d recommend you don’t do it that way.

      I hope that gives you some food for thought.

      Kind regards,


  185. David says


    I am trying to do an “IF” statement on the following data, where “if” the the montly total time is 40 display 40, else display total time.

    Here is the formula that is resulting in a bogus number (16:00 – hh:mm):

    Monthly Total Time

    33:35 Total Time (sum)

    16:00 If Statement Results

    Can you help?


    • Mynda Treacy says

      Hi David,

      I couldn’t replicate your 16:00 result but I suspect it’s to do with the formatting of the cell.

      I used the following formula:


      Make sure it’s formatted with custom format [h]:mm:ss

      Let me know if that fixes it.

      Kind regards,


  186. lori says

    Hi – how do I add up tasks (say, 30 minutes, 1 hour, 15 minutes) to find out how much time to allot? I have the formula working using h:mm (that is, the sum is correct) but it shows me 0:00 or 12:00 instead of :30 like I’d like it to display. ThankS!

    • Mynda Treacy says

      Hi Lori,

      Thanks for your question.

      When you type in the time you want to add up you need to enter it like this (using your time examples):


      Total 1:45

      If you view the actual time in the formula bar you will see the following:

      12:30:00 AM
      1:00:00 AM
      12:15:00 AM

      I hope that helps.

      Kind regards,