Night Shifts•October 6, 2026•3 min read

Overnight Shift Math: Calculating Shifts That Cross Midnight

Learn the +24h mathematical formula to calculate graveyard and third-shift hours crossing midnight without negative number errors.

Published by TimeCardWorks•Client-Side Mathematical Reference

Interactive Shift Hours Calculator

Dedicated Tool
Common Shift Schedule Presets

Shift Time & Duration

Supports standard daytime shifts and overnight cross-midnight schedules.

:
:
Elapsed Window
8h 30m
8.50 decimal hours
Unpaid Break
30m
0.50 decimal hours
Net Paid Shift Duration
8h 00m
8.00 decimal hours

1. Why Overnight Shifts Break Standard Subtraction

The Midnight Boundary Problem (00:00 / 24:00)

When a shift starts at 22:00 (10:00 PM) and finishes at 06:00 (6:00 AM) the next day, naive arithmetic subtracts 22:00 from 06:00 (6 - 22 = -16 hours).

Because clocks reset to 00:00 at midnight, calculations crossing into the next calendar day must account for the 24-hour cycle.

2. The Universal Modular +24h Formula

How Automated Calculators Solve Overnight Shifts

Whenever End Time is numerically less than Start Time:

Elapsed Minutes = (1,440 - Start Minutes) + End Minutes

Worked Example: Shift from 22:30 to 07:00 with a 30-minute break.

• Start Time: 22:30 = (22 × 60) + 30 = 1,350 minutes from midnight.

• Minutes remaining in first day: 1,440 - 1,350 = 90 minutes (1h 30m).

• End Time: 07:00 = 7 × 60 = 420 minutes into the second day.

• Gross Elapsed Time: 90 + 420 = 510 minutes (8h 30m).

• Subtract 30-minute break: 510 - 30 = 480 net working minutes (8.00 decimal hours).

Start TimeEnd TimeElapsed CalculationNet Hours (30m break)
22:00 (10 PM)06:00 (6 AM)(1440 - 1320) + 360 = 480m7.50 hrs
23:00 (11 PM)07:30 (7:30 AM)(1440 - 1380) + 450 = 510m8.00 hrs
19:00 (7 PM)07:00 (7 AM)(1440 - 1140) + 420 = 720m11.50 hrs (12h shift)
Related Topics & Principles
Night ShiftOvernight MathCross-MidnightGraveyard Shift