Guide

How to Convert Time to Decimal in Excel and Google Sheets

Spreadsheets store a time as a fraction of a day, so decimal hours are one multiplication away. Here is the formula in both directions, with the formatting step that trips most people up.

  • Reading time2 min
  • UpdatedSeptember 15, 2026
  • Sections6

The one fact behind every formula

Both Excel and Google Sheets store a time as a fraction of a 24-hour day: 12:00 is 0.5, 6:00 is 0.25, 1:30 is 0.0625. Google's documentation for its TIMEVALUE function states it directly, the function “returns the fraction of a 24-hour day the time represents.” Multiply that fraction by 24 and you have decimal hours.

Time to decimal hours

With a time in A2, put this in B2:

=A2*24

Then set B2's number format to General or Number. If you skip that step the cell inherits the time format and shows something like 12:00 instead of 0.5, which is the single most common reason people believe the formula is wrong. In Google Sheets you can skip the formatting step by wrapping the formula: =TO_PURE_NUMBER(A2*24), which converts a formatted value “to a pure number without formatting”.

To round for a timesheet: =ROUND(A2*24, 2).

Hours between two times

Microsoft's own example for the difference between a start in A2 and an end in B2 is =INT((B2-A2)*24) for whole hours; drop the INT to keep the fraction:

=(B2-A2)*24

Subtract an unpaid break in the same formula, remembering the break has to be in the same unit. A 30-minute break stored as a time is 0:30, so =(B2-A2-C2)*24 works when C2 holds 0:30; if C2 holds the number 30, divide it: =(B2-A2)*24-C2/60.

Decimal hours back to time

Divide by 24 and apply a time format:

=A2/24

For a total that can exceed 24 hours, such as a week of 42.25, the standard h:mm format wraps at 24 and shows 18:15. Microsoft's guidance is to use the custom format [h]:mm, which keeps counting past 24 and shows 42:15.

Text that looks like a time

If a pasted time is stored as text rather than as a time value, multiplying it by 24 is an error. Convert it first: =TIMEVALUE(A2)*24 in either program. If the text is a duration over 24 hours, TIMEVALUE will not parse it; split the hours and minutes with LEFT and MID and compute hours + minutes/60 instead.

Quick reference

TaskFormulaFormat the result as
Time to decimal hours=A2*24Number
Time to minutes=A2*1440Number
Hours between two times=(B2-A2)*24Number
Overnight shift=MOD(B2-A2,1)*24Number
Decimal hours to time=A2/24h:mm, or [h]:mm above 24 hours
Text time to decimal=TIMEVALUE(A2)*24Number

For a one-off value without a spreadsheet, the time to decimal calculator takes a start and end time directly.

Frequently asked questions

Why does my result show as a time such as 12:00 instead of 0.5?

Excel and Sheets keep the time format of the cell you referenced. The multiplication is correct; the display is not. Set the result cell to General or Number and the decimal appears.

How do I get minutes instead of decimal hours?

Multiply by 1,440 (the minutes in a day) instead of 24. A cell holding 1:30 times 1,440 gives 90.

What if a shift crosses midnight?

Subtracting a later start from an earlier end gives a negative day fraction. Wrap the difference in MOD(end - start, 1) before multiplying by 24 and the overnight shift comes out positive.