How to convert seconds to hours:minutes:seconds
✓ Verified in LibreOffice 25.8.7.3Display a raw seconds count (from a log, timer, or export) as readable hh:mm:ss.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =TEXT(A2/86400,"hh:mm:ss") | Or =A2/86400 with the cell formatted as [h]:mm:ss to keep it numeric. |
| Google Sheets | =TEXT(A2/86400,"hh:mm:ss") | Identical. |
| LibreOffice Calc | =TEXT(A2/86400,"HH:MM:SS") | Format codes are case-insensitive here; "hh:mm:ss" also works. |
How it works
Spreadsheets store time as a fraction of a day, so dividing seconds by 86,400 (seconds per day) converts the count into a time value; TEXT then formats it. 3,725 seconds is 1 hour, 2 minutes, 5 seconds. If a duration might exceed 24 hours, format the cell as [h]:mm:ss instead of using TEXT — the bracketed [h] stops hours wrapping around at 24.
Verified, not just documented
We ran =TEXT(A2/86400,"HH:MM:SS") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 01:02:05 — exactly the expected result. Every formula here is confirmed by actually executing it.