To input a duration in Excel, type the time using the format h:mm or h:mm:ss (for example, 2:30 for 2 hours 30 minutes, or 1:15:00 for 1 hour 15 minutes), then press Enter. Excel will recognise it as a time value. For durations over 24 hours, enter them as [h]:mm or use a custom format so they don't wrap around at midnight. That's the short answer. The rest of this guide explains the exact steps, common pitfalls, and how to make Excel display and calculate durations correctly.
What You'll Need
- Microsoft Excel (any modern version: Microsoft 365, Excel 2019, 2021, or Excel for Mac). The steps are nearly identical across versions; menu labels may differ slightly.
- A blank worksheet or an existing sheet where you want to enter durations.
- Basic familiarity with typing in cells and using the Format Cells dialog (Ctrl+1 on Windows, Cmd+1 on Mac).
Step-by-Step
- Select the cell or range where you'll enter durations. Click a single cell or drag to highlight a column. Formatting the range first saves time later.
- Open the Format Cells dialog. Press Ctrl+1 (Windows) or Cmd+1 (Mac). Alternatively, right-click the selection and choose Format Cells.
- Choose the Time category. In the Number tab, select Time from the list. Pick a format like 13:30 or 1:30 PM if you want a standard time display. For durations, you'll likely want a custom format instead (see next step).
- Set a custom duration format. Still in Format Cells, select Custom from the Category list. In the Type box, enter [h]:mm for hours and minutes, or [h]:mm:ss for hours, minutes, and seconds. The square brackets around h tell Excel to display total hours beyond 24 instead of resetting at midnight. Click OK.
- Type your duration. Click the formatted cell and type the duration using a colon. Examples:
- 2:30 — Excel interprets this as 2 hours 30 minutes (not 2:30 AM) when the cell is formatted as [h]:mm.
- 0:45 — 45 minutes.
- 1:15:30 — 1 hour, 15 minutes, 30 seconds.
- 10:00 — 10 hours (if you mean 10 hours exactly, type 10:00; with [h]:mm format it shows as 10:00).
- Press Enter. Excel converts the entry to a time serial number and displays it in your chosen format. The underlying value is a fraction of a day (e.g., 2:30 = 0.10417).
- Enter more durations in the same column. If you formatted the whole range in step 1, each new entry will automatically use the duration format.
- Sum durations (optional). To add up a column of durations, use =SUM(A1:A10) and format the result cell as [h]:mm. Without the brackets, totals over 24 hours will display incorrectly (e.g., 25 hours shows as 1:00).
- Convert durations to decimal hours (optional). If you need decimal hours for payroll or billing, multiply the duration by 24 and format the result as a number: =A1*24. For example, 2:30 becomes 2.5.
Common Mistakes
- Using the wrong format for totals over 24 hours. If you format a total as h:mm instead of [h]:mm, Excel wraps at 24 hours. Always use square brackets for elapsed time totals.
- Typing durations as decimals or text. Entering 2.5 means 2.5 days (60 hours), not 2.5 hours. Entering 2h 30m as text won't calculate. Stick to colon-separated numbers.
- Forgetting that Excel treats times as fractions of a day. This matters when you multiply or divide. To get decimal hours, multiply by 24; to get minutes, multiply by 1440.
- Mixing time of day with duration. If you type 2:30 in a cell formatted as Time (not Custom [h]:mm), Excel may display it as 2:30 AM. The underlying value is the same, but the display can confuse. Use [h]:mm for clarity.
- Entering durations with spaces or units. Excel expects 2:30, not 2 30 or 2h30. If you need to import text like that, use formulas to parse it.
Tips
- Use the Format Painter to copy your duration format to other cells quickly.
- Create a custom format with days: [d] h:mm displays total days, hours, and minutes (e.g., 1 2:30 for 1 day 2 hours 30 minutes).
- Enter durations quickly by typing just the numbers and colons; Excel auto-detects time entries if the cell is already formatted as Time or Custom.
- Use Ctrl+Shift+2 (Windows) or Cmd+Shift+2 (Mac) to apply the default time format quickly, then adjust to [h]:mm if needed.
- For negative durations (e.g., subtracting a later time from an earlier one), Excel may show #####. Switch to the 1904 date system (File > Options > Advanced > When calculating this workbook > Use 1904 date system) or use a formula like =MOD(A2-A1,1) to handle overnight spans.
Troubleshooting
- Durations show as ##### or a date instead of hours. The column is too narrow or the format is wrong. Widen the column and reapply the [h]:mm format via Format Cells.
- Totals reset at 24 hours. Change the total cell's format to [h]:mm (with brackets).
- Excel won't accept my entry (e.g., 25:00). If the cell is formatted as Time (not Custom), Excel may reject hours over 23. Format as [h]:mm first, then type 25:00.
- I need to enter 90 minutes but Excel shows 1:30. That's correct: 90 minutes equals 1 hour 30 minutes. If you want to display total minutes, use a custom format [m] or [m]:ss.
- My sum gives a weird decimal. The result cell is probably formatted as General or Number. Apply [h]:mm to see it as hours and minutes.
- Imported data shows as text. Use Data > Text to Columns or a formula like =TIMEVALUE(A1) to convert text times to real time values, then format as [h]:mm.
Frequently Asked Questions
How do I enter a duration longer than 24 hours?
Format the cell as [h]:mm (or [h]:mm:ss) using Format Cells > Custom, then type the duration like 36:00 for 36 hours. Without the brackets, Excel will show 12:00.
Why does Excel show 12:00 AM when I type 24:00?
Because the cell is formatted as Time, which resets at 24 hours. Change the format to [h]:mm to display 24:00.
Can I add up a column of durations?
Yes. Use =SUM(range) and format the result cell as [h]:mm so totals over 24 hours display correctly.
How do I convert a duration to decimal hours for payroll?
Multiply the duration by 24 and format as a number: =A1*24. For example, 2:30 becomes 2.5.
What's the difference between h:mm and [h]:mm?
h:mm displays hours modulo 24 (so 25 hours shows as 1:00). [h]:mm displays total elapsed hours (25:00). Use brackets for durations that can exceed 24 hours.
Can I enter durations with seconds?
Yes. Use the format [h]:mm:ss and type entries like 1:15:30 for 1 hour, 15 minutes, 30 seconds.