Loading

Got a version of Excel that uses the
menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)?
**This site is for you!** If you
use a later version of Excel, visit
our *ExcelTips* site focusing on the ribbon interface.

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company.

Learn more about Allen...

ExcelTips FAQ

ExcelTips Resources

Ask an Excel Question

Make a Comment

Free Business Forms

Free Calendars

** Please Note:** This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later),

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.

*ExcelTips* is your source for cost-effective Microsoft Excel training. This tip (2052) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Converting Time Notation to Decimal Notation.

*Related Tips:*

**Program Successfully in Excel!** John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out *Excel 2013 Power Programming with VBA* today!

To my opinion & experience the only reason for converting Time into Decimals raises when wages calculations are needed.

99% of Excel users present time as hh:mm and not hh.mm

So, the multiplication by 24 is a part(!) of a cost formula and not a stand-alone calculation.

By the way: =C3-B3 is can only be used while C3>B3.

Some people work Night-Shifts - for example: 20:00->02:00

In such a case C3-B3 will present an error (######## = Negative time).

The appropriate formula is: =MOD(C3-B3,1)

Thanks for your attention,

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

99% of Excel users present time as hh:mm and not hh.mm

So, the multiplication by 24 is a part(!) of a cost formula and not a stand-alone calculation.

By the way: =C3-B3 is can only be used while C3>B3.

Some people work Night-Shifts - for example: 20:00->02:00

In such a case C3-B3 will present an error (######## = Negative time).

The appropriate formula is: =MOD(C3-B3,1)

Thanks for your attention,

Michael (Micky) Avidan

“Microsoft® Answers" - Wiki author & Forums Moderator

“Microsoft®” MVP – Excel (2009-2015)

ISRAEL

Katherine,

Make sure you format cell D3 to a non-time format. For instance, format it as 'General' and you should see 3.75 in the cell, which is correct.

-Allen

Make sure you format cell D3 to a non-time format. For instance, format it as 'General' and you should see 3.75 in the cell, which is correct.

-Allen

This formula doesn't work when I try it. When I calculate =C3 *24, where C3 contains the time difference result, as instructed in the example above, the result is incorrect.

My example:

A3: 9:00:00 AM

B3: 12:45:00 PM

C3: =B3-A3, displaying 3:45

D3: =C3*24, displaying 18:00

My example:

A3: 9:00:00 AM

B3: 12:45:00 PM

C3: =B3-A3, displaying 3:45

D3: =C3*24, displaying 18:00

Thank you so much! This was so simple but I spend quite a long time figuring out how to convert my sampling points (date and time) into hours. This trick made it easy :)

Thank you. This was very helpful. I have been trying to figure out how to customize a timesheet to record partial hours and this tip worked. I ended up adding the *24 at the end of the formula counting the time worked to automatically convert the result to decimals and didn't have to add a column.