Free tool

Shift sleep-timing calculator

Your shift hours and journey in, a sleep window, nap, caffeine cut-off and light tips out. Every rule is based on published guidance, listed at the bottom.

Pick "Days off" or another shift type to get advice for the first or last shift of a run and for switching patterns.

Night shift · 12 hours · 19:00 to 07:00

WorkTravelSleepNapFree

  • 8am to 3pmDay sleep after each night [2][3]Go straight to bed when you get home (about 7:30am); the more sleep you get before 2pm the better. Leave the chores. 7 hours here plus the nap below.
  • 4pm to 5:30pmNap before the next night [3][4][5]Day sleep is lighter and shorter, so this 1 hour 30 min top-up before you leave brings you to 8 hours 30 min in the 24 hours. Set an alarm and allow an hour to come round: waking from deep sleep leaves you groggy for a while.
  • bright until 1am, then dimLight [10][11]Spend the first half of the shift in bright light and keep the second half dimmer. Dark glasses on the way home help only if someone else is driving; keep them on until you are in a dark bedroom.
  • by 2amLast caffeine [7][8][9]That is 7 hours into your shift. Caffeine early on is fine; after this it is still in your system when you try to sleep at 8am.
  • 7am to 7:30amThe journey home [2]Driving after a night or a long shift is risky. If you can, use public transport, share the driving or get a lift. If you feel sleepy at the wheel, stop and take a short nap somewhere safe.

Numbers in brackets point to the sources below. Everyone is different: use this as a starting point and adjust to what works for you. For meal times around the same shift, try the meal-prep planner, and for more on daytime sleep see Sleep & rest.

Examples for common shifts

With a 30-minute journey each way. Open the calculator above for your own hours.

ShiftMain sleepNapLast caffeine
Early, 6am to 2pm 8:30pm to 4:30am – by 2:30pm
Late, 2pm to 10pm 11:30pm to 7:30am – by 5:30pm
Night, 10pm to 6am (middle of a run) 7am to 2pm 7pm to 8:30pm by 1am
Long night, 7pm to 7am (first of a run) 11pm to 7am 3:30pm to 5:30pm by 2am
Long night, 7pm to 7am (last of a run) 8am to 3pm 4pm to 5:30pm by 2am

How the calculator works out your times

The rules are simple and open. Each one below says where it comes from; the numbers match the sources list.

Sleep window: 8 hours
Adults should sleep 7 or more hours in every 24 [1]. The plan uses 8, the middle of the usual 7 to 9. For day and early shifts it counts back from when you need to be up: an hour to get ready plus your journey [2]. For lates it adds an hour to wind down after you get home.
After a night: straight to bed, then a nap
Go to bed as soon as you are home; the more sleep you get before 2pm the better [3]. Day sleep is lighter and shorter, so the plan gives 7 hours then a 90-minute nap before the next night [3, 4]. If your hours leave no useful gap, it keeps one longer sleep instead.
First night of a run
Sleep normally the night before, then a long nap ending an hour before you leave. Studies gave nurses 1.5 to 3 hours and they were more alert in the second half of the first night [4]; the HSE says the same in plain words: have a short sleep before your first night [2]. Set an alarm and allow time to come round, because waking from deep sleep leaves you groggy [5].
Last night of a run
A short sleep of about 3 hours, then daylight and an early night [2]. Staying up all day would keep you awake far too long [6].
Caffeine: stop 6 hours before sleep
In a controlled study, 400 mg of caffeine taken 6 hours before bed still cut sleep by more than an hour, which is why the authors back a 6-hour cut-off [7]. Caffeine's half-life is 5 to 6 hours, longer for some people [8]; the NHS says its effects can last up to 7 hours [9]. On a night, that cut-off usually lands part-way through the shift: caffeine early on, none later [8].
Light
Bright light in the first half of a night shift keeps you alert; dimmer light in the second half makes it easier to sleep when you get home [10]. Dark glasses on the way home only if someone else is driving, and a dark bedroom [10, 2]. Controlling light is the one countermeasure that actually shifts the body clock rather than papering over it [11].
Anchor sleep when switching shifts
Keeping a 4-hour block of sleep at the same clock time every day kept body rhythms steady on irregular routines [12]. When your sleep on two shift types shares 4 hours, the plan names that block. NIOSH gives the same advice: keep some sleep hours the same in every 24 [6].
Rotation and rest
Forward rotation (early, then late, then night) is easier on the body clock than backward. Shifts should not be longer than 12 hours, and UK working time rules give at least 11 hours between shifts [13]. The plan warns when a changeover breaks these.

Questions people ask

How many hours should I sleep after a night shift?
Aim for 7 or more hours in every 24. Day sleep is usually lighter and shorter, so this calculator plans about 7 hours straight after the shift and a 90-minute nap before the next one, which together get you past 8.
When should I stop drinking coffee before a night shift sleep?
About 6 hours before you plan to sleep. Half of a dose of caffeine is still in your body 5 to 6 hours later, and a controlled study found caffeine 6 hours before bed cut sleep by more than an hour. On a 7pm to 7am night with a half-hour journey, that means nothing after 2am.
Should I stay up the night before my first night shift?
No. Sleep as normal, lie in if you can, and take a long nap (about 2 hours) in the afternoon or evening, ending an hour before you leave. Nurses who napped 1.5 to 3 hours before a first night were more alert in its second half.
What should I do after my last night shift?
Sleep about 3 hours in the morning, get up, get some daylight, and go to bed at your normal time that evening. Staying up all day means you are awake far too long; sleeping all day leaves you wide awake at night.
What is anchor sleep?
A block of about 4 hours that you sleep at the same clock time every day, whatever shift you are on. Research in the early 1980s found it keeps body rhythms steady on irregular routines. The calculator looks for a 4-hour block that your sleep on both shifts share, when you are switching between shift types.
Does this work for 12-hour shifts and rotating patterns?
Yes. Enter your real start and finish times (it handles shifts that cross midnight) and say what you worked before and what comes after. The plan changes for the first and last night of a run and warns about backward rotations, such as nights straight into earlies.

Sources

  1. Watson NF et al. Recommended amount of sleep for a healthy adult: a joint consensus statement. Sleep. 2015;38(6):843–844. American Academy of Sleep Medicine and Sleep Research Society, 2015. Adults should sleep 7 or more hours in each 24 hours for good health.
  2. Hints and tips for shift workers. Health and Safety Executive (UK), 2024. Adults need about 7 to 8 hours of sleep a day. Have a short sleep before your first night, and nap briefly then go to bed earlier when you come off nights. Avoid caffeine for a few hours before bed. Keep the light bright at work and the bedroom dark, quiet and cool. Regular light meals are better than one heavy meal, and do not go to bed hungry. If you feel sleepy driving, stop.
  3. Training for nurses on shift work and long work hours, module 9: sleep after a night shift. NIOSH, US Centers for Disease Control and Prevention, 2020. Go straight to bed when you get home from a night shift and sleep as long as you can; the more sleep you get before 2pm the better. Do not use the early morning for chores. Nap before going back to work if you can.
  4. Training for nurses on shift work and long work hours, module 7: naps before a night shift. NIOSH, US Centers for Disease Control and Prevention, 2020. A longer nap before a night shift (studies used 1.5 to 3 hours in the afternoon or evening) reduces the drop in alertness during the night, especially on the first night.
  5. Training for nurses on shift work and long work hours, module 7: nap duration. NIOSH, US Centers for Disease Control and Prevention, 2020. A brief nap of under 20 minutes improves alertness for a few hours with little grogginess. Waking from deep sleep after about an hour can leave you groggy (sleep inertia), so set an alarm.
  6. Training for nurses on shift work and long work hours, module 9: days off and the last night. NIOSH, US Centers for Disease Control and Prevention, 2020. Keep some sleep hours the same in every 24 hours. After your last night shift, do not stay up all day and then go to bed at night: you would be awake far too long.
  7. Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. 2013;9(11):1195–1200. Journal of Clinical Sleep Medicine, 2013. A moderate dose of caffeine taken 6 hours before bed still cut total sleep by more than an hour. The authors support stopping substantial caffeine at least 6 hours before bedtime.
  8. Training for nurses on shift work and long work hours, module 6: caffeine. NIOSH, US Centers for Disease Control and Prevention, 2020. Caffeine has a half-life of 5 to 6 hours, longer in some people. Night workers who use caffeine can have it at the start of the shift but should stop several hours before the shift ends.
  9. Self-help tips to fight tiredness. NHS (UK), 2023. The effects of caffeine can last up to 7 hours. Go to bed and get up at the same times. Eat regular meals every 3 to 4 hours rather than one large meal, and drink water, as mild dehydration makes you tired.
  10. Training for nurses on shift work and long work hours, module 9: light. NIOSH, US Centers for Disease Control and Prevention, 2020. Spend time in bright light during the first half of a night shift and reduce light in the second half. Wear dark glasses on the way home only if someone else is driving, and keep them on until you are in a dark bedroom.
  11. Smith MR, Eastman CI. Shift work: health, performance and safety problems, traditional countermeasures, and innovative management strategies to reduce circadian misalignment. 2012;4:111–132. Nature and Science of Sleep, 2012. Caffeine and naps help but do not fix the mismatch between the body clock and night work. Controlling light does: a little bright light during night work, dark glasses outdoors afterwards, and sleep in the dark.
  12. Anchor sleep as a synchronizer of rhythms on abnormal routines. In: The twenty-four hour workday. 1981:493–516. NIOSH symposium proceedings (Minors DS, Waterhouse JM), 1981. Keeping one 4-hour block of sleep at the same clock time every day (an anchor sleep) kept body rhythms stable on irregular routines, even when the rest of the sleep moved about.
  13. Managing shift work: health and safety guidance (HSG256). Health and Safety Executive (UK), 2006. Forward-rotating patterns (early, then late, then night) are easier on the body clock than backward-rotating ones. Keep shifts to 12 hours at most, limit 12-hour nights to 2 or 3 in a row, and avoid starts before 7am where possible. Under UK working time rules the minimum rest between shifts is 11 hours.