# Looking for a formula to find the difference between two hour:minute times from a timecard and convert the difference into decimal hours [closed]

Example: Clock in at 8:00 and out at 16:00 The difference would be 8.00 hours.

I want to create a spreadsheet where I simply enter the times from the time cards (24 hour format) and get decimal hours as the output. The company I work for calculates time-card times to two digits after the decimal. For example, 8.03 hours.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2016-02-20 08:06:23.591884

Sort by » oldest newest most voted

Thanks to mariosv. I was able to use his answer to come up with the following formula in D2:

=(ROUND(C2*24,2))-(ROUND(B2*24,2))


With B2 being the start time and C2 being the end time. Columns B and C are formatted as time and D is formatted as numbers with two digits following the decimal.

more

You can enter the times with the format
A1: hh:mm
and in other cell calculate the hour with two decimals:
B1: =ROUND(A1*24;2)

For exact hours you can enter the hour with a colon without the minutes
8:

more