Calculation Issues

Calculate Remaining Hours in Excel When Durations Exceed 24 Hours

Steve KSteve K Nov 13, 2026 868 views

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.

Calculate Remaining Hours in Excel When Durations Exceed 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.
Before you start

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.

Solution 1Recommended

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.

1
Identify the source values

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.

2
Convert the total duration

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.

3
Convert and subtract the used duration

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.

4
Display all remaining hours

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.

Convert text durations to numeric days and subtract them
Formatting does not convert text: Applying [h]:mm directly to a text entry will not make it usable for subtraction. Convert text first. If both source cells are already numeric durations, use =A1-B1 directly and format the result as [h]:mm.
Calculate long durations in WPS Spreadsheet

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. 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. 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. 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. 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.
Calculate remaining hours from text durations containing thousands of hours.Use familiar LEFT, FIND, and MID formulas to preserve minute-level precision.Display elapsed hours beyond 24 with the [h]:mm custom format.Work with Microsoft Excel .xlsx and .xls files.
microsoft office alternative - wps office

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.