Skip to content

Decimal Hours in Excel & Google Sheets

Pick what your cell holds and copy the formula. 7:45 becomes 7.75, overnight shifts and unpaid breaks included. Same formulas in Google Sheets.

Excel formula builder

Your cell holds
Cell

Formula

=A2*24

Same result under 24 hours: =HOUR(A2)+MINUTE(A2)/60

Try it: if A2 holds

the formula shows 7.75

Format the result cell as Number (Home > Number format). If it shows 18:00 instead of 7.75, the cell kept the time format.

Works the same in Google Sheets. Rather not use a spreadsheet? Time Card Calculator

Formula cheat sheet

Layout used below: B = time in, C = time out, D = unpaid break in minutes, E = hours. Change the letters to match your sheet.

  • Time to decimal hours

    =A2*24

    A2 holds 7:45 → 7.75. Format the result cell as Number.

  • Time to decimal, hours and minutes apart

    =HOUR(A2)+MINUTE(A2)/60

    Same result under 24 hours; drops whole days above.

  • Rounded to 2 decimals

    =ROUND(A2*24,2)

    7:20 → 7.33 instead of 7.333333333.

  • Rounded to the nearest quarter hour

    =MROUND(A2*24,0.25)

    7:38 → 7.75; 7:37 → 7.5.

  • Minutes to decimal hours

    =A2/60

    A2 holds 465 → 7.75.

  • Decimal hours to h:mm

    =TEXT(A2/24,"[h]:mm")

    A2 holds 7.75 → 7:45 (as text).

  • Hours between In (B2) and Out (C2)

    =(C2-B2)*24

    9:00 AM to 5:30 PM → 8.5.

  • Overnight shift

    =MOD(C2-B2,1)*24

    10:00 PM to 6:30 AM → 8.5.

  • Hours minus an unpaid break (D2, minutes)

    =(C2-B2)*24-D2/60

    9:00 AM to 5:30 PM, 30 → 8.

  • Weekly total

    =SUM(E2:E8)

    Adds the decimal hours of 7 days.

  • Overtime over 40 hours (total in E9)

    =MAX(0,E9-40)

    42.5 → 2.5; 38 → 0.

  • Gross pay with 1.5× overtime (rate in F2)

    =ROUND((MIN(40,E9)+MAX(0,E9-40)*1.5)*F2,2)

    42.5 hours at $20 → 875.

Convert time to decimal hours in Excel, step by step

Excel stores a time as a fraction of a day: 12:00 PM is 0.5 and 7:45 is 0.3229…. To turn it into hours, multiply by 24.

  1. Type the time in a cell, for example 7:45 in A2. Excel recognizes it as a time.
  2. In the next cell, type =A2*24 and press Enter.
  3. If the result shows 18:00, the cell copied the time format. Select it, open Home > Number format and choose Number. It now shows 7.75.
  4. To keep two decimals, use =ROUND(A2*24,2). 7:20 then shows 7.33 instead of 7.333333333.

=HOUR(A2)+MINUTE(A2)/60 gives the same answer for times under 24 hours. It ignores whole days, so it is the wrong choice for a weekly total such as 42:30. =A2*24 works for any total.

Google Sheets: time to decimal with the same formulas

Every formula on this page works in Google Sheets without changes: =A2*24, MOD, MROUND, TEXT and [h]:mm behave the same way. Format the result with Format > Number > Number.

Two things to watch in both programs. Type times with the colon (7:45): 745 stays a plain number. And the argument separator follows the locale. If 1.5 is written 1,5 where you are (most of Europe and Latin America), formulas use semicolons: =ROUND(A2*24;2) and =MROUND(A2*24;0,25). Excel takes this from your computer's regional settings; Google Sheets takes it from File > Settings > Locale. The builder above writes both versions. Excel translates function names in non-English versions, while Google Sheets always accepts the English names.

To use our template in Google Sheets, download the .xlsx file, then in Sheets choose File > Import > Upload. The formulas and formats come across.

Excel is a trademark of Microsoft and Google Sheets a trademark of Google. ClockDecimal is not affiliated with, sponsored or endorsed by Microsoft or Google. The template is provided as is, for information only: it is not payroll or legal advice, so check its results against your employer's records.

Timesheet formulas: in, out, breaks and overnight shifts

With the time in in B2, the time out in C2 and an unpaid break in minutes in D2:

  • Hours worked: =(C2-B2)*24. 9:00 AM to 5:30 PM gives 8.5.
  • Minus the break: =(C2-B2)*24-D2/60. With a 30-minute break, 8.5 becomes 8.
  • Overnight shift: =MOD(C2-B2,1)*24. From 10:00 PM to 6:30 AM, C2-B2 is negative; MOD adds the missing day, so the result is 8.5, not -15.5.
  • All three at once: =MOD(C2-B2,1)*24-D2/60, the formula used in our template.
  • Minutes to hours: if your time clock exports minutes (465), use =A2/60 for 7.75.
  • Decimal hours back to a time: =A2/24 formatted as [h]:mm turns 7.75 into 7:45. As text, =TEXT(A2/24,"[h]:mm") does the same.

Weekly total, overtime and pay

Put the daily hours in E2:E8 and the total in E9 with =SUM(E2:E8). Under the federal rule, overtime is the time over 40 hours in the workweek: =MAX(0,E9-40) gives 2.5 for a 42.5-hour week and 0 for 38 hours. Regular hours are =MIN(40,E9).

Payroll example: 42.5 hours at $20 an hour. Regular pay is 40 × $20 = $800, overtime is 2.5 × $30 = $75, so gross pay is $875. In one cell, with the rate in F2: =ROUND((MIN(40,E9)+MAX(0,E9-40)*1.5)*F2,2). Some states count overtime by the day as well; the overtime calculator handles both rules.

Keep the hours in decimal for every calculation and convert to h:mm only for display. Adding times formatted as h:mm works too, but a total over 24 hours needs the [h]:mm format.

Common errors and how to fix them

  • ##### in the cell: the column is too narrow, or the result is a negative time. Widen the column; for a shift that crosses midnight, use MOD(C2-B2,1).
  • 0.33 instead of 0:20: both are right. 20 minutes is 0.33 hours. Use 0.33 to multiply by a pay rate and 0:20 to read a clock.
  • A weekly total of 18:30 instead of 42:30: the h:mm format starts again after 24 hours. Format the total as [h]:mm (Format Cells > Custom).
  • A time shown as a date or a long decimal: the cell has the wrong format. Times need h:mm, results in hours need Number.
  • 7.45 typed for 7 hours 45 minutes: that is 7 hours 27 minutes. Convert first: 45 ÷ 60 = 0.75, so 7.75.

Rounding to the quarter hour or the tenth

Some employers pay in quarter hours. =MROUND(A2*24,0.25) rounds to the nearest 0.25: 7:37 becomes 7.5 and 7:38 becomes 7.75. For tenths of an hour (6-minute blocks), use =ROUND(A2*24,1). Under federal rules, rounding must not shortchange employees over time; the minutes to decimal chart has a quarter-hour column based on the 7-minute rule.

To convert a single value without a spreadsheet, use the minutes to decimal converter. To go back from 7.75 to 7:45, see decimal to hours and minutes.

Frequently Asked Questions

How do I convert time to decimal hours in Excel?

Multiply the time by 24: if A2 holds 7:45, type =A2*24 and format the result cell as Number. It shows 7.75. Use =ROUND(A2*24,2) to keep two decimals.

Why does Excel show 18:00 instead of 7.75?

The result cell kept the time format of A2. Change its format to Number (Home, Number format) and it shows 7.75.

How do I calculate hours worked across midnight in Excel?

Use =MOD(C2-B2,1)*24, with the time in in B2 and the time out in C2. From 10:00 PM to 6:30 AM it returns 8.5. Subtract the unpaid break with -D2/60.

How do I convert time to decimal in Google Sheets?

The same way as in Excel: =A2*24, then choose Format, Number, Number. If your spreadsheet locale writes decimals with a comma, use semicolons between arguments, for example =ROUND(A2*24;2).

How do I round hours to the nearest quarter hour in Excel?

Use =MROUND(A2*24,0.25) for a time in A2. 7:37 becomes 7.5 and 7:38 becomes 7.75. For tenths of an hour, use =ROUND(A2*24,1).

How do I convert minutes to decimal hours in Excel?

Divide by 60: if A2 holds 465 minutes, =A2/60 returns 7.75 hours.

How do I show a total over 24 hours in Excel?

Format the total cell with the custom format [h]:mm. The plain h:mm format starts again at 0 after 24 hours, so 42:30 would show as 18:30.