By Iqbal Hussain, Founder and calculator developer · Formulas checked against worked examples · Last updated
Night Shift Hours Calculator
Count hours inside a configured overnight window.
How Night Shift Hours Calculator Works?
The Night Shift Hours Calculator works by finding the overlap between a shift and a configured night window, such as 10:00 PM to 6:00 AM, and counting only the hours inside that window.
- 1
Enter the shift
Type the shift, for example 6:00 PM to 2:00 AM (8 hours).
- 2
Set the night window
Use a window such as 22:00 to 06:00.
- 3
Read night hours
Night hours = 22:00 to 02:00 = 4 hours; day hours = 4 hours.
Night Shift Hours Calculator Formula
The Night Shift Hours formula is Night Hours = max(0, min(Shift End, Window End) − max(Shift Start, Window Start)), with times placed on a continuous timeline across midnight.
- Sₛ, Eₛ: shift start and end on a continuous timeline.
- S_w, E_w: night window start and end (22:00 and 30:00 for 06:00 next day).
Example: a shift 20:00–04:00 against a 22:00–06:00 window gives min(28, 30) − max(20, 22) = 6 night hours out of 8 total.
Night Shift Hours Calculator Conversion Table
The Night Shift Hours conversion table shows 8 shifts measured against a 10:00 PM – 6:00 AM night window.
| Shift | Total Hours | Night Hours | Day Hours | Night Share |
|---|---|---|---|---|
| 14:00–22:00 | 8 | 0 | 8 | 0% |
| 16:00–00:00 | 8 | 2 | 6 | 25% |
| 18:00–02:00 | 8 | 4 | 4 | 50% |
| 20:00–04:00 | 8 | 6 | 2 | 75% |
| 22:00–06:00 | 8 | 8 | 0 | 100% |
| 23:00–07:00 | 8 | 7 | 1 | 87.5% |
| 19:00–07:00 | 12 | 8 | 4 | 66.7% |
| 00:00–08:00 | 8 | 6 | 2 | 75% |
What is Night Shift Hours Calculator?
The Night Shift Hours Calculator is a window-based tool that counts how many hours of a shift fall inside a defined night period.
Night premiums, health rules, and scheduling limits depend on night hours, not total hours. The Night Shift Hours Calculator separates a 7:00 PM to 7:00 AM shift into 8 night hours and 4 day hours under a 10:00 PM – 6:00 AM window.
What are the uses of Night Shift Hours Calculator?
There are 5 main uses of the Night Shift Hours Calculator, including night premium eligibility, health monitoring, and roster design.
-
Night premium eligibility
Payroll teams count hours inside the 10:00 PM – 6:00 AM premium window.
-
Health monitoring
Occupational health teams track weekly night hours for night workers.
-
Roster design
Planners spread night hours evenly across a team.
-
Young worker limits
Employers check workers under 18 have 0 night hours.
-
Hospital rotations
Nurse managers count night hours across a 12-hour rotation.
Night Shift Hours Calculator FAQ
How do I use the Night Shift Hours Calculator?
1. Enter the shift: Type the shift, for example 6:00 PM to 2:00 AM (8 hours). 2. Set the night window: Use a window such as 22:00 to 06:00. 3. Read night hours: Night hours = 22:00 to 02:00 = 4 hours; day hours = 4 hours.
What formula does the Night Shift Hours Calculator use?
The Night Shift Hours formula is Night Hours = max(0, min(Shift End, Window End) − max(Shift Start, Window Start)), with times placed on a continuous timeline across midnight. In short: Night = max(0, min(Eₛ, E_w) − max(Sₛ, S_w)).
Can you show a worked example?
a shift 20:00–04:00 against a 22:00–06:00 window gives min(28, 30) − max(20, 22) = 6 night hours out of 8 total.