Sheet Clinic

Show total hours over 24 in Google Sheets with [h]:mm

A SUM of hours past 24 shows as a clock time, like 3:30 AM for 51:30. Choose Format, Number, Custom number format and enter [h]:mm.

Sheet Clinic editorsPublished
D7=SUM(D2:D6)

Before as you see it

ABCD
1DayStartEndHours
2Mon7:30 AM5:00 PM9:30 AM
3Tue7:00 AM5:15 PM10:15 AM
4Wed6:30 AM5:30 PM11:00 AM
5Thu7:15 AM6:00 PM10:45 AM
6Fri8:00 AM6:00 PM10:00 AM
7Total3:30 AM

What changed

  1. Format of D2:D7 set to [h]:mm
  2. No formula edited

After custom number format

ABCD
1DayStartEndHours
2Mon7:30 AM5:00 PM9:30
3Tue7:00 AM5:15 PM10:15
4Wed6:30 AM5:30 PM11:00
5Thu7:15 AM6:00 PM10:45
6Fri8:00 AM6:00 PM10:00
7Total51:30
Figure 1. Jordan's week of Nov 3. The SUM in D7 is the same on both sides; only the number format changed.

To show total hours over 24 in Google Sheets, select the hours cells, choose Format, Number, Custom number format and enter [h]:mm. Sheets then shows elapsed hours instead of a time of day. In our copy of Jordan's timesheet, D7 shows 3:30 AM instead of 51:30. The SUM is right, but D7 is formatted as a time of day, and a time of day never goes past 23:59. With D2:D7 set to [h]:mm, D7 changes to 51:30 with no formula edited.

Jordan worked five shifts in the week of Nov 3. Column D works out each one as end time minus start time, so D2 is =C2-B2, and =SUM(D2:D6) adds the five results. The shifts run 9:30, 10:15, 11:00, 10:45 and 10:00, and by hand they add up to 51:30. The AM after 3:30 is what gives the format away.

Google Sheets with D7 selected. The formula bar shows =SUM(D2:D6). Hours in D2:D6 read 9:30 AM, 10:15 AM, 11:00 AM, 10:45 AM and 10:00 AM, and D7 reads 3:30 AM.
Figure 2. The Broken tab. Every Hours cell carries an AM, a sign of a clock time format.

Showing hours over 24 with Format, Number, Custom number format and [h]:mm

Select D2:D7, the five shift lengths and the total. Whatever the layout, the format has to go on every cell that holds a length of time, daily hours and total alike. Open Format, point to Number, and choose Custom number format near the bottom of the list (Google's page on formatting numbers in a spreadsheet shows the same path). Type [h]:mm in the box and click Apply. D7 changes to 51:30, and D2:D6 lose their AM.

The square brackets do the work. Plain h means the hour on a clock, which starts over at midnight. With brackets it means elapsed hours, counted without a limit. The Sheets API reference writes the token as [h+] and describes it as the number of elapsed hours in a time duration. In the custom format box, [h]:mm with a single h worked.

The Fixed tab with D7 selected. The formula bar still shows =SUM(D2:D6). D2:D6 read 9:30, 10:15, 11:00, 10:45 and 10:00, and D7 reads 51:30.
Figure 3. The Fixed tab. Same formula in D7, now formatted as [h]:mm.

There is a menu choice that gets close without typing anything. Format, Number, Duration also shows the full total, but with seconds: our copy shows 51:30:00. For a timesheet that never records seconds, the custom format is easier to read.

Why a time format shows a 51:30 total as 3:30 AM

Sheets keeps times and durations as fractions of a day. Google's number format reference for the Sheets API puts it plainly: the whole number part of a date-time value counts days, and the part after the decimal is the time as a fraction of one day. Noon is 0.5.

Set the same total to a plain Number format and it reads 2.15. That is two whole days plus part of a third. A time format shows only the fraction, the hour on the clock, so 51:30 lands at 3:30 AM on the third day and the two full days vanish from view. They are still in the cell. Any formula that reads D7 gets the full value.

The 2.15 in a Number format is rounded to two decimal places. Multiply that displayed figure by 24 on a calculator and you will not land on 51.50. Multiply the cell itself, as B10 on the Other displays tab does in the section on decimal hours, and the full value comes through.

Nobody chose that format in our sheet. We typed the start and end times as 7:30 AM and 5:00 PM, Sheets read them as times, and the subtraction in column D picked up the same time format: D2 showed 9:30 AM. The SUM in D7 inherited it again. A total under 24 hours looks fine this way, which is why the problem tends to appear only when a week gets long.

Time, Duration, h:mm, [h]:mm and Number on one total, compared

Column B of the Other displays tab points every row at the broken total with ='Broken (as you see it)'!D7, then gives each cell a different format. The value underneath never changes.

Other displays rowWhat B shows for the same total
Time (Format, Number, Time)3:30:00 AM
Duration51:30:00
Custom h:mm3:30
Custom [h]:mm51:30
Number2.15

Custom h:mm, without brackets, is the one that hides best. It shows 3:30 with no AM, so the cell looks like a duration that someone simply added up wrong. If your total looks like that, open the custom format box with the cell selected and check whether the h has brackets around it.

Decimal hours for pay, by multiplying the total by 24

Payroll and invoices usually want decimal hours, not 51:30. Because the stored value counts days, multiply it by 24. B9 on Other displays does exactly that with ='Broken (as you see it)'!D7*24, and the cell showed 12:00 PM.

The value underneath is 51.5. The new cell picked up the time format of D7, so Sheets displayed the .5 as noon and dropped the whole hours. B10 holds the same formula with Format, Number, Number applied, and it reads 51.50.

The Other displays tab with B9 selected. The formula bar shows ='Broken (as you see it)'!D7*24 and B9 reads 12:00 PM. Other rows show 3:30:00 AM, 51:30:00, 3:30, 51:30, 2.15, 51.50, $927.00 and 38.63.
Figure 4. B9 and B10 hold the same formula. Only B10 has a Number format.

Pay follows the same pattern. At $18 an hour, ='Broken (as you see it)'!D7*24*18 returned $927.00 once the cell had a Currency format. Leave out the 24 and the formula multiplies days by an hourly rate: ='Broken (as you see it)'!D7*18 returned 38.63, a figure that looks like a plausible amount and is wrong by a factor of 24.

If the decimal hours feed an overtime column, the federal rule from the Department of Labor counts hours worked over 40 in a workweek for covered, non-exempt employees (checked November 11, 2026). Which hours count as worked, and which state rules apply on top, is outside what this sheet checks.

TEXT with "[h]:mm" for a label, and the Try it yourself tab

Sometimes the total goes into a sentence or a header rather than its own cell. On the Other displays tab, B8 holds =TEXT('Broken (as you see it)'!D7, "[h]:mm") and returned 51:30. B7 holds =TEXT('Broken (as you see it)'!D7, "h:mm") and returned 3:30, the same trap as the cell format. Google's TEXT page says the function converts a number into text, so keep the number in D7 for math and use the TEXT version only for display.

A number format leaves the value alone. The pay formula in B11 returned $927.00 even while reading the cell that shows 3:30 AM.

The Try it yourself tab is the broken timesheet again, with 3:30 AM in D7. For a total that feeds pay, take the format route: select D2:D7 and apply [h]:mm through Custom number format, which leaves the SUM in place. D7 shows 51:30, the same as D7 on the Fixed tab. The label version is the other thing to try there. Select D7, type =TEXT(SUM(D2:D6), "[h]:mm"), and press Enter. D7 reads 51:30 again, this time as text.

InputFive shifts, D2:D6 = End minus Start
Formula=SUM(D2:D6), format [h]:mm
Expected9:30, 10:15, 11:00, 10:45, 10:00, 51:30
Sheets returned9:30, 10:15, 11:00, 10:45, 10:00, 51:30 Matches expected
Checked2026-11-11, free personal account

Take-home copy. Four tabs: Broken (as you see it), Fixed, Try it yourself, Other displays. It opens as a copy in your own Drive.

Copy the sheet