← All how-to recipes

How to convert a time to a decimal number

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

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

The formula

AppFormulaNotes
Excel (desktop)=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. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 7.5 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.