Sleep Calculator
Find the best times to sleep and wake up based on 90-minute sleep cycles.
Adults need 5 to 6 complete 90-minute sleep cycles (7.5 to 9 hours). Waking between cycles reduces grogginess.
Enter your wake-up time below to find your ideal bedtime.
Sleep Cycle Calculator
Average is 10 to 20 minutes
Methodology and sources
Formula or method
The tool works backwards or forwards in 90-minute increments from a user-supplied time. In wake-up mode it subtracts (cycles x 90 + sleep latency) minutes from the target alarm time to produce up to four candidate bedtimes (6, 5, 4, and 3 complete cycles). In bedtime mode it adds the same quantity to the target bedtime to produce four candidate wake-up times. The 90-minute cycle length is a fixed constant; sleep latency (default 15 minutes, adjustable 0 to 60) is added before the first cycle in both directions. No curve-fitting or statistical model is applied; the output is pure arithmetic on those two constants.
Basis and assumptions
- Each sleep cycle is treated as exactly 90 minutes, the widely cited population-average derived from polysomnography research (Walker 2017; National Sleep Foundation).
- Sleep latency defaults to 15 minutes, representing the midpoint of the normal adult onset range of 10 to 20 minutes established in sleep-laboratory studies.
- The tool produces results for 3 to 6 cycles only, corresponding to 4.5 to 9 hours of sleep plus latency, which brackets the NHS and National Sleep Foundation adult recommendations of 7 to 9 hours.
- Cycles are assumed uniform throughout the night. In reality, deep sleep (N3) dominates early cycles and REM dominates later ones; the 90-minute figure is an average across all stages.
- Results flagged as optimal (green) are those of 5 or more cycles (7.5 hours or more), matching the NHS recommendation for adults. The 3- and 4-cycle options are displayed without the optimal marker.
- All arithmetic runs in the browser using the device clock for display formatting only; no date is stored or transmitted.
Key handling decisions
- The 90-minute cycle constant is not user-adjustable. Actual individual cycles range from 70 to 120 minutes; the 90-minute figure is a population midpoint.
- Sleep latency is clamped to the range 0 to 60 minutes client-side (lines 167 to 169) to prevent nonsensical inputs.
- The optimal threshold is hard-coded at 5 or more cycles (line 185: isOptimal = suggestion.cycles >= 5). This is a design decision, not a clinical threshold.
- Bedtimes that fall the following calendar day are not adjusted for AM/PM wrapping in the display; the formatted time is always within the 12-hour clock face shown.
What this tool does not decide
- Whether you have a sleep disorder such as insomnia, sleep apnoea, restless legs syndrome, or narcolepsy. Consult a GP or NHS sleep clinic if you have persistent sleep problems.
- Individual cycle length. Cycles vary from roughly 70 to 120 minutes person to person and night to night; only a sleep-laboratory polysomnography assessment can measure yours.
- Whether a given total sleep duration is sufficient for your age, health status, or occupation. The NHS recommends 7 to 9 hours for adults, but individual need varies; a doctor can advise.
- Treatment for any underlying medical condition that affects sleep, including chronic pain, mental health conditions, or medication side effects. These require assessment by a qualified healthcare professional.
Sources
- NHS: How much sleep do I need? (NHS) last accessed 2026-06-17
- National Sleep Foundation: Sleep Duration Recommendations (2015) (National Sleep Foundation) last accessed 2026-06-17
- Carskadon MA, Dement WC. Normal Human Sleep: An Overview. In: Kryger MH et al, eds. Principles and Practice of Sleep Medicine (5th ed). Elsevier, 2011. Chapter 2. (Elsevier)
- Hirshkowitz M et al. National Sleep Foundation's sleep time duration recommendations: methodology and results summary. Sleep Health 2015;1(1):40-43. (Sleep Health / National Sleep Foundation)
- Walker MP. Why We Sleep. Allen Lane, 2017. Chapter 3 (90-minute ultradian rhythm; REM/NREM cycle structure). (Allen Lane / Penguin)
- Harvard Medical School Division of Sleep Medicine: Sleep and Health Education Program (Harvard Medical School) last accessed 2026-06-17
Last checked: 2026-06-17
Why You Wake Up Groggy (Even After 8 Hours)
You set your alarm for 8 hours of sleep. You hit every health guideline. And you still wake up feeling like you've been hit by a bus. Sound familiar?
The problem isn't how long you slept, it's when your alarm went off. Sleep happens in 90-minute cycles. Each cycle moves through light sleep, deep sleep, and REM sleep. Waking up mid-cycle, especially during deep sleep, triggers sleep inertia: that heavy, foggy feeling that can last 30 minutes or more.
This calculator times your sleep to complete full 90-minute cycles so your alarm goes off during light sleep, when waking feels natural. The difference is dramatic, 7.5 hours timed to cycles often feels better than 8 hours that cuts one short.
The 5 Stages of a Sleep Cycle
| Stage | Duration | What Happens | Wake Up Here? |
|---|---|---|---|
| N1 (Light Sleep) | 5 to 10 min | Drifting off, muscles relax, brain slows | Easy, feels natural |
| N2 (Light Sleep) | 20 to 25 min | Heart rate drops, body temperature falls, sleep spindles | Good, alert quickly |
| N3 (Deep Sleep) | 20 to 40 min | Physical repair, growth hormone release, immune boost | Terrible, severe grogginess |
| REM Sleep | 10 to 60 min | Dreaming, memory consolidation, emotional processing | OK, vivid dream recall |
What this means for you: Deep sleep (N3) dominates the first half of the night, while REM dominates the second half. That's why the first 3 to 4 hours of sleep are the most physically restorative, and the last hours are critical for memory and learning. Cutting sleep short from 8 hours to 6 disproportionately reduces REM, which affects mood, creativity, and learning.
How Much Sleep Do You Actually Need?
| Age Group | Recommended | Acceptable Range |
|---|---|---|
| Teens (14 to 17) | 8 to 10 hours | 7 to 11 hours |
| Adults (18 to 64) | 7 to 9 hours | 6 to 10 hours |
| Older adults (65+) | 7 to 8 hours | 5 to 9 hours |
Source: National Sleep Foundation (2015). The "acceptable range" accounts for individual variation, a small percentage of people genuinely function well on 6 hours due to a genetic variant (DEC2 gene). But less than 1% of the population actually has this variant. If you think you're one of them, you're almost certainly wrong.
10 Evidence-Based Sleep Tips
Keep a consistent schedule
Same bedtime and wake time every day, including weekends. Your circadian rhythm craves regularity.
Cool your bedroom to 18 to 20°C
Core body temperature needs to drop 1°C to initiate sleep. A cool room accelerates this.
Stop screens 60 minutes before bed
Blue light suppresses melatonin production by up to 50%. Use night mode as a minimum.
No caffeine after 2pm
Caffeine has a half-life of 5 to 7 hours. A 3pm coffee still has 50% of its caffeine in your system at 9pm.
Limit alcohol before bed
Alcohol helps you fall asleep faster but fragments sleep and reduces REM by up to 20%.
Exercise regularly, but not late
30+ minutes of exercise improves deep sleep by 20 to 30%. But high-intensity exercise within 2 hours of bed can delay sleep onset.
Get morning sunlight
10 to 30 minutes of bright light in the morning resets your circadian clock and improves evening melatonin production.
Make your bedroom dark
Even dim light (a phone charging LED) can suppress melatonin. Use blackout curtains and cover electronics.
Don't lie awake stressing
If you can't sleep after 20 minutes, get up, go to another room, and do something boring until you feel sleepy. Staying in bed trains your brain to associate bed with wakefulness.
Limit naps to 20 minutes
Short naps boost alertness without entering deep sleep. Longer naps cause grogginess and can interfere with nighttime sleep.
Related Health Tools
How to use this tool
Choose your mode: bedtime or wake-up time
Enter your target time
Optionally adjust the time it takes you to fall asleep
Common uses
- Finding the ideal bedtime based on your wake-up alarm
- Waking up between sleep cycles to feel less groggy
- Planning naps that align with natural 90-minute cycles
- Adjusting sleep schedules for shift work or jet lag
- Understanding how many full sleep cycles you need per night
Share this tool
Frequently Asked Questions
How many sleep cycles do I need?
Why do I wake up tired even after 8 hours?
How long does it take to fall asleep?
What time should I go to bed?
Is it better to sleep 6 hours or 7.5 hours?
What happens during each sleep cycle stage?
Does blue light really affect sleep?
Are naps good or bad for nighttime sleep?
Does alcohol help you sleep?
What is the best room temperature for sleep?
Can you catch up on lost sleep at weekends?
When should I see a doctor about sleep problems?
Results are for general informational purposes only and should be checked before use. They are not professional advice. See our Disclaimer and Terms of Service.