How to Calculate Work Hours With Breaks and Overnight Shifts

Step-by-step formulas for tracking employee hours across midnight, deducting unpaid meal breaks, and converting clock times to decimal hours.

Updated:

Need to calculate weekly time cards automatically?

Our free Time Card Calculator adds shifts and unpaid breaks and shows work-hour totals.

Open Time Card Calculator

1. The Problem With Midnight Crossing

Calculating hours for standard daytime shifts is straightforward: a worker clocking in at 9:00 AM and out at 5:00 PM worked 8 hours. However, night and graveyard shifts present a common mathematical trap for payroll managers and spreadsheets:

  • Clock In: 10:00 PM (22:00)
  • Clock Out: 6:30 AM (06:30) next morning

A simple subtraction (6.5 − 22.0) produces −15.5 hours. Because the clock resets to 00:00 at midnight, calculations that do not account for day transitions fail.

The Overnight Adjustment Rule

To resolve overnight shifts mathematically, add 24 hours (1,440 minutes) to the checkout time whenever Clock Out is numerically less than Clock In:

Adjusted Out Time = Clock Out + 24:00
Total Shift Minutes = (Adjusted Out Minutes − In Minutes) − Break Minutes

In our example: 06:30 + 24:00 = 30:30 (1,830 minutes). Subtracting 22:00 (1,320 minutes) gives 510 minutes, which equals 8 hours and 30 minutes.

2. Paid Rest Breaks vs. Unpaid Meal Breaks

Accurate payroll requires distinguishing between compensable rest periods and non-compensable meal breaks under labor standards (such as the U.S. Fair Labor Standards Act — FLSA):

Break TypeTypical DurationCompensable (Paid)?Deducted from Work Hours?
Rest Break / Coffee Break5 to 20 minutesYes (Paid)No. Counted as work hours.
Bona Fide Meal Period30 to 60+ minutesNo (Unpaid)Yes. Deducted from total shift time.
Interrupted Meal BreakDepends on the interruptionMay be paid work timeCheck whether the employee was fully relieved of duties.

These are general U.S. federal principles. State rules, employment terms, and the facts of a particular break can change how time is treated. See the U.S. Department of Labor guidance on breaks and meal periods.

3. Converting Minutes to Decimal Hours for Payroll

When using a decimal-hour payroll calculation, convert minutes to a fraction of an hour first. An employee who worked 8 hours and 30 minutes at $20/hr has 8.5 hours for this calculation, not 8.30 hours. Multiplying by 8.30 would produce $4.00 less pay in this example.

MinutesFractionDecimal HoursRounded (Hundredth)
15 minutes15 / 600.250.25 hrs
20 minutes20 / 600.3333...0.33 hrs
30 minutes30 / 600.500.50 hrs
45 minutes45 / 600.750.75 hrs
50 minutes50 / 600.8333...0.83 hrs

4. Complete Worked Example: 7-Day Payroll Calculation

Consider an employee working five overnight shifts during a workweek. For this arithmetic example, assume a $24.00 hourly base wage and 1.5× overtime pay for hours above 40 in the workweek; actual pay rules depend on the job and applicable law:

  • Monday: 21:00 to 05:30 (Next day) − 30 min meal break = 8.00 hrs
  • Tuesday: 21:00 to 05:30 (Next day) − 30 min meal break = 8.00 hrs
  • Wednesday: 21:00 to 07:00 (Next day) − 45 min meal break = 9.25 hrs
  • Thursday: 21:00 to 07:30 (Next day) − 45 min meal break = 9.75 hrs
  • Friday: 21:00 to 06:00 (Next day) − 30 min meal break = 8.50 hrs

Total Hours Worked: 8.00 + 8.00 + 9.25 + 9.75 + 8.50 = 43.50 hours.

  • Regular Hours: 40.00 hrs × $24.00 = $960.00
  • Overtime Hours: 3.50 hrs × ($24.00 × 1.5) = 3.50 × $36.00 = $126.00
  • Total Gross Pay: $960.00 + $126.00 = $1,086.00

Related Payroll & Time Tracking Tools

Check a schedule or compare pay scenarios with these related tools: