How to calculate hours for an overnight shift
Security, healthcare, hospitality, and manufacturing shifts often cross midnight - for example, 22:00 to 06:00. Subtracting the times directly gives a negative number, which is why this trips up plain duration math and spreadsheet formulas that don't account for it.
The fix
When the end time is earlier than the start time, add 24 hours before subtracting. A 22:00-to-06:00 shift becomes 22:00 to 30:00, giving 8 hours - the correct answer.
This calculator detects that automatically: enter 22:00 as the start and 06:00 as the end, and it treats it as an overnight shift without any extra steps. Subtract your break as usual and the total comes out right.
One thing to watch
If your shift crosses a weekly cutoff (for example, a Sunday-night-to-Monday-morning shift), check how your employer allocates those hours to a week for overtime purposes - this tool totals the hours but doesn't make that allocation decision for you.