Shift Worker & Night-Shift Anchor Sleep, Melatonin & Circadian Transition Calculator

Compute daytime core sleep block, pre-shift power nap, and caffeine cutoff for night/rotating shifts.

Daytime Anchor Sleep Wake-Up Alarm 2:00 PM
Daytime Core Sleep Start (Blackout) 7:45 AM
Last On-Shift Caffeine Cutoff 2:00 AM
Pre-Shift Prophylactic Nap Duration 90 min
Inputs
Try:
hr (24h)
Hour your night or rotating shift ends (e.g., 7.0 = 7:00 AM).
min
Minutes from shift end until you are in a darkened bedroom ready to sleep.
cycles
Complete 90-minute cycles in your main daytime sleep block (4 cycles = 6.0 hrs + 1.5 hr pre-shift nap).
Results & Graph
Daytime Anchor Sleep Wake-Up Alarm
2:00 PM
Daytime Core Sleep Start (Blackout)
7:45 AM
Last On-Shift Caffeine Cutoff
2:00 AM
Pre-Shift Prophylactic Nap Duration
90 min

Daytime Anchor Sleep Wake-Up Alarm

Graph 1 • 90-Minute Cycle Alarm Options & 5-Cycle N3/REM Hypnogram Aligns your bedtime and alarm with the end of a 90-minute cycle so you wake from light/REM sleep instead of deep N3 sleep.
90-Minute Ultradian Sleep Cycle Options & N1/N2/N3/REM Hypnogram 6 CYCLES • 9.0 HRS (RECOVERY) 7:45 AM Max HGH & athletic repair 🌟 PRIMARY TARGET (100 A+) 2:00 PM Daytime Anchor Sleep Wake-Up A 4 CYCLES • 6.0 HRS (MINIMUM) 2:00 AM Pre-Shift Prophyla: 90 min 5-Cycle Sleep Architecture (N3 Deep Slow-Wave Peaks Early → REM Dream Peaks Before Dawn) Cycle 1 (1.5h)Cycle 2 (3.0h)Cycle 3 (4.5h)Cycle 4 (6.0h)Cycle 5 (7.5h)
Graph 2 • Sleep Score (0–100) & REM Consolidation by Cycle Count Compares 5-cycle (7.5h) and 6-cycle (9.0h) optimal sleep against 4-cycle and mid-cycle interruption.
0 pts 55.00 pts 110.0 pts --- REM Memory % 73 4 Cyc (6h) 100 5 Cyc (7.5h) 100 6 Cyc (9h) 45 3 Cyc (4.5h) 52 Mid-Cycle
Graph 3 • National Sleep Foundation Recommended Hours Across Lifespan Benchmarks recommended total daily sleep from infancy and childhood through adulthood.
0h 7.43h 14.85h 13.50 Infant 12.50 Toddler 10 Child 6-12 9 Teen 14-17 7.50 Adult 18-64 7.50 Senior 65+
Summary: After a 7:00 AM shift end, start dark-room core sleep at 7:45 AM and wake at 2:00 PM (4 cycles = 6.0h); stop shift caffeine by 2:00 AM.
Summary: After a 7:00 AM shift end, start dark-room core sleep at 7:45 AM and wake at 2:00 PM (4 cycles = 6.0h); stop shift caffeine by 2:00 AM.
Interactive chart & math engine powered by CalculatorGraph

Formula: Shift Worker Sleep Planner Formula

DayCoreSleepStart = ShiftEndHour + CommuteWindDownHrs
WakeAlarm = SleepStart + Cycles × 1.5 h + 15 min to fall asleep
LastShiftCaffeine = ShiftEndHour − 5 hrs
DayCoreSleepStart = ShiftEndHour + CommuteWindDownHrs; WakeAlarm = SleepStart + Cycles × 1.5 h + 15 min to fall asleep; LastShiftCaffeine = ShiftEndHour − 5 hrs
  • shiftEndHour24: Hour your night or rotating shift ends (e.g., 7.0 = 7:00 AM).
  • commuteAndWindDownMinutes: Minutes from shift end until you are in a darkened bedroom ready to sleep.
  • coreSleepCycles: Complete 90-minute cycles in your main daytime sleep block (4 cycles = 6.0 hrs + 1.5 hr pre-shift nap).

Rounding: Time-of-day outputs format to 12-hour AM/PM clock notation; countdown intervals report exact integer days, weeks, and hours.

Frequently Asked Questions

Why does the alarm come out 15 minutes later than my own calculation?

The formula adds a fixed quarter of an hour for falling asleep, and the page lists it. Lights out at 7:45 AM plus 4 cycles of 90 minutes would be 1:45 PM, but the alarm shows 2:00 PM because of that allowance. If you take longer to drop off, add the extra time to the commute and wind-down field.

How do I enter a shift that ends at 6:30 or 6:45 in the morning?

Use decimal hours on a 24-hour clock. 6:30 AM is 6.5 and 6:45 AM is 6.75, while 6:15 AM is 6.25. Entering 6.5 with the default settings gives lights out at 7:15 AM, an alarm at 1:30 PM and a caffeine cutoff at 1:30 AM.

Does the planner work for an evening shift that ends before midnight?

Yes. The clock wraps across midnight correctly. A shift ending at 23 with 90 minutes to settle gives a sleep start of 12:30 AM and an alarm at 6:45 AM, with caffeine stopped by 6:00 PM. The labels say daytime, but the arithmetic works at any hour.

What happens if I enter 2 or 4.5 cycles?

The tool shows a message asking for a whole number of 90-minute cycles from 3 to 6, and gives no plan until you fix it. Whole cycles keep the alarm at the end of a cycle. With a 7:00 AM finish and 45 minutes to wind down, 3 cycles wakes you at 12:30 PM and 6 cycles at 5:00 PM.

When exactly should I take the 90 minute nap?

The calculator does not say. It shows a nap length of 90 min in every result but never asks when your next shift starts, so it cannot place the nap. Count back from the time you must leave for work, leaving room to fall asleep and to wake up properly before driving.

Is the 5 hour caffeine rule right for everyone?

It is a fixed planning rule in this tool, not a measurement of you. People process caffeine at different speeds and drinks vary in strength. If you still feel alert at lights out, move your own cutoff earlier. Anyone with a medical condition or medication that interacts with caffeine should ask a doctor or pharmacist.

Why does a longer commute not change the caffeine cutoff?

The cutoff is calculated as shift end minus 5 hours, so it is tied only to when you stop work. A longer commute pushes lights out and the alarm later but leaves the cutoff where it was. On the default, the gap between last caffeine and lights out is already five and three quarter hours.

Can I enter 0 minutes for the commute and wind-down?

Yes. The field takes 0 minutes up to four hours and uses the value exactly. With 0, the default plan puts lights out at 7:00 AM and the alarm at 1:15 PM. Few people are really asleep within minutes of leaving work, though, so an honest estimate of your journey and routine gives a more useful plan.

Can this tell me how to switch back to sleeping at night?

No. It plans one sleep period after one shift, using your finish time, wind-down time and cycle count. It does not model a rotating roster, rest days or the days needed to readjust. For changing schedules, or ongoing trouble sleeping, an occupational health team or doctor can give advice that fits you.

What happens if I enter a shift end of 25 by mistake?

The tool refuses it and asks for a 24-hour time from 0 to 23.99, reminding you that 7.5 means 7:30 AM. Negative values are rejected the same way. A shift that ends at midnight should be entered as 0, which gives lights out at 12:45 AM and an alarm at 7:00 AM on the default settings.

Are the times exact enough to set my phone alarm by?

They are estimates built on a tidy 90-minute cycle and a 15-minute sleep allowance. Real cycles vary in length from person to person and night to night. Set the alarm the planner gives, note how you feel on waking for a few days, and nudge the wind-down field until the timing feels right. Waking groggy every time is a sign the alarm is landing mid-cycle.

A 7:00 AM finish turned into a 2:00 PM alarm

Start with the defaults, because they describe a very common pattern: a night shift that ends at 7:00 AM, 45 minutes to get home and settle, and a main daytime sleep of 4 cycles. The planner answers with a wake-up alarm of 2:00 PM. Underneath it, the core sleep start is 7:45 AM, the last on-shift caffeine is 2:00 AM, and a 90 min pre-shift nap is suggested.

Those four numbers are a schedule, not a diagnosis. The tool takes your shift end, adds your commute and wind-down time to get a lights-out time, then counts forward in 90-minute cycles to an alarm. Separately, it counts back 5 hours from the end of the shift to give a caffeine cutoff.

Read the result as a starting plan for a working week. Sleep cycles in real people are not exactly 90 minutes long, and the time it takes you to fall asleep after a bright, busy shift varies from day to day. The value of the plan is that it gives you a fixed anchor to protect, so the rest of the day can be arranged around it.

Where the extra 15 minutes in the alarm comes from

If you check the arithmetic on the default you may spot something. Four cycles of 90 minutes is 6.0 hours. Lights out at 7:45 AM plus 6.0 hours would be 1:45 PM, yet the alarm says 2:00 PM.

The difference is a built-in 15-minute allowance for falling asleep. The formula on the page spells it out: the alarm is the sleep start plus the cycles plus 15 minutes, on the idea that you are not asleep the moment your head touches the pillow. If your own sum leaves it out, the result looks a quarter of an hour late when it is simply assuming a short sleep latency.

If you usually lie awake much longer than that after a night shift, the alarm will tend to land in the middle of a cycle rather than at the end of one. The simplest fix is to fold the extra time into the commute and wind-down field. Someone who reliably needs half an hour longer to drop off can add 30 minutes there, and both the blackout time and the alarm move later by that amount.

Typing decimal hours and shifts that end near midnight

The shift end field takes a 24-hour clock written as a decimal. That trips people up more than any other input. 7.0 means 7:00 AM. 6.5 means 6:30 AM, not 6:50. A quarter past is .25 and a quarter to is .75, so 23.75 is 11:45 PM.

We ran 6.5 to check: lights out moves to 7:15 AM, the alarm to 1:30 PM, and the caffeine cutoff to 1:30 AM. Everything shifts by the same half hour, which is what you would expect.

The planner also wraps correctly past midnight in both directions. An evening shift ending at 23 with a 90-minute commute and wind-down gives a sleep start of 12:30 AM, an alarm of 6:45 AM and a caffeine cutoff of 6:00 PM. A finish of 23.75 with 30 minutes to settle gives 12:15 AM to 6:30 AM, with caffeine stopped at 6:45 PM. A shift ending at exactly 0 (midnight) gives 12:45 AM to 7:00 AM.

The field only accepts a real clock time. Anything from 0 up to 23.99 works; typing 25 or a negative number returns a message asking for a 24-hour time in that range, with the reminder that 7.5 means 7:30 AM. If you finish at midnight, enter 0 rather than 24.

Choosing between 3, 4, 5 and 6 cycles of daytime sleep

The cycles field is where most of the real decision sits. The default of 4 cycles is a deliberately short main sleep, designed to be topped up by the 90-minute nap before the next shift. Together that is 7.5 hours across the day, split into two blocks.

Moving the field changes only the alarm. With a 7:00 AM finish and 45 minutes to wind down, 3 cycles wakes you at 12:30 PM, 5 cycles at 3:30 PM, and 6 cycles at 5:00 PM. The blackout time and the caffeine cutoff stay where they were, because neither depends on how long you sleep.

The engine accepts whole cycles from 3 to 6 only. A value such as 4.4, 2 or 8 is not quietly adjusted; the tool asks you to choose a whole number of 90-minute cycles in that range. That keeps the alarm on the end of a cycle, which is the whole point of the method.

Which number suits you depends on what the rest of your day has to hold. A run of consecutive nights with no daytime commitments may allow 5 cycles in one block. A day with a school run or an appointment in the afternoon may force 3 or 4 plus a nap. The planner does not know about those commitments, so try a few values and see which alarm time you could actually keep.

The caffeine cutoff counts back from shift end, not from bedtime

The caffeine line is the simplest rule in the tool: shift end minus 5 hours. With the default 7:00 AM finish that is 2:00 AM. With a 4:00 AM finish it becomes 11:00 PM, and with an 11:00 AM finish it is 6:00 AM.

Because the rule is tied to when the shift ends, your commute adds to the gap. On the default, the last coffee at 2:00 AM is five and three quarter hours before lights out at 7:45 AM. With a longer journey, the gap grows further, since the cutoff does not move while the sleep start does.

The fixed 5 hours is a planning rule built into this calculator, not a personal measurement. People clear caffeine at different speeds, and the strength of a drink varies a lot. If you still feel wired at lights out on the default plan, the honest response is to move your own cutoff earlier rather than trust the line on the screen. If you take medication or have a health condition that affects how you handle caffeine, a doctor or pharmacist is the right person to ask.

What the 90 min pre-shift nap line is, and what it is not

Every result shows a pre-shift prophylactic nap duration of 90 min. We tried early and late finishes, short and long commutes, and every cycle count from 3 to 6. The figure never changed. It is a fixed recommendation of one full cycle, not something the tool works out from your inputs.

It also does not tell you when to take that nap. The timing depends on when your next shift starts, and the planner never asks for that. In practice you would count back from the time you need to leave for work: one cycle, a little time to fall asleep, and enough time after waking to shake off grogginess before you drive.

The full title of the page mentions melatonin and circadian transition, and the intent mentions a sunglasses and blackout window. None of the outputs addresses melatonin supplements, light exposure or how to rotate between day and night schedules. The blackout time it does give is simply the moment you should be in a dark room. Treat anything beyond the four printed lines as outside what this calculator covers.

Getting the commute and wind-down field right

This field is meant to capture everything between leaving work and lying down in the dark: the drive or train, a shower, food, a few minutes with family. Most people underestimate it the first time.

Each extra minute here moves both the blackout time and the alarm later by the same amount. Doubling it from 45 to 90 minutes on the default pushes lights out to 8:30 AM and the alarm to 2:45 PM. The caffeine cutoff stays at 2:00 AM.

The field takes anything from 0 minutes up to four hours and uses it exactly as entered. Typing 0 puts lights out at 7:00 AM on the default, with the alarm at 1:15 PM; typing 10 gives 7:10 AM and 1:25 PM. At the top of the range, four hours means lights out at 11:00 AM and an alarm at 5:15 PM. Remember that the 15 minutes for falling asleep is already added to the alarm, so do not add it again here.

A useful habit is to time the wind-down for a week and enter your real average. If your evenings vary a lot, use the longer figure. An alarm that falls slightly late in a cycle is usually easier to live with than lights out that keeps slipping past the planned time.

Using the plan across a run of nights and on days off

The calculator plans one sleep period after one shift. A real roster is a sequence, and the planner has no idea how many nights you are working in a row or when you switch back to days.

One practical approach is to run it once for your standard finish and keep that anchor fixed for the whole block of nights, then run it again with any different finish times. The Lower and Higher examples on this page show how much the plan moves: a 4:00 AM finish gives 4:45 AM to 11:00 AM, while an 11:00 AM finish gives 11:45 AM to 6:00 PM.

The tool says nothing about how to change back to a daytime routine, how many days that takes, or what to do on rest days. For those questions, and for persistent problems such as sleeping badly despite a good plan, feeling unsafe driving home, or symptoms that worry you, talk to an occupational health service or a doctor. The numbers here are estimates based on a neat 90-minute cycle, and your body is under no obligation to follow them.