How sleep cycles actually work
Sleep isn't one long, flat state. Across the night your brain loops through repeating cycles, each lasting roughly 90 minutes on average. Every cycle moves through light sleep (stages N1 and N2), deep slow-wave sleep (N3 β the physically restorative part), and REM sleep, where most vivid dreaming and memory consolidation happen. Early-night cycles are heavy on deep sleep; cycles toward morning are increasingly dominated by REM.
The practical upshot: when you wake matters almost as much as how long you slept. An alarm that fires during deep sleep triggers sleep inertia β that thick-headed, where-am-I grogginess that can drag on for half an hour or more. An alarm that lands near the end of a cycle, when you're already drifting through light sleep, feels dramatically gentler. That's the entire trick behind this calculator: instead of aiming for a round number of hours, aim for a whole number of cycles β 6 cycles (9 h), 5 cycles (7.5 h) or 4 cycles (6 h) β plus the time it takes you to actually fall asleep.
One honest caveat: 90 minutes is a population average. Real cycles run anywhere from about 70 to 120 minutes, vary between people, and even vary across a single night. Treat these times as smart estimates and adjust by feel. If 5 cycles consistently leaves you groggy, your cycles may run long β try shifting your alarm 15β20 minutes later for a week.
Sleep hygiene: the boring stuff that works
- Keep a consistent wake time β even on weekends. Wake time anchors your circadian rhythm more than bedtime does.
- Get bright light within an hour of waking. Ten minutes outside beats an hour of indoor lighting.
- Cut caffeine 8+ hours before bed (use the calculator above for your personal cutoff).
- Cool, dark, quiet room β around 16β19 Β°C (60β67 Β°F) suits most sleepers.
- Dim screens and lights in the last hour. Evening bright light delays melatonin release and pushes your clock later.
- Alcohol fragments the second half of the night. It can knock you out, but it suppresses REM and causes 3 a.m. wake-ups.
- If you can't sleep after ~20 minutes, get up. Do something dull in dim light until sleepy. Beds are for sleeping, not for worrying practice.
- Naps: keep them under 20 minutes and before mid-afternoon so they don't eat your night-time sleep pressure.
Caffeine and your body clock
Caffeine works by blocking adenosine, the molecule that builds up while you're awake and makes you feel sleepy. The catch is its half-life: about 5 hours for the average adult, with a real-world range of roughly 1.5 to 9.5 hours depending on genetics (mainly the CYP1A2 enzyme), oral contraceptives, pregnancy, smoking, and some medications. Half-life math is sneaky β a 200 mg cold brew at 2 p.m. still leaves around 100 mg in your system at 7 p.m. and ~50 mg at midnight. Even when you fall asleep fine, residual caffeine measurably reduces deep slow-wave sleep, which is exactly the stage you can least afford to lose.
Jet lag in one paragraph
Jet lag is a mismatch between your internal clock and the local clock. Your body shifts naturally by only about an hour a day β faster going west (staying up later is easy) than east (forcing yourself earlier is hard). The most powerful lever is timed light: light in your body's morning shifts you earlier; light in your body's evening shifts you later. Get the timing wrong and light pushes you in the opposite direction β which is why the plan above tells you when to avoid light, not just when to seek it. Strategic caffeine, short naps, and eating on the destination schedule all help around the edges.
How to nap without wrecking your night
Naps are a tool, not a cop-out β used well they restore alertness without denting your night, and the length is everything. A short 10β20 minute power nap pulls you out before you sink into deep slow-wave sleep, so you wake clear-headed with a measurable bump in alertness, mood and reaction time. Stretch the nap to 30β60 minutes and you risk waking mid-deep-sleep, triggering the same groggy sleep inertia a badly timed alarm causes. A full 90-minute nap completes one cycle β light sleep, deep sleep and REM β and usually returns you to light sleep by the end, so you wake more easily and gain a creativity and memory boost. Whatever the length, nap early: a nap after about 3 p.m. eats into the sleep pressure you need to fall asleep at night. And try the counter-intuitive coffee nap β drink a coffee, immediately nap 20 minutes, and the caffeine arrives just as you wake. The Nap tab above turns all of this into exact alarm times.
Sleep strategies for shift workers
Shift work asks your body to sleep when its internal clock is screaming "wake" and to work through the 3β5 a.m. circadian low when alertness bottoms out. You cannot fully override biology, but you can blunt the damage. The first lever is darkness: day sleep is lighter and shorter than night sleep, so blackout curtains, a sleep mask and a cool, silent room are necessities, not luxuries. The second is consistency β keeping a similar sleep schedule even on days off helps, though most workers compromise with a partial shift toward normal time. For long or rotating nights, split sleep works well: a core block right after the shift plus a 90-minute nap before the next one. Strategic caffeine early in the shift sharpens you, but cut it off about six hours before your main sleep. Light timing matters as much as on a flight: bright light during the first half of a night shift keeps you alert, while sunglasses on the morning commute stop daylight from yanking your clock back toward a day schedule. If you routinely can't sleep or stay awake, ask a doctor about Shift Work Disorder. The Shift work tab builds a sleep, light and caffeine plan around your exact hours.
More free tools from AppVitamins
LongeviQ
A longevity habit tracker β see how sleep, movement and diet add up for your healthspan.
Healthy Gut
Build gut-friendly habits β your microbiome and your sleep are closely linked.
GLP-1 Companion
Track appetite, energy and side effects day to day on a metabolic-health journey.
Browse the AppVitamins store β β own SleepShift Pro as a one-time purchase, or get the All-Access pass for every app.
Frequently asked questions
How accurate is the 90-minute sleep cycle?
It's a population average, not a law of physics. Individual cycles range from roughly 70 to 120 minutes and lengthen slightly through the night. The calculator is a smart starting point β fine-tune by how you feel on waking over a week or two.
How much sleep do I actually need?
Most adults function best on 7β9 hours (5β6 cycles). Teens need 8β10. A small minority genuinely thrive on less, but far fewer than the number of people who claim to. If you need an alarm and caffeine to function, you're probably under-sleeping.
Is 6 hours of "aligned" sleep better than 8 random hours?
No β total sleep time still matters most. Cycle alignment mainly reduces wake-up grogginess. Use it to pick the best wake point within a healthy duration, not to justify short nights.
Why do I wake up groggy even after a long sleep?
Most likely sleep inertia from waking in deep sleep mid-cycle, but late caffeine, alcohol, an erratic schedule, or untreated sleep apnea can all cause it. If you're always exhausted despite enough hours, mention it to a clinician.
Can I change my chronotype?
You can shift behaviour at the edges β consistent wake times and morning light pull an owl 1β2 hours earlier β but the underlying tendency is substantially genetic. Working with your chronotype usually beats fighting it.
Does melatonin help with jet lag?
Evidence suggests low-dose melatonin taken near the destination bedtime can help resynchronise after eastward travel. Quality and dosing of supplements vary a lot, and it isn't right for everyone β talk to a pharmacist or doctor first.
What's the best nap length?
For most people a 20-minute power nap is the sweet spot β long enough to restore alertness, short enough to avoid deep-sleep grogginess. If you have time and want a memory or creativity boost, a full 90-minute cycle wakes you more cleanly than a 45β60 minute nap. Use the Nap tab to get exact times.
How do night-shift workers sleep better?
Treat day sleep like night sleep: total darkness, cool room, phone silenced. Sleep soon after your shift, or split into a core sleep plus a pre-shift nap. Stop caffeine ~6 hours before bed and wear sunglasses home so morning light doesn't reset your clock. The Shift work tab builds this around your hours.
Is my data stored anywhere?
No. Everything on this page runs locally in your browser. Nothing you enter is uploaded.