QuickCalc.ai
Date & Time

How to Calculate Hours Worked From Clock-In and Clock-Out Times

The exact math for turning clock-in and clock-out times into total hours worked, including unpaid breaks and overnight shifts.

Adding up hours from a timesheet looks simple until breaks and overnight shifts enter the picture — both trip up manual calculations more often than you'd expect.

The basic formula

Worked time = clock-out − clock-in − unpaid break minutes. A 9:00 AM to 5:00 PM shift spans 8 hours; subtracting a 30-minute unpaid lunch leaves 7 hours 30 minutes worked.

Handling an overnight shift

If clock-out is earlier in the clock than clock-in — a 10:00 PM to 6:00 AM shift, for example — straightforward subtraction gives a negative number. The fix is to add 24 hours to the clock-out time before subtracting: 6:00 AM becomes effectively 30:00, so 30:00 − 22:00 = 8 hours, the correct span.

Converting to decimal hours

Payroll systems usually want decimal hours, not hours and minutes — 7 hours 30 minutes is 7.5 decimal hours, found by dividing the minutes portion by 60 (30 ÷ 60 = 0.5) and adding it to the whole hours. Getting this conversion wrong is a common source of small payroll discrepancies.

The Time Card / Hours Calculator handles all of this automatically across multiple shifts, including overnight detection and decimal conversion.

Advertisement

Related calculators

More guides