Google-sheets – Calculating time worked per day

google sheets

How do I add time like 8:20am-12:00pm and then after lunch break 12:30pm-5:02pm to end of day to get hours worked per day? I was using =(B2-A2*24)+(D2-A2*24) but that doesn't work

Best Answer

It looks like you've got some order of operations trouble. I think this will give you what you want:

=((B2-A2)*24)+((D2-C2)*24)

Of course, you also need to ensure that the cell uses a decimal number format. And that your afternoon values need to be actual afternoon values. You need to use 24-hour format or am/pm format.

In any event, using your values above, this formula, and appropriate formatting, this is what I get:

 8:20 | 12:00 | 12:30 | 17:02 | 8.20