2

In a nutshell I'm trying to build a custom timesheet that automatically calculates hourly pay and so forth and I'm stuck on the following problem.

How do I make Google Sheets calculate the simple decimal of hours worked? I want to enter a start and end time and produce an output like the following.

   In     Out   Total
---------------------------
 |7:30 | 12:00 | 4.5 |
---------------------------

1 Answer 1

1

Google Spreadsheets stores time/date in multiples of days. (Or, more accurately, in a number since an "epoch" date.)

So, =B2-A2 in cell C2 will give you 0.1875, assuming you have the cell formatted as a number and not a date.

Changing that to =(B2-A2)*24 will give you the value in hours, or 4.5.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.