Calculate Remaining Hours in Excel When Durations Exceed 24 Hours
Question details
Calculate remaining hours by subtracting long durations stored as text, such as 12203:40, and show the result without resetting the hour count after 24 hours.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains total and used hours in hours:minutes format, with hour counts that can reach several thousand.
- Observed behavior
- Subtracting text-based durations can return #VALUE!. The values need to be converted to numeric durations before subtraction, then displayed with an elapsed-hours format.
Identify the total-hours cell and the used-hours cell, and confirm that text entries follow hours:minutes format, such as 12203:40. Enter =ISNUMBER(A1) in an empty cell to check whether A1 already contains a numeric duration; numeric durations do not need text conversion.
Convert text durations to numeric days and subtract them
Use this method when long hours:minutes entries are stored as text and subtraction returns #VALUE!.
Excel stores numeric time values as fractions of a day. Convert the hours to days by dividing by 24, and convert the minutes to days by dividing by 1,440.
Excel can calculate durations longer than 24 hours. The issue here is that the source entries are text, not that elapsed durations must stay below 24 hours.
Use A1 for the total duration and B1 for the used duration. For example, A1 can contain the text 12203:40 and B1 the text 12000:15. Both values should use a colon separator and two minute digits.
Select C1, enter =LEFT(A1,FIND(":",A1)-1)/24+MID(A1,FIND(":",A1)+1,2)/24/60, and press Enter. The formula extracts the hours and minutes and returns a numeric duration in days.
Select D1 and enter =LEFT(B1,FIND(":",B1)-1)/24+MID(B1,FIND(":",B1)+1,2)/24/60. Then select E1 and enter =C1-D1 to calculate the remaining duration.
Select E1 and open Format Cells from the cell's right-click menu. Under Number, choose Custom, enter [h]:mm in the Type field, and click OK. For the example values, the remaining duration displays as 203:25.

Calculate Remaining Hours with WPS Spreadsheet
WPS Spreadsheet can convert text-based hours:minutes entries into numeric durations using the same formulas, subtract them, and display the result with an elapsed-hours format.
- 1. Open the worksheet: Open your Excel workbook in WPS Spreadsheet through File > Open. Identify the total duration in A1 and the used duration in B1.
- 2. Convert both text durations: In C1, enter =LEFT(A1,FIND(":",A1)-1)/24+MID(A1,FIND(":",A1)+1,2)/24/60. In D1, enter the same formula with each A1 reference changed to B1.
- 3. Calculate remaining time: Select E1, type =C1-D1, and press Enter. If A1 and B1 already contain numeric durations rather than text, use =A1-B1 instead.
- 4. Apply the elapsed-hours format: Right-click E1 and choose Format Cells. Select Number > Custom, enter [h]:mm in the format field, and confirm the change.

Frequently Asked Questions
Can Excel store durations longer than 24 hours?
Yes. Excel can store elapsed durations as numeric day values. Select a numeric duration cell, open Format Cells > Number > Custom, and enter [h]:mm to show accumulated hours. A very large hours:minutes entry may be stored as text and require conversion first.
Why does subtracting my hours return #VALUE!?
One or both entries may be text rather than numeric durations. Enter =ISNUMBER(A1) and =ISNUMBER(B1) in empty cells to check. If either returns FALSE, inspect that entry and convert valid hours:minutes text before subtracting.
What is the difference between h:mm and [h]:mm?
The h:mm format displays the hour portion within a day, so the displayed hour count resets after 24 hours. The [h]:mm format displays accumulated elapsed hours. For a duration of 27 hours and 30 minutes, [h]:mm shows 27:30.
How do I show the remaining duration as decimal hours?
After converting the source values into numeric days in C1 and D1, enter =(C1-D1)*24 in another cell. Open Format Cells and choose Number with your preferred decimal places. A remaining duration of 203:25 is approximately 203.42 hours.
Why does the result show hash marks when used hours exceed total hours?
First widen the result column to rule out a display-width issue. If the result is negative, Excel's default 1900 date system generally cannot display it as a time value. Use =(C1-D1)*24 and apply the Number format to show the negative balance in decimal hours.




