← All how-to recipes

How to convert a time to a decimal number

✓ Verified in LibreOffice 25.8.7.3

Turn a clock time or duration into decimal hours (or minutes) — for payroll, billing, and math.

The formula

AppFormulaNotes
Excel=A2*24x24 gives decimal hours; x1440 gives total minutes; x86400 gives seconds. Format the result as a Number.
Google Sheets=A2*24Identical.
LibreOffice Calc=A2*24Identical.

How it works

Spreadsheets store a time as a fraction of a 24-hour day (6:00 = 0.25), so multiplying by 24 converts it to decimal hours: 7:30 becomes 7.5. That's the form payroll and billing need — multiply decimal hours by an hourly rate. Multiply by 1440 (24x60) for total minutes, or 86400 for seconds. The result is a plain number, so if it displays as a time, switch the cell format to Number. To go back the other way, divide by 24 and format the cell as a time.

Verified, not just documented

We ran =TIME(7,30,0)*24 in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 7.5 — exactly the expected result. Every formula here is confirmed by actually executing it.