Convert time to decimal hours

I have a total time of 15:30 (15 hours and 30 minutes, or 15.5 hours). I need to multiply that by an hourly rate of £10, to give a billable amount of £155. I cannot find a way to do that. Any suggestions?

Hello,

assuming 15:30 is in cell A1, hourly rate 10 is in B1 use: =(A1*24)*B1

Background: Time in calc is a fraction of a day, thus multiplying a time by 24 yields the decimal number in hours (See also OASIS Opendocument standard - 4.3.2 Time).

Note: Don’t forget to format cells using time differences with format code [HH]:MM, which allows more than 24 hours.

Hope that helps.

If the answer helped to solve your problem, please click the check mark (:heavy_check_mark:) next to the answer.

1 Like

Perfect, exactly what I needed. Thank you.

Hello, I don’t have that luck. Here is what I get when multiplying with 24:

313:51:40 goes to 7532:40:00

What is the problem? I use Libreoffice 7.0.0.3

OK, I found out. It seems that the time should be in HH:MM:SS format, not in [HH]:MM:SS.

OK, I found out. It seems that the time should be in HH:MM:SS format, not in [HH]:MM:SS.

You probably don’t want that since HH:MM:SS format shows modulo 24 and not a whole time difference, which could be larger than 24 hours. And 313:51:40 * 24 = 7532:40:00 is absolutely correct:

313 hours * 24 = 7512 hours  
51  minutes * 24 = 1224 minutes = 20 hours + 24 minutes
40 seconds * 24  = 16 minutes

Finally we have: 7512 hours + 20 hours + 24 minutes + 16 minutes = 7532:40:00