How this conversion works
Excel and Google Sheets store time as a fraction of a 24-hour day. Noon is 0.5 because half the day has passed, and one hour is 1/24. To convert a genuine spreadsheet time into decimal hours, multiply it by 24 and format the result as a number. The generator above provides a formula for the layout you select.
The correct formula depends on what the source cell contains. A displayed value of 1:30 may be a real numeric time, text that merely looks like time, or a duration that exceeds 24 hours. Checking the cell's underlying type and choosing a suitable number format are as important as writing the formula.
Keep source times unchanged and calculate decimal hours in a new column. This creates an auditable worksheet, makes formulas easier to copy down, and prevents the original clock values from being overwritten. The examples below cover same-day time, overnight shifts, minute counts, breaks, and totals longer than one day.
Conversion formula
If A2 contains 1:45 as a real time value, =A2*24 returns 1.75. Format the result cell as General or Number; if it remains formatted as Time, the displayed result may look confusing even when the stored number is correct. Use ROUND only if the destination system requires a fixed number of decimals.
For the difference between start and end times, subtract first and then multiply by 24. Use =(B2-A2)*24 for a same-day shift. When a shift can pass midnight, =MOD(B2-A2,1)*24 converts a negative clock difference into the intended duration within one day.
Example: convert a start and end time to decimal hours
- Enter 8:20 AM in A2 and 5:05 PM in B2 as spreadsheet times.
- In C2 enter =(B2-A2)*24. The elapsed result is 8.75 decimal hours.
- For a 30-minute unpaid break stored in D2, use =(B2-A2-D2)*24 to get 8.25.
- Format C2 as Number with the desired display precision, then copy the formula down.
Building dependable time formulas
Use bracketed formats for durations over 24 hours. The format h:mm wraps after each day, while [h]:mm displays accumulated hours. This affects presentation rather than the underlying value, but a wrapped weekly total can look like missing hours. Decimal-hour results should be formatted as Number and do not need brackets.
Handle text explicitly. If imported text follows HH:MM, TIMEVALUE may convert clock times, but it is not suitable for every duration and can be affected by locale. For controlled text, split the hour and minute components or clean the import before calculation. Test with a value containing more than 24 hours and another containing a leading zero.
Avoid rounding individual rows unless a business rule demands it. Sum exact duration values and round the final decimal-hour total. Protect formula columns, document break assumptions, and use absolute references for fixed rates or policies. These small design choices make a payroll or project workbook easier to review and less likely to drift when copied.
Three real-world uses
Timesheet workbook
Columns A and B hold start and end times, C holds an unpaid break, and D calculates decimal hours. Use =MOD(B2-A2,1)*24-C2*24 in D2. Store the break as a time such as 0:30, format D as Number, and sum D for the pay-period total.
=MOD(B2-A2,1)*24-C2*24
Payroll calculation
If decimal hours are in D2 and the hourly rate is in a fixed cell H1, use =D2*$H$1. Keep D2 unrounded, format the pay result as currency, and apply ROUND to two decimals only to the final amount if required. Overtime should use separate regular and overtime columns.
=ROUND(D2*$H$1,2)
Plain minute imports
Some systems export a numeric minute count rather than a time value. If A2 is 95, =A2/60 returns 1.583333... decimal hours. Do not multiply that input by 24; the correct operation is determined by the unit stored in the source cell.
Minutes to decimal hours: =A2/60