To convert an Excel time in A2 to a decimal number, multiply it by the number of units in a day: with a time value in A2, use =A2*24 for decimal hours, =A2*1440 for minutes, or =A2*86400 for seconds. Format the result as Number or General to see the numeric value; Excel already stores times as numbers, so the multiplication changes the unit rather than turning text into a number.
Quick conversion: choose the unit you need
Excel represents one full day as the number 1. A time such as 6:00 a.m. is one quarter of a day, or 0.25, while 12:00 noon is 0.5. Multiplying by 24, 1,440, or 86,400 expresses that same fraction as hours, minutes, or seconds. The result is a decimal, not a clock display.
- Decimal hours: with a time value in A2,
=A2*24. For 2:30, the result is 2.5 hours. - Total minutes: with a time value in A2,
=A2*1440. For 2:30, the result is 150 minutes. - Total seconds: with a time value in A2,
=A2*86400. For 2:30, the result is 9,000 seconds.
These calculations assume A2 contains a genuine Excel time value and represents a time within one day. You can enter the formula in another cell, then copy it down for other rows. If Excel displays the result as a time, the calculation may be correct but the result cell may still have a time number format. Change that format to Number or General.
Why Excel times are numbers
Excel stores dates and times as serial numbers. The whole-number portion represents days, and the decimal portion represents the fraction of a day that has elapsed. For example, 0.5 is half a day, and 0.25 is six hours. A time-formatted cell can therefore contain a numeric value even though the grid displays something familiar such as 6:00 AM.
The display format does not usually change the underlying value. Applying a time format makes a serial value look like a clock time; applying a number format reveals its numeric representation. That distinction explains why merely changing a cell from Time to Number may show a small decimal, not the number of hours someone expects. To get hours, multiply the serial fraction by 24.
For example, 6:00 AM has an underlying value of 0.25. Formatting that value as Number can show 0.25, while multiplying it by 24 produces 6. The latter is the useful form for calculations such as hourly billing, average time, or labor totals. Excel does not need to convert the time into a different data type; it needs a calculation that expresses the stored fraction in the desired unit.
Enter the formula and format the result
In Excel for Microsoft 365 on Windows, put the conversion formula in an empty cell beside the source time. For a time in A2, type =A2*24 into B2 to calculate decimal hours. Press Enter, then use the fill handle to copy the formula to other rows if needed. If the source data is in a different cell, replace A2 with that cell reference.
- Select the result cell or range.
- On the ribbon, choose Home > Number Format dropdown > Number. General is also suitable if you do not need a fixed number of decimal places.
- To show a consistent number of decimal places, use the decimal-place controls in the Number group, or open Format Cells and choose Number.
- Check a known example before relying on a large converted range. For instance, 1:30 should become 1.5 hours, because 30 minutes is half an hour.
A number format controls what is visible, not the formula’s arithmetic. A result of 1.5 formatted with a time format can appear as a clock-style value instead of 1.5. Conversely, formatting the original time cell as Number reveals its fraction of a day but does not calculate decimal hours for you. Keep the original time column if you need to preserve readable clock times, and put converted values in a separate column.
Choose between time of day and elapsed duration
First decide what the source represents. A time of day, such as 9:15 AM, is a point on the clock. A duration, such as 9 hours and 15 minutes worked, is an amount of elapsed time. For values shorter than 24 hours, the same multiplication converts either kind of value. The difference matters when durations exceed a day or when a date is included.
For a clock time with a date attached, Excel’s serial includes both the date’s whole-number part and the time’s fractional part. Multiplying the entire cell by 24 gives hours since Excel’s date origin, not just the hour shown on the clock. If A2 contains a date and time and you want only the time-of-day portion in decimal hours, use =MOD(A2,1)*24. This keeps the fractional part and discards the date portion. For example, a date-time whose clock portion is 6:00 AM gives 6, regardless of its date.
For a duration recorded as a start time and end time, subtract the start from the end and multiply the difference by 24. With a start time in A2 and an end time in B2, use =(B2-A2)*24 when the end is later on the same day. If the interval crosses midnight and the cells contain clock times only, use =MOD(B2-A2,1)*24. For a shift from 10:00 PM to 2:30 AM, the result is 4.5 hours. If the dates are included in both date-time entries, ordinary subtraction already handles the day boundary, so use the dated values rather than discarding their dates.
Durations longer than 24 hours
Excel can store durations longer than one day, but the common clock format h:mm normally wraps around after 24 hours. A total of 27 hours may display as 3:00, which can look like the duration was lost. The underlying serial still represents 27 hours, so multiplying it by 24 returns 27.
To show the original duration without wrapping, select the duration cells, open Format Cells, choose Custom, and enter the format [h]:mm. The square brackets tell Excel to display accumulated hours rather than resetting the hour count at each day. This is useful for elapsed time and work totals. It is not the same as converting to a decimal number: the custom format changes how the duration appears, while a formula such as =A2*24, with the duration in A2, returns decimal hours for calculation.
Be careful when adding many time entries. If each entry is a duration and the total might exceed 24 hours, use the bracketed format for the total cell. If you need a decimal total, multiply the sum by 24. With durations in A2:A10, use =SUM(A2:A10)*24; format the result as Number. The formula totals the stored day fractions first, then converts that total to hours.
Convert text that looks like a time
Sometimes a cell displays 2:30 but is stored as text. Text may be left-aligned by default, and arithmetic with it may produce a value error, although alignment alone is not a reliable test because formatting and alignment can be changed. A dependable check is to select the cell and inspect the formula bar and number format, or try a small calculation in a spare cell.
If A2 contains text that Excel can recognize as a time under your regional settings, use =VALUE(A2)*24 to parse it and return decimal hours. For text 2:30, the result is 2.5. The text must be a recognizable time; strings with extra words or an ambiguous format may not parse as expected. If the values were imported, it may be better to convert the source column to real time values before doing further calculations.
To convert an entire column, one option is to use a helper column with the parsing formula, then copy the results and use Paste Special > Values if you need fixed values rather than formulas. Review the converted rows before replacing the original data. Regional settings can affect how Excel interprets separators and time conventions, so verify examples from the actual file, especially if the workbook came from another country or system.
Common problems and how to fix them
- The answer appears as a time: select the result and choose Home > Number Format dropdown > Number. The result cell may have inherited the source cell’s time format.
- The result is a small decimal, such as 0.25: this is the fraction-of-a-day value, not decimal hours. Multiply by 24 to express it as hours.
- The result seems 24 times too large: check whether the source includes a date. Multiplying a date-time serial by 24 includes the date’s whole days; use the MOD version when you want only the clock portion.
- A duration total looks too small: a standard h:mm display can wrap at 24 hours. Use the custom format
[h]:mmfor an accumulated duration, or convert the total to decimal hours. - The formula returns a value error: the source may be text that Excel cannot parse, or may contain extra characters. Confirm the cell’s contents and use VALUE only when the text is a recognizable time.
- A negative time displays as hash marks: Excel’s default date system generally cannot display negative date-time serials as ordinary clock times. For elapsed-time calculations, check the order of subtraction and decide how negative results should be represented rather than assuming the display indicates a bad conversion.
Rounding is a separate choice from conversion. If a value should be rounded to two decimal places, with a time value in A2 use =ROUND(A2*24,2). For 1:20, the exact decimal is 1.3333… hours, and the formula returns 1.33. Use rounding only when it matches the task’s rules; formatting a result to show two decimals does not necessarily remove the extra precision stored in the cell.
Frequently Asked Questions
How do I convert Excel time to decimal hours?
With a genuine Excel time value in A2, enter =A2*24 in another cell and format the result as Number or General. A value of 3:45 becomes 3.75 hours.
How do I convert time to minutes in Excel?
With a time value in A2, use =A2*1440. For example, 1:15 represents 75 minutes. If you want seconds instead, multiply by 86,400.
Why does changing the cell format not give me decimal hours?
Number formatting changes the display, not the units of the stored value. A time of 6:00 AM is 0.25 of a day, so Number formatting can show 0.25. Multiply by 24 to calculate 6 decimal hours.
How can I convert a time that is stored as text?
If A2 contains text Excel recognizes as a time, use =VALUE(A2)*24 for decimal hours. If Excel cannot parse the text because of its contents or regional conventions, clean or convert the source data first and verify the result.
How do I calculate hours for a shift that ends after midnight?
If A2 contains the start clock time and B2 contains the end clock time, with no dates and a shift shorter than 24 hours, use =MOD(B2-A2,1)*24. If both cells include their dates, subtract the date-times directly and multiply the difference by 24.
Related
- Excel Solver: Find a Target Sum with Changing Cells
- Solver in Excel: How to Enable and Set It Up
- How to Set Up Solver in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Compare Two Columns in Excel for DifferencesTo compare two Excel columns row by row, put a comparison formula in a third column and fill…
- Pull Data Dumps With No Blank Rows in ExcelIf your data dump is in A2:D1000 and column A contains a required record ID, enter =FILTER(A2:D1000,A2:A1000<>""," ")…
- Autofill in Excel From Another Cell: A Practical GuideTo autofill from another cell in Excel, select the cell you want to copy, then drag its fill…
- Excel File Won’t Open in Protected View? FixesIf an Excel file will not open in Protected View, first confirm that the file came from a…
- Copying Text from Excel to Word: Formatting, Links and TablesTo copy cells from Excel into Word, select the cells, press Ctrl+C in Excel, place the cursor in…
- Add a Drop-Down List in Excel or Google SheetsTo add a drop-down list, select the cell or cells where choices should appear, then create a list…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.