To input time duration in Excel, enter the time using the format hours:minutes:seconds (e.g., 10:30:00 for ten hours and thirty minutes) and apply the [h]:mm:ss custom number format to prevent the clock from resetting every 24 hours. This ensures that Excel treats the value as an elapsed amount of time rather than a specific time of day.
Excel handles time as a fraction of a day. For example, 12 hours is stored as 0.5 because it is half of a 24-hour period. When you enter a time like 10:00, Excel often assumes you mean 10:00 AM. To use Excel for durations—such as tracking project hours, athlete lap times, or machine uptime—you must tell the software to ignore the standard 24-hour clock cycle. This allows you to sum hours beyond 24 without the total reverting back to zero.
What You'll Need
- Microsoft Excel (Desktop version for Windows or macOS is recommended for full custom formatting options).
- A dataset of time values or a planned list of durations to track.
- Basic familiarity with the Excel Ribbon and the Format Cells dialog box.
Step-by-Step
- Enter Your Data: Click on a cell and type your duration using colons. For example, if a task took 5 hours and 15 minutes, type
5:15. If it took 5 hours, 15 minutes, and 20 seconds, type5:15:20. Press Enter to confirm. - Select the Cells: Use your mouse to highlight the individual cell, the entire column, or the range of cells containing your time durations.
- Open Format Cells: Right-click the selected area and choose Format Cells... from the context menu. Alternatively, you can use the keyboard shortcut
Ctrl + 1(Windows) orCmd + 1(Mac). - Access Custom Formatting: In the Format Cells window, click the Number tab. In the Category list on the left, scroll down to the bottom and select Custom.
- Enter the Duration Code: In the Type: input box, delete whatever is currently there and type exactly:
[h]:mm:ss. The square brackets around the 'h' are the critical part; they tell Excel to accumulate hours rather than resetting the count after 24. - Apply and Confirm: Click OK. Your cells will now display the total elapsed time. If you only need hours and minutes, you can use
[h]:mm. - Calculate Totals: To sum these durations, click in a cell below your list and use the
=SUM()function. For example,=SUM(A1:A10). - Format the Total Cell: Often, the total cell will default back to a standard time format (showing a small number instead of the total hours). Repeat steps 3 through 5 on the total cell to ensure it also uses the
[h]:mm:ssformat.
Common Mistakes
The most frequent error is entering time as decimals. For instance, typing 5.5 to represent five and a half hours. Excel interprets 5.5 as five and a half days (132 hours). To represent 5 hours and 30 minutes, you must use the colon: 5:30.
Another common mistake is neglecting the square brackets in the custom format. If you use h:mm:ss (without brackets), and your total duration is 25 hours, Excel will display 1:00:00. This happens because it subtracts the 24-hour day and only shows the remainder. The [h] format is the only way to display durations exceeding one full day.
Users also frequently forget that Excel treats time as a value between 0 and 1. If you try to multiply a time duration by a hourly rate (e.g., 10:00 hours multiplied by $20/hour), you will get a mathematically incorrect result. This is because you are multiplying 0.4166 (the decimal value of 10 hours) by 20, rather than multiplying the number 10 by 20.
Tips
Converting Duration to Decimals: To convert a time duration (like 5:30) into a decimal number (5.5) for payroll or billing purposes, multiply the time cell by 24. For example, if cell A1 contains 5:30, use the formula =A1*24. After doing this, you must change the cell format from Time to Number or General, otherwise Excel will try to display the result as a time of day.
Quick Entry for Seconds: If you are tracking very short durations (under a minute), you must still include the hours and minutes. To enter 45 seconds, type 0:0:45. If you simply type :45, Excel may interpret it as 12:00:45 AM depending on your regional settings.
Using the TIME function: If your hours, minutes, and seconds are in separate columns, you can combine them into a single duration cell using the formula =TIME(hour, minute, second). Note that the TIME function resets at 24 hours, so it is best for individual entries rather than totals.
Troubleshooting
The time looks like a decimal (e.g., 0.25): This means the cell is formatted as General or Number. Excel is showing you the raw underlying value (0.25 of a day = 6 hours). To fix this, go to Format Cells > Custom and enter [h]:mm:ss.
The total is much lower than expected: Check if you are using the square brackets [h] in your formatting. If your sum is 30 hours but the cell shows 6:00, it is because the format is h:mm, which has rolled over the 24-hour mark. Applying [h]:mm will reveal the full 30 hours.
The formula returns #VALUE!: This usually happens when one of the cells in your range is not actually a time value but is stored as text. Look for leading spaces or typos (like using a period instead of a colon). You can use the =ISNUMBER() function to check if Excel recognizes the cell as a numeric time value; if it returns FALSE, the cell is text.
Time is automatically changing to AM/PM: This occurs when the cell is set to the Time category instead of a Custom duration format. The Time category is designed for points in time (clock time), whereas Custom [h] is designed for elapsed time. Switch the format to Custom to remove the AM/PM markers.
Frequently Asked Questions
How do I enter more than 24 hours in a single cell?
Simply type the hours as you normally would (e.g., 26:30 for 26 hours and 30 minutes). However, you must immediately apply the custom format [h]:mm to that cell, or Excel will display it as 2:30.
Can I subtract one time duration from another?
Yes. Use a simple subtraction formula: =B1-A1. If the result is a negative duration, Excel will display a series of hashtags (#######) because it cannot natively display negative time. To fix this, you may need to use the 1904 date system in Excel options or use an ABS function to find the difference.
Why does my time sum start over at zero?
This is the default behavior of the standard Time format. To stop this, right-click the cell, go to Format Cells > Custom, and wrap the 'h' in square brackets: [h]:mm:ss.
How do I calculate the difference between two timestamps as a duration?
Subtract the start time from the end time (=End_Time - Start_Time). Ensure the result cell is formatted as [h]:mm. If the duration crosses midnight, use the formula =MOD(End_Time - Start_Time, 1) to ensure a positive duration is returned.
Is there a way to input durations as minutes only?
Excel does not have a native "minutes only" input that it recognizes as time without hours. To enter 90 minutes, you should enter it as 1:30. If you prefer to enter the number 90, you must divide that number by 1440 (the number of minutes in a day) in your formula to convert it to Excel time.