Table of Contents
To calculate hours worked in Google Sheets, subtract the start time from the end time and format the result as Duration. Use Time for clock readings such as 9:00 AM and Duration for elapsed values such as 8 hours.
Calculate a shift that ends the same day
- Put the start time in
E6and the end time inF6. Select the input cells and choose Format > Number > Time.

Use Time for the start and end cells. - In
G6, enter=F6-E6. For example, 9:00 AM to 5:30 PM gives 8 hours 30 minutes.
- Set the result column to Format > Number > Duration, then fill the formula down to the remaining rows.
Handle overnight shifts
If you enter times without dates and shifts are shorter than 24 hours, use =MOD(F6-E6,1). For example, 10:00 PM to 6:00 AM gives 8 hours. This formula treats any earlier end time as the next day, so check for accidental reversals.
For shifts of 24 hours or more, enter both the date and time in each input cell and use =F6-E6. Format the inputs as Date time and the output as Duration.

Add totals and convert to decimal hours
- Weekly total: Use
=SUM(G6:G12)and keep the result in Duration format so a total such as 40 hours does not display as a clock time. - Decimal hours: Use
=G6*24in a separate column and format it as a number. Eight hours and thirty minutes becomes8.5. - Unpaid break: If
H6contains a break duration such as0:30:00, subtract it from the shift duration with=G6-H6.
If subtraction returns an error, check whether Sheets recognized both times as numbers rather than imported text. See Google’s number formatting guide for where to change the display format.
Reader Comments 0
Sign in with email or Google to join the discussion.