
Tips.Net > ExcelTips Home > Formulas > Time Formulas > Converting Time Notation to Decimal Notation
Summary: Want to convert an elapsed time, such as 8:37, to a decimal time, such as 8.62? If you know how Excel stores times internally, coming up with the conversion formula is a snap. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)
Excel internally stores date and time values as floating-point numbers. The portion of the number to the left of the decimal point represents days elapsed since either January 1, 1900 or 1904 (depending on how your copy of Excel is configured). The portion of the number to the right of the decimal point represents the portion of a full day represented by the date and time.
Knowing this, you can easily convert a number from its time notation to its decimal equivalent. For instance, if you have an elapsed time value that represents 8:30, you can easily convert it to 8.5 (eight and a half hours) by multiplying the time value by 24.
To give another example, let's say that you have a beginning time in cell A3 and an ending time in cell B3. In cell C3 you place the following formula:
=B3 - A3
The result in cell C3 is the elapsed time, which is the difference between the beginning and ending times. In cell D3 you could then place the following formula:
= C3 * 24
The result in D3 is a decimal representation of the number of hours in cell C3. You can format the cell as you would any other number value so that it displays the number of decimal places desired. If you prefer to limit the number of decimal places in the result, right off the bat, you could instead use the following formula in cell D3:
=ROUNDUP(C3 * 24, 1)
This formula multiples C3 by 24 to convert to a decimal value, but then rounds the result to a single decimal place.
Tip #2052 applies to Microsoft Excel versions: 97 2000 2002 2003 2007
Got the Time? If you work with either times or dates in Excel, you really need ExcelTips: Times and Dates. Everything you need to know about slicing, dicing, and generally working with times and dates.
Add power to your purpose with Excel. A comprehensive 500+ page e-book explains everything you need to know about macros. (more information...)
Ask an Excel Question
Make a Comment
ExcelTips
Excel 2007 Tips
WordTips
Word 2007 Tips
Vital News Home
ExcelTips FAQ
ExcelTips Premium
Learn Access Now
Beauty Tips
Car Care Tips
Cleaning Tips
College Tips
Cooking Tips
Gardening Tips
Health Tips
Home Improvement
Money Tips
Pet Tips
Tips.Net Home
Advertise on the
ExcelTips Site