TimeKit
All Articles
Guide8 min readJuly 18, 2026

How to Calculate Overnight Shift Hours

Calculate hours across midnight, subtract unpaid breaks, convert the result to decimal hours, and handle daylight-saving transitions.

How to Calculate Overnight Shift Hours editorial illustration

An overnight shift is calculated the same way as any other interval once the end time is placed on the next date. If a shift starts at 10:00 PM and ends at 6:30 AM, the elapsed time is 8 hours 30 minutes before breaks.

Method 1: Split at Midnight

Calculate from the start to midnight, then from midnight to the end.

For 10:00 PM to 6:30 AM:

  • 10:00 PM to midnight = 2 hours
  • Midnight to 6:30 AM = 6 hours 30 minutes
  • Total = 8 hours 30 minutes

This method is easy to verify by hand and makes the date change visible.

Method 2: Use 24-Hour Minutes

Convert each clock time into minutes after midnight. 10:00 PM is 22:00, or 1,320 minutes. 6:30 AM is 390 minutes. Because the end is on the next day, add 1,440 minutes:

390 + 1,440 - 1,320 = 510 minutes

Then divide 510 by 60 to get 8.5 decimal hours.

Subtract Breaks

If the shift includes a 30-minute unpaid break, paid time is 480 minutes, or 8 hours. Record paid and unpaid breaks separately. A break that begins before midnight and ends after midnight is still one continuous interval.

Longer Than 24 Hours

The rule "add one day when the end is earlier" assumes a shift lasts less than 24 hours. For on-call periods or multi-day work, store full start and end dates. Never infer the number of days from clock readings alone.

Daylight-Saving Transitions

Clock arithmetic can fail when the local offset changes overnight. A spring transition can skip an hour; an autumn transition can repeat one. A local shift shown as 12:00 AM to 8:00 AM may represent seven, eight, or nine elapsed hours depending on the region and date.

For accurate elapsed time, attach a named time zone to both timestamps and convert each instant to UTC before subtracting. Follow the applicable pay rule as well, since payroll treatment may be defined by law or agreement rather than pure elapsed seconds.

Assigning the Shift to a Workday

Payroll systems often assign an overnight shift to its start date, but that is a policy choice. Overtime calculations may split hours at the official workweek boundary even when the shift remains one row on a timesheet.

Final Check

Keep the two dates visible, confirm AM and PM, subtract each unpaid break once, and compare minutes before converting to decimals. Most overnight errors come from losing the date, not from difficult arithmetic.

A Full Timesheet Example

Consider a shift from Friday 9:40 PM to Saturday 6:10 AM with an unpaid break from 1:15 AM to 1:45 AM.

  • 9:40 PM to midnight = 2 hours 20 minutes
  • Midnight to 6:10 AM = 6 hours 10 minutes
  • Elapsed shift = 8 hours 30 minutes
  • Unpaid break = 30 minutes
  • Paid time = 8 hours, or 8.00 decimal hours

The break belongs to Saturday by calendar date, but the employer may display the whole shift under Friday. The workweek calculation must still split it if an official boundary falls inside the interval.

Preventing Duplicate or Missing Punches

An odd number of punches signals a missing clock-in or clock-out. Overlapping intervals can double-count time, while two adjacent intervals may represent a break that was never labeled. Validate the timeline before adding durations.

Keep timestamps with their offsets when employees work across zones. A flight crew or remote technician can start and finish in different local zones; subtracting the displayed wall clocks without converting both to instants gives the wrong duration. That record also makes later payroll audits reproducible.

#overnight shift hours#hours across midnight#time clock