Shift Work Sleep Calculator
Updated for 2026 ยท All math runs privately in your browser
Night shifts wreck sleep unless you plan it. Enter your shift times and get your best sleep window โ when to go to bed, when to get up, and when to stop the caffeine.
Your shift
When your shift begins.
When your shift ends.
Time to get home, eat and relax after the shift.
Time to get ready and travel to work.
Your sleep plan
Your day at a glance
- Bedtimeโ
- Latest wake-upโ
- Sleep blockโ
- Caffeine cutoffโ
Keep the same sleep window on days off โ shifting it back and forth is what causes most shift-work sleep problems. Dark room, cool temperature, earplugs if it is noisy.
How to use this calculator
- Enter your shift start and end times.
- Set your wind-down time โ the minutes you need after the shift before you can sleep.
- Set your prep time โ the minutes you need before the next shift.
- Read your bedtime, latest wake-up and caffeine cutoff, and protect that sleep block.
How the math works
Bedtime = shift end + wind-down time. Latest wake-up = shift start โ prep time. Your sleep block is the window between them, capped at your target sleep hours: if the window is longer than the target, the extra time is free time. Caffeine cutoff = bedtime โ 6 hours, because caffeine's half-life is about 5โ6 hours.
Worked example: night shift 22:00โ06:00, 60 minutes to wind down, 60 minutes to prepare, target 8 hours. Bedtime = 06:00 + 60 min = 07:00. Latest wake-up = 22:00 โ 60 min = 21:00. The window from 07:00 to 21:00 is 14 hours โ plenty for the 8-hour target, so the recommended sleep block is 07:00โ15:00. Caffeine cutoff = 07:00 โ 6 hours = 01:00 โ no coffee after 1 AM, or it is still in your system at bedtime.
Why 6 hours for caffeine? Caffeine's half-life is roughly 5โ6 hours, so half of a 1 AM coffee is still in your blood at 7 AM. A cutoff 6 hours before bed is the standard advice from sleep medicine โ and the same rule our Caffeine Cutoff Calculator uses.
Surviving night shifts
Use light like a tool. Bright light during the first half of your shift keeps you alert; sunglasses on the way home and a dark bedroom protect your sleep. Light is the strongest signal to your body clock โ stronger than willpower, caffeine or habit.
Eat like it is daytime. A proper meal before the shift, a light meal mid-shift, and a small snack โ not a heavy meal โ before bed. Heavy food right before sleep raises body temperature and fragments it. And keep meal times consistent across your shifts, so your gut clock stays in step.
Nap before the shift. A 20โ30 minute nap before a night shift cuts sleepiness more than an extra coffee, and a short nap mid-shift helps if your workplace allows it. On days off, keep the same sleep window if you can โ the back-and-forth is what causes most shift-work sleep problems, not the night itself.
Frequently asked questions
It builds your sleep window from your shift: bedtime is shift end plus wind-down time, latest wake-up is shift start minus prep time, and the sleep block is your target hours inside that window. Caffeine cutoff is bedtime minus 6 hours.
You cannot fall asleep the minute a shift ends. Your body needs time to come down โ commute, food, shower, decompressing. Adding it to the calculation stops the plan from giving you a bedtime you cannot actually meet.
Six hours before bedtime. Caffeine's half-life is about 5โ6 hours, so a coffee at 1 AM is still half-strength at 7 AM. Use caffeine early in the shift, when it helps, and stop it in the second half.
The one you can keep every day, including days off. Sleeping 7 AMโ3 PM every day beats sleeping at different times โ your body clock adapts to a consistent schedule, even a night one.
Right after, if you can. The longer you stay up after a night shift, the more daylight and noise you fight, and the shorter your sleep gets. Get home, wind down, and get into bed.
The same 7โ9 hours as everyone else. Shift workers average about an hour less, which is exactly the gap this calculator is trying to close โ protect the full block, not just what is left over.