Show time over 24 hours, 60 minutes, 60 seconds in Excel

The article shows a few tips to calculate and display times that are greater than 24 hours, 60 minutes, 60 seconds.

When subtracting or adding time in Excel, you may sometimes want to display the results as the total number of hours, minutes or seconds. The task is a lot easier than it may sound, and you will know the solution in a moment.

How to display time over 24 hours, 60 minutes, 60 seconds

To show a time interval of more than 24 hours, 60 minutes, or 60 seconds, apply a custom time format where a corresponding time unit code is enclosed in square brackets, like [h], [m], or [s]. The detailed steps follow below:

  1. Select the cell(s) you want to format.
  2. Right click the selected cells and then click Format Cells, or press Ctrl + 1. This will open the Format Cells dialog box.
  3. On the Number tab, under Category, select Custom, and type one of the following time formats in the Type box:
    • Over 24 hours: [h]:mm:ss or [h]:mm
    • Over 60 minutes: [m]:ss
    • Over 60 seconds: [s]

The following screenshot shows the "over 24 hours" custom time format in action: Display a time interval over 24 hours

Below are a few other custom formats that can be used to display time intervals exceeding the length of the standard time units.

Description Format code
Total hours [h]
Hours & minutes [h]:mm
Hours, minutes, seconds [h]:mm:ss
Total minutes [m]
Minutes & seconds [m]:ss
Total seconds [s]

Applied to our sample data (Total time 50:40 in the screenshot above), these custom time formats will produce the following results:

A B C
1 Description Displayed time Format
2 Hours 50 [h]
3 Hours & minutes 50:40 [h]:mm
4 Hours, minutes, seconds 50:40:30 [h]:mm:ss
5 Minutes 3040 [m]
6 Minutes & seconds 3040:30 [m]:ss
7 Seconds 182430 [s]

To make the displayed times more meaningful to your users, you can supplement the time unites with the corresponding words, for example:

A B C
1 Description Displayed time Format
2 Hours & minutes 50 hours and 40 minutes [h] "hours and" mm "minutes"
3 Hours, minutes, seconds 50 h. 40 m. 30 s. [h] "h." mm "m." ss "s."
4 Minutes 3040 minutes [m] "minutes"
5 Minutes & seconds 3040 minutes and 30 seconds [m] "minutes and" ss "seconds"
6 Seconds 182430 seconds [s] "seconds"

Note. Although the above times look like text strings, they are still numeric values, since Excel number formats change only the visual representation but not the underlying values. So, you are free to add and subtract the formatted times as usual, reference them in your formulas and use in other calculations.

Now that you know the general technique to display times greater than 24 hours in Excel, let me show you a couple more formulas suited for specific situations.

Calculate time difference in hours, minutes, or seconds

To calculate the difference between two times in a specific time unit, use one of the following formulas.

Time difference in hours

To calculate hours between the start time and end time as a decimal number, use this formula:

(End time - Start time) * 24

To get the number of complete hours, utilize the INT function to round the decimal down to the nearest integer:

=INT((B2-A2) * 24)

Time difference in minutes

To calculate minutes between two times, subtract the start time from the end time, and then multiply the difference by 1440, which is the number of minutes in one day (24 hours*60 minutes).

(End time - Start time) * 1440

Time difference in seconds

To get the number of seconds between two times, multiply the time difference by 86400, which is the number of seconds in one day (24 hours*60 minutes*60 seconds).

(End time - Start time) * 86400

Assuming the start time in A3 and end time in B3, the formulas go as follows:

Hours as a decimal number: =(B3-A3)*24

Complete hours: =INT((B3-A3)*24)

Minutes: =(B3-A3)*1440

Seconds: =(B3-A3)*86400

The following screenshot shows the results: Calculating time difference in hours, minutes, or seconds

Notes:

  • For correct results, the formula cells should be formatted as General.
  • If the end time is greater than the start time, the time difference is displayed as a negative number, like in row 5 in the screenshot above.

How to add / subtract more than 24 hours, 60 minutes, 60 seconds

To add a desired time interval to a given time, divide the number of hours, minutes, or seconds you want to add by the number of the corresponding unit in a day (24 hours, 1440 minutes, or 86400 seconds), and then add the quotient to the start time.

Add over 24 hours:

Start time + (N/24)

Add over 60 minutes:

Start time + (N/1440)

Add over 60 seconds:

Start time + (N/86400)

Where N is the number of hours, minutes, or seconds you want to add.

Here're a few real-life formula examples:

To add 45 hours to the start time in cell A2:

=A2+(45/24)

To add 100 minutes to the start time in A2:

=A2+(100/1440)

To add 200 seconds to the start time in A2:

=A2+(200/86400)

Or, you can input the times to add in separate cells and reference those cells in your formulas like shown in the screenshot below: Add over than 24 hours, 60 minutes, 60 seconds

To subtract times in Excel, use similar formulas but with the minus sign instead of plus:

Subtract over 24 hours:

Start time - (N/24)

Subtract over 60 minutes:

Start time - (N/1440)

Subtract over 60 seconds:

Start time - (N/86400)

The following screenshot shows the results: Subtract over than 24 hours, 60 minutes, 60 seconds

Notes:

  • If a calculated time displays as a decimal number, apply a custom date/time format to the formula cells.
  • If after applying custom formatting a cell displays #####, most likely the cell is not wide enough to display the date time value. To fix this, expand the column width either by double-clicking or dragging the right boundary of the column.

This is how you can display, add and subtract lengthy time intervals in Excel. I thank you for reading and hope to see you on our blog next week!

200 comments

  1. Could you please assist? I am trying to convert seconds to months, days, hours and mins however if it cannot be converted to months then days hours and mins will do. Currently, I have 6819518 seconds which comes to 2months 18days 22hours 18min or 78days 22hours 18min. This is the formula I have currently am using however it becomes an issue when there is more than 30 days. I tried changing 86400 to 2592000 but not yielding the results I need. Any help is greatly, greatly appreciated!!

    IF(ISERROR(TEXT(A1/86400,CHOOSE(MATCH(A1,{60,3600,86400},1),"[m] ""min""","[h] ""hrs"" m ""min""", "d ""days ""h ""hrs"" m ""min"""))), 0, TEXT(A1/86400,CHOOSE(MATCH(A1,{60,3600,86400},1),"[m] ""min""","[h] ""hrs"" m ""min""", "d ""days ""h ""hrs"" m ""min""")))

    • Hello!
      To convert seconds to days, hours, minutes and seconds, use these formulas:
      days (in G3)
      =INT(E2/(60*60*24))

      hours (in H3)
      =INT(E2/(60*60))-G3*24

      minutes (in I3)
      =INT(E2/60)-G3*24*60-H3*60

      seconds (in J3)
      =--RIGHT(E2,2)

      I hope it’ll be helpful.

  2. Good evening sir,
    I have downloaded a file from online and the time is in the format of 000:56:30, 0101:34:66, 132:43:00, 000:34:32, 0345:56:34, 0056:12:35 and so on in this format. While selecting the columns the task bar is showing count of numbers only but not sum of the time and the average. I have used TEXT(Value,"[H]:MM:SS") and after that used TIMEVALUE of that function and it is showing as #Value. I have tried using TIME(HOUR,MINUTES,SECOND) it is showing as #value. Please solve the above problem. I will post u file to Email also if you provide email. Pls solve it.
    Thank you.

      • Sir,
        I want to get total sum and sorting of these column in ascending or descending order sir.

        • Hi,
          To convert the text 0345: 56: 34 to time, convert the text to a number. For example, if this text is written in cell A1, use the formula

          =--A1

          Please check out this article to learn how to convert text to number with formula and other ways.

          • Sir I have used the formula it is giving the result #Value. Please provide your email I'd so that I can send file to you sir. Or please send me an email so as to send the file to you sir.

            • Hello!
              Use the following formula:

              =IF(LEFT(A1,2)="00",--MID(A1,3,20),--A1)

              Please note that 0101:34:66 is not the time. There are no 66 seconds.

      • Sir
        I want to have the sum of those column in time format and want to have sort in ascending or descending order

  3. I am looking to identify the total minutes for the following that has been split into days, hours, minutes, seconds: in the format of 01:04:56:05
    01 - in theory 24 hours
    04 - 4 hours
    56 - minutes
    05 - seconds
    I should be able to see: 1736 minutes

    • Hello!
      To convert hours into minutes, you must first multiply the specified time by 60 (the number of minutes in one hour), then by 24 (the number of hours in one day). In other words, we need to multiply time by 1440.
      I believe the following formula will help you solve your task:

      =TIMEVALUE(MID(A1,4,20))*1440+60*24*(--LEFT(A1,2))

      Hope this is what you need.

  4. How to add 6 hour 24 min 40 secs + 2 hours 39 min 30 secs

  5. How easy was that...?! Beautifully explained and so easy to follow. Thank you for the first rate help.

  6. Hi guys,

    I have a start time of 18:00 and end time is 01:00 the next day, when I calculate = End time - Start time I get a negative value of -17 instead of 7 hours . Which formula to use to to get the correct positive value of 6?

  7. Thank you after struggling to find it in the Excel help. 30 seconds of searching on Google and reading your article fixed it.

  8. Hi excel specialist
    How can I change from excel format from 24-00 to 24.00. what is the formula
    Pls. advise thanks in advance hope to hear from anyone.

  9. Setting up a time card, I have 9 columns, 3 sets of IN time and OUT time. I can get columns to add up using a 24 hour format when it's a low vs a high hour such as IN:0600 / OUT:1600 for a total of 10 hours. However, what I can't figure out is how to formulate In:2000 / OUT:0600 for a total of 10 hours as the amount of time worked was 10 hours.

    I know out how to get it to auto sum hours worked when I format the cell (mm/dd/yyyy h:mm) but that over populates the time card and makes it a lot harder to read. Is there a way to auto calculate the total hours worked using (h:mm) and auto sum the 3 column sets into a single total hours worked regardless of what day and time they clocked in?

    My crews work 24 hour rotating shifts logging between 8 to 14 hours at a time. They also check out between the start and end of the shift and have to clock back in.

    For Example; IN-19:00 (Begin Shift) OUT-24:00 (30 Min Meal) / IN-00-30 OUT-0330 (30 Min Rest) / IN-0400 OUT-0600 (Time to go Home) Total time worked: 10 Hours

    I want to set up a time card they can just put in the time they clock in and the time they clock out to simplify their lives. It'll also help keep from displaying unnecessary data for our finance clerk and speed the processing of payroll up.

    • Hello Rick!
      If the end time is longer than the start time, then you need to add 1 day to their difference

      =IF(A1 > A2,A2-A1+1,A2-A1)

      If you need the number of hours to be more than 24, use the custom format [h]:mm:ss.
      I hope this will help, otherwise please do not hesitate to contact me anytime.

  10. Kindly help this condition
    my job time 9:00 am and grace time start 9:15 am
    I want to calculate 9:16 am to start late time in minutes

    reply

  11. I want to calculate the attendance sheet but the hours total in not coming right.
    ... .. but when i get the total time it gives wrong answer. i have change formatting using different time format but did not get the right answer.
    Please help me to solve this problem. total weekly hours 8 to 4 pm (wait for your reply)
    regard.
    Maqsood
    time in Time out time in time out
    8:30 3:45 8:00 4:00

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

  12. Hi,
    I have a data dump from a scheduling system that displays the time in excel as follows:
    1.00:48:34 - I am reading this as 1 day, 48 minutes, 34 seconds.
    1.10:19:09 - 1 day, 10 hours, 19 minutes and 9 seconds.
    When I try to add these cells in Excel, I get nothing. What time format can I convert these to and/or what formula could I use?

    • Hello Alan!
      If I got you right, the formula below will help you with your task:

      =LEFT(A1,FIND(".",A1,1)-1)+TIMEVALUE(RIGHT(A1,8))

      Please go to Format Cells, choose Number -> Custom Format and set

      d"d."h"h."mm"m."ss"s."

      I hope this will help, otherwise please do not hesitate to contact me anytime.

  13. Hi, I'm trying to subtract 2 hours from 01:30:00. It should give me 23:30:00 but I keep getting an "#########" answer.

    • Hello Stan!
      If the end time is greater than the start time, the following formula should work for you:

      =IF(B3 > B1,B1-B3+1,B1-B3)

      To the start time you need to add 1 day.
      I hope it’ll be helpful.

  14. How do I get 1 hour to show as 60 minutes in excel? Example: it shows 1:00:00.0 currently but would like it to show 60:00.0 instead.

    • Hello Adam!
      Please go to Format Cells, choose Number -> Custom Format and set
      [mm]:ss.0;@

      I hope this will help, otherwise please do not hesitate to contact me anytime.

  15. HOW CAN I CONVERT 110.5HRS TO DAYS / HOURS / MINUTES IN EXCEL FORMULA

    PLEASE HELP

    • Hello Jerry!
      Please use the following formula
      =A1/24
      Then go to Format Cells, choose Number -> Custom Format and set
      dd:hh:mm;@
      or
      dd"d." hh"h."mm"m.";@

  16. Thankyou so much for valuable information. It's working obsolutely fine.

  17. After Computing the formula i got Month 1 Total Extra Hours Worked A1= 17 hours, and computing month 2 total Extra hours Worked A2 = -5 Hours. Now please tell me the formula for getting 17 hrs (-) -5 hrs. How to get 12 hrs as answer.

  18. Thnaks so much

  19. I need to subtract dates and time where the numerator is MM/DD/YY HH:MM (military time, cell = O8) is in one cell and the denominator is in two separate cells one for date (cell = A8) the other for time (cell = W8).

  20. Very useful and helpful explanation and information.TQ

Post a comment



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