How to Calculate Hours Worked (With Breaks and Overnight Shifts)

A step-by-step method for working out hours worked from clock-in and clock-out times, including unpaid breaks and shifts that run past midnight.

Working out hours worked sounds simple until a shift crosses midnight or a break is only half unpaid. The method below works for any timesheet. Once you know it, you can check a paycheck, fill in an invoice or total a week of shifts in a few minutes.

The basic formula

Hours worked = (Clock out − Clock in) − Unpaid break

Only unpaid breaks come off the total. A paid break stays in, because you are paid for that time.

Step by step: a day shift

Say you clock in at 9:00 AM and clock out at 5:45 PM, with a 45-minute unpaid break.

  1. Switch to 24-hour time. 9:00 AM stays 9:00. 5:45 PM becomes 17:45.
  2. Subtract. 17:45 − 9:00 = 8 hours 45 minutes.
  3. Remove the unpaid break. 8h 45m − 45m = 8 hours 0 minutes.

Paid time for the day is 8 hours, or 8.00 in decimal hours.

Overnight shifts

A shift from 10:00 PM to 6:30 AM gives a negative answer if you subtract directly, because 6:30 comes before 22:00. Add 24 hours to the clock-out time first.

  1. Clock out: 6:30 + 24:00 = 30:30.
  2. 30:30 − 22:00 = 8 hours 30 minutes.
  3. Take off a 30-minute unpaid break and paid time is 8 hours 0 minutes.

If clock-in and clock-out show the exact same time, the shift is either zero hours or a full 24. Check the record before you assume.

Adding up a week

Total each day first, then add the days. Work in hours and minutes, and convert to decimals only at the end.

DayPaid time
Monday8h 00m
Tuesday7h 45m
Wednesday8h 15m
Thursday8h 00m
Friday6h 30m
Week total38h 30m (38.50 hours)

Adding minutes is where mistakes creep in. Every 60 minutes rolls into one hour, so 45 + 15 gives one extra hour and no leftover minutes. To turn the total into decimal hours, read how to convert minutes to decimal hours.

Mistakes that skew the total

To skip the arithmetic, the time duration calculator handles breaks and overnight shifts for you, and the payroll hours calculator totals a whole week with overtime.

Worked example: a week of overnight shifts

Night work adds one step to every row, so here is a full week laid out. Each shift crosses midnight.

DayClock inClock outShiftUnpaid breakPaid time
Monday10:00 PM6:30 AM8h 30m30 min8h 00m
Tuesday10:00 PM6:30 AM8h 30m30 min8h 00m
Wednesday11:00 PM7:15 AM8h 15m45 min7h 30m
ThursdayOff
Friday10:00 PM6:00 AM8h 00m30 min7h 30m
Total31h 00m (31.00 hours)

One more detail matters for night workers. A shift that starts on Saturday night and ends on Sunday morning can fall in two different workweeks, depending on how your employer defines the week. That changes which week the hours count toward for overtime, so ask payroll how the workweek is set.

Keep your own record

Quick questions

How do I calculate hours worked between two times?

Subtract the start time from the end time, then subtract any unpaid break. For 9:00 AM to 5:30 PM with a 30-minute unpaid break, the answer is 8 hours.

How do I calculate hours when a shift ends after midnight?

Add 24 hours to the clock-out time, then subtract the clock-in time. A 10:00 PM to 6:30 AM shift runs 8 hours 30 minutes before any break.

Should I use decimal hours or hours and minutes?

Use hours and minutes while you add up the week. Convert to decimals at the end if your payroll system asks for them.

Try the Time Duration Calculator

Find the hours and minutes between two times, subtract a break and convert the result to decimal hours.

Open the calculator

Keep reading