This calculator is for general education and planning, not medical advice. If you have ongoing insomnia or sleepiness related to shift work (sometimes called shift work disorder), or you struggle to stay awake at work or while driving, talk to a doctor or sleep specialist.
How the Calculator Works
The calculator first works out what kind of shift you are on from its start time, end time and length: night (runs through the early morning hours), evening or swing (ends late evening or shortly after midnight), early morning (starts between 4 and 8 AM), a regular day shift, or an extended shift of 16 hours or more. It then applies a few well-established principles:
- Anchor the main sleep to the shift. After night and evening shifts, sleep is placed soon after you get home (after a 30-60 minute wind-down), when sleep pressure is highest. Before early and day shifts, it counts back from the time you need to wake, allowing 45 minutes to get ready plus your commute.
- Sleep 7-9 hours in 24. Adults on shifts need the same amount of sleep as everyone else. Choose the amount that leaves you feeling alert; most people need 7-9 hours.
- Caffeine stops about 6 hours before sleep. Caffeine's effects last many hours, and even when you can fall asleep, late caffeine tends to make sleep lighter and shorter.
- Nap before, not after, night shifts. A 20-30 minute nap before leaving for a night shift reduces how long you've been awake by the low point around 3-5 AM. Early-shift workers get an optional short catch-up nap only if it can happen before about 4 PM, so it doesn't delay bedtime.
- Light is the steering wheel. Bright light early in a night shift and darkness on the way home and while sleeping help the body clock lean toward daytime sleep. Early-shift workers need the opposite: bright light on waking, dim evenings.
- Eat by day where you can. The largest meal goes before the shift; during the night, smaller snacks are easier on digestion and on alertness.
Using the "Last Shift Before Days Off" Option
Tick this box after your final night shift if you want to switch back to sleeping at night. Instead of a full day sleep, the calculator gives you a short recovery sleep of about 3.5 hours, followed by a normal bedtime that evening. This is one of the most reliable ways to get back to a day schedule quickly. Stay outside in daylight during the afternoon and avoid caffeine after mid-afternoon. If you work permanent nights and prefer to stay partly night-oriented on days off, see the days-off strategy in our night shift guide.
Worked Examples
| Shift | Commute | Main sleep | Nap | Caffeine cutoff |
|---|---|---|---|---|
| 7 PM – 7 AM (12-h nights) | 30 min | 8:00 AM – 3:30 PM | 5:00 – 5:25 PM | 2:00 AM |
| 11 PM – 7 AM (8-h nights) | 20 min | 7:50 AM – 3:50 PM (8 h) | 9:10 – 9:35 PM | 1:50 AM |
| 3 PM – 11 PM (swing) | 30 min | 12:30 AM – 8:30 AM (8 h) | None needed | 6:30 PM |
| 6 AM – 2 PM (early) | 30 min | 9:15 PM – 4:45 AM | Optional 3:00 PM | 3:15 PM |
Want to see these in context with light, meals and transition days? Our sample shift work sleep schedules lay out full timetables for 12-hour nights, swing, early, forward-rotating, 2-on-2-off and 24-hour shifts.
Making the Plan Work in Real Life
- Protect the sleep window: blackout curtains or an eye mask, earplugs or white noise, a cool room, and your phone on Do Not Disturb. Tell your household when you are sleeping.
- Keep it consistent: use the same window on every work day in a run of shifts. Your body adapts better to a regular pattern than to the "best" pattern done irregularly.
- Waking early from day sleep? That's common after night shifts. See how to fix short or broken day sleep. A planned second sleep before your shift is often the answer.
- Driving: the drive home after a night or long shift is a high-risk time for drowsy driving. If you feel sleepy, nap before driving or use other transport.
- Plan cycles if you like: if you prefer to time sleep in roughly 90-minute cycles, the bedtime calculator can fine-tune the wake time within your window.
Frequently Asked Questions
How many hours of sleep does a night shift worker need?
The same 7-9 hours as other adults. Daytime sleep is often shorter, so many night workers make up the total with a main sleep plus a pre-shift nap.
What is the best time to sleep after a 12-hour night shift?
For a 7 PM – 7 AM shift, most people do best going to bed within about an hour of getting home, for example 8 AM to 3:30 PM, with an optional short nap before the next shift.
When should I stop drinking coffee on a night shift?
Aim to stop about 6 hours before you plan to sleep. If you go to bed at 8 AM, that means no caffeine after about 2 AM. Use it early in the shift rather than to push through the last few hours.
Should I nap before a night shift?
Yes, a 20-30 minute nap before leaving for work is one of the most effective ways to reduce sleepiness during the early-morning low point. If you had a short day sleep, a longer 60-90 minute nap in the afternoon can help, as long as it ends a couple of hours before the shift.
Is this calculator suitable for rotating shifts?
Yes: calculate each shift type in your rotation separately, then use days off to bridge between them. The rotating shift guide explains how to move your sleep 1-2 hours at a time.