← All how-to recipes

How to sum times past 24 hours (without them wrapping)

✓ Verified in LibreOffice 25.8.7.3

Total hours across many rows — and stop the total resetting to zero after 24.

The formula

AppFormulaNotes
Excel=SUM(A2:A10)The formula is fine — format the result cell as [h]:mm (square brackets stop the 24-hour wrap).
Google Sheets=SUM(A2:A10)Identical; Format → Number → Duration does the same thing.
LibreOffice Calc=SUM(A2:A10)Identical; format code [HH]:MM.

How it works

20:00 plus 10:30 is 30 and a half hours, but a cell formatted h:mm shows 6:30 — the display wraps at 24 like a clock, even though the underlying value (1.27 days) is correct. Bracketed hour codes ([h]:mm) tell the app to keep counting instead of wrapping: 30:30. So the fix is formatting, not the SUM. For payroll math, multiply the total by 24 to get decimal hours instead.

Verified, not just documented

We ran =TEXT(TIME(20,0,0)+TIME(10,30,0),"[H]:MM") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 30:30 — exactly the expected result. Every formula here is confirmed by actually executing it.