Convert Hours to a Number in Excel: Time to Decimal

How-to basics · Updated November 20, 2026

To convert an Excel time value to decimal hours, multiply it by 24. If the time is in A2, enter =A2*24 in another cell, then format that result as a number. For example, 2 hours and 30 minutes becomes 2.5 hours. This works because Excel stores time as a fraction of a 24-hour day.

The steps below are for Excel for Microsoft 365 on Windows. They cover ordinary time values, totals, and text entries, so you can choose the method that matches your data.

What You’ll Need

  • An Excel worksheet with the time or duration you want to convert.
  • A blank column or cell for the decimal-hour results.
  • A quick check of whether the source is a real Excel time value or text that only looks like a time.

Step-by-Step

  1. Check what your source values mean. Click a cell containing a time, such as A2, and look at the formula bar. A value displayed as 2:30 is often a real Excel time representing two hours and 30 minutes, but data copied from another system may be stored as text. Also decide whether you are converting a duration, such as 2 hours and 30 minutes, or a time of day, such as 2:30 PM. The multiplication method converts the stored time fraction; it does not interpret the value as a clock reading on its own.
  2. Choose a destination cell. If the original durations are in A2:A20, click B2 so the converted values appear beside the originals. Keeping the source data lets you check the results and reuse the original time format later. If there are headers, put the formula on the first data row rather than in the header.
  3. Multiply the time by 24. With the time or duration in A2, enter =A2*24 in B2 and press Enter. Since Excel stores one day as 1, one hour is 1/24 of a day; multiplying by 24 changes that fraction into hours. For example, if A2 contains 2:30, the result is 2.5, because 30 minutes is half an hour. A value of 1:15 becomes 1.25 hours.
  4. Set the result to a number format. Select B2. On Windows, go to Home and choose Number from the Number Format drop-down in the Number group. You can also press Ctrl+1, select the Number category, set the decimal places you want, and choose OK. If the cell is still formatted as Time, Excel may show a clock-style result instead of 2.5. The formula can be correct even when the display format is not.
  5. Copy the formula down the column. Select B2 and drag its fill handle, the small square at the lower-right corner of the cell, down through the rows you need. Excel adjusts the reference for each row, so B3 uses A3, B4 uses A4, and so on. You can also copy B2, select the destination range, and paste. Check a few rows at the top and bottom to make sure the formula references the matching source cells.
  6. Choose the precision that suits the task. A duration such as 1 hour and 20 minutes equals 1.333333… hours. A Number format with two decimal places displays 1.33, while the underlying result retains more precision. If you need the calculated value itself rounded to two decimal places, use the formula below instead. With A2 containing 1:20, it returns 1.33.
  7. Convert a start and end time when needed. If A2 contains a start time and B2 an end time on the same day, calculate the difference and multiply by 24. With the start in A2 and end in B2, =(B2-A2)*24 returns elapsed hours; for 9:00 AM to 5:30 PM, the result is 8.5. If the times are clock times and the shift may pass midnight, use the next formula. With start in A2 and end in B2, =MOD(B2-A2,1)*24 returns 8 for 10:00 PM to 6:00 AM. This MOD version is for a shift of less than 24 hours without date values; for a longer span, use full dates and times and subtract the starting date-time from the ending date-time before multiplying by 24.

To round the converted result to two decimal places, use this alternative. With the original duration in A2, =ROUND(A2*24,2) returns 1.33 when A2 contains 1:20. Use rounding only when you want to discard precision; changing the number format to two decimal places changes what is shown, not the stored result.

If the source is text rather than a numeric Excel time, try converting the text to a time first. With text such as 2:30 in A2, =TIMEVALUE(A2)*24 returns 2.5. TIMEVALUE is intended for text representing a time within a day. It is not a suitable way to interpret text durations such as 27:30, because that duration exceeds a day. For text with hours greater than 24, convert or clean the source into a numeric duration before applying the 24-hour multiplication, or parse the hours and minutes separately using a formula designed for the exact text pattern.

Common Mistakes

Forgetting to multiply by 24. A time value such as 2:30 is stored as about 0.104167 of a day. Formatting that value as Number without multiplying by 24 shows a fraction of a day, not decimal hours. The conversion formula needs the multiplication.

Leaving the answer in a time format. A formula can return the right numeric value while the cell displays an unexpected time. Set the destination cells to Number or General to show decimal hours. Do not change the source cells unless you also want their original time display to change.

Confusing decimal hours with hours and minutes. A decimal value of 1.5 means one and a half hours, or 1 hour and 30 minutes. It does not mean 1 hour and 50 minutes. To convert the decimal portion back to minutes, multiply that portion by 60.

Using a clock time as if it were elapsed time. A value displayed as 2:30 PM is a time of day, not necessarily a duration of two and a half hours. Multiplying it by 24 gives the number of hours represented by Excel’s time fraction since midnight. To find work duration, subtract the start time from the end time first, then multiply the difference by 24.

Rounding too early or wrapping long durations. A display of 1.33 does not mean the stored answer is exactly 1.33. Avoid rounding intermediate calculations if you need accuracy in a later total. Also, a standard clock format can wrap a duration after 24 hours; use decimal hours or a duration format such as [h]:mm when you need to display accumulated time.

Tips

Keep a clear header for the converted column, such as Decimal hours, and label whether your results are rounded. This helps distinguish values such as 1.5 hours from the time display 1:30. If you are preparing a report, consider retaining both the original duration and the converted value so another person can verify the conversion.

For a total, sum the decimal-hour results after conversion. If the converted values are in B2:B20, enter =SUM(B2:B20) in the total cell. The result is a number of hours; format the total as Number rather than Time. Alternatively, sum the original numeric durations first and multiply that sum by 24. With durations in A2:A20, =SUM(A2:A20)*24 gives the same kind of total, provided the source cells contain numeric Excel time values.

When the goal is to display a duration as hours and minutes rather than a decimal, keep the time value and apply a duration format. Select the cells, press Ctrl+1, choose Custom, and enter [h]:mm as the format. The square brackets allow the displayed hours to continue beyond 24 instead of resetting to zero. On Excel for Mac, use Command+1 to open Format Cells; the number-format choices work similarly. In Excel for the web, use the Home tab’s Number Format controls, though the exact dialog options may differ from desktop Excel.

Troubleshooting

The result looks like 2:30 or another time. The destination cell is probably formatted as Time. Select the result cells and choose Number or General from Home > Number Format. If using the Format Cells dialog, choose Number and set the desired decimal places. The format affects the display; it does not change the formula.

The result is a small decimal such as 0.104167. That is likely the original time fraction displayed as a number. Check that the formula includes *24 and that you are looking at the result cell, not the source. For 2:30, the converted value should be 2.5 hours.

The formula displays #VALUE!. The source may be text Excel cannot interpret as a time, or it may include extra characters such as a word, space, or unusual separator. Check the formula bar and try entering a clean time in a test cell. For recognizable time text under 24 hours, TIMEVALUE can help; for longer text durations, use a method that handles the hours and minutes separately rather than TIMEVALUE.

The result is wrong for an overnight shift. Direct subtraction of a later start time from an earlier end time produces a negative difference. For times only, use the MOD formula shown above if the shift is less than 24 hours. If the cells include actual dates as well as times, subtract the full date-time values instead; this preserves shifts that span a date boundary and durations longer than a day.

The total appears to reset after 24 hours. If you are displaying the original time values, use the custom duration format [h]:mm. If you want a numeric total, sum the decimal-hour values and format that total as Number. Also confirm that the cells being summed contain numbers rather than text; a text value may be ignored by SUM.

Copied formulas all point to the same source cell. Check whether the formula uses a relative reference such as A2, which should adjust when filled down. A reference with dollar signs, such as $A$2, is fixed and will keep pointing to the same cell. Remove the dollar signs if each row should use its own corresponding time.

Frequently Asked Questions

How do I convert hours and minutes to decimal hours in Excel?

For a real Excel duration in A2, enter =A2*24 in another cell and format the result as Number. For example, 3:45 becomes 3.75, because 45 minutes is 0.75 of an hour.

How do I convert 30 minutes to a number of hours?

Enter 0:30 as a time value, then multiply the cell by 24. The result is 0.5 hours. If you already have the number of minutes as a number, divide the minutes by 60 instead; for example, 30 minutes divided by 60 is 0.5.

Can Excel calculate a shift that ends after midnight?

Yes. If A2 is the start clock time and B2 is the end clock time, =MOD(B2-A2,1)*24 calculates a duration under 24 hours, including an overnight shift. If the cells contain dates and times or the duration can exceed 24 hours, subtract the full date-time values and multiply by 24.

Why does 1:30 become 1.5?

Because 30 minutes is half an hour. Decimal hours use a base of 100 for the displayed decimal digits, not 60 minutes: 1.30 decimal hours would mean 1 hour and 18 minutes, while 1.5 hours means 1 hour and 30 minutes.

How can I show the result with two decimal places?

Select the result cells, open Format Cells with Ctrl+1 on Windows or Command+1 on Mac, choose Number, and set Decimal places to 2. This changes the displayed precision. Use ROUND in the formula only if the value itself must be rounded for subsequent calculations.

Does this method work for totals over 24 hours?

Yes, if the source values are numeric durations. Multiplying a duration by 24 returns the total number of hours, including values above 24. For the original duration display, use [h]:mm so Excel does not wrap the hours at one day.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.