To convert time to a decimal number of hours, multiply the cell by 24: =A1*24. So 6:30 becomes 6.5. Excel already stores time as a fraction of a day, so multiplying by 24 simply scales it back to hours.
Use *1440 for total minutes and *86400 for total seconds. The one step people miss is formatting — the result cell will inherit the time format and show something odd like 6:00 AM, so set it to Number with two decimals (Ctrl+1 → Number).
For whole hours only, wrap it in INT: =INT(A1*24). And to go the other way, decimal back to time, divide by 24 and format the cell as time: =A1/24.
Excel stores time as a decimal (a fraction of a day) and only formats it to look like a time. With the help of formulas, you can convert that time into decimals that make sense to the user, like 8.5 hours for 8:30.
Time into Decimals (Hours – Minutes – Seconds)
- Enter (=) in a cell.
- Refer to the cell where you have the time.
- Type an asterisk (*).
- Enter (24) and hit Enter to get the result.

The cell where you enter this formula must have the cell format “Number” with two decimals.
Here’s the formula for cell A1. A time of 8:30 returns 8.5, as there are 24 hours in a day:
=A1*24

And for:
- Whole Hours: =INT(A1*24)
- Minutes: =A1*1440
- Seconds: =A1*86400
Here are the same three formulas, one per line, so you can copy them. For 8:30, they return 8, 510 and 30600:
=INT(A1*24)
=A1*1440
=A1*86400

Remove Format to Get the Decimal for a Time
- Select the cell.
- Open the Format Cells dialog box (Ctrl + 1).
- Click General in the Number tab.
- Click OK to save.

When you click OK, it shows that value as a decimal value. Note that this decimal is the fraction of a day (8:30 shows as 0.354166667), not the number of hours. To get hours, use the formula above.

Other Ways to Convert Time to Decimal Hours
You can also take the hours, minutes and seconds out of the time with HOUR, MINUTE and SECOND, and add them up. This also returns 8.5 for 8:30:
=HOUR(A1)+MINUTE(A1)/60+SECOND(A1)/3600
Just note that HOUR only goes up to 23, so this formula ignores full days. For a duration of more than 24 hours (like 38:30), use =A1*24 instead.
Or use the CONVERT function, which converts the value from days to hours:
=CONVERT(A1,"day","hr")
Convert a Time That Has a Date
If the cell has a date along with the time (like 01-Mar-2023 6:45 PM), =A1*24 also converts the date into hours and returns a huge number. Use MOD to keep only the time part first. This returns 18.75:
=MOD(A1,1)*24
Time Stored as Text
If the time came from another system and is stored as text (it’s left-aligned in the cell), convert it to a real time with TIMEVALUE before you multiply:
=TIMEVALUE(A1)*24
Convert Decimal Hours Back to Time
To go the other way, divide the decimal hours by 24 and format the cell as time (h:mm, or a custom format with the h in square brackets for more than 24 hours). For 8.5, this shows 8:30:
=A1/24
Frequently Asked Questions
Why does my formula show a time instead of a decimal?
Excel copies the time format from the cell you refer to. Change the result cell to General or Number format, and you’ll see the decimal.
How do I convert time to decimal for a timesheet?
Subtract the start time from the end time and multiply by 24, and round the result to two decimals with ROUND if you need it for pay. If a shift goes past midnight, wrap the subtraction in MOD so the result isn’t negative:
=ROUND(MOD(B1-A1,1)*24,2)
Why do I get a #VALUE! error?
The cell has text that Excel can’t read as a time, like “8.30” or “8:30 hrs”. Fix the text (for example, with Find and Replace) so it looks like a time, and then use TIMEVALUE.
Written by
Puneet Gogia
Microsoft MVP — Excel · Founder, Excel Champs
Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.