Skip to main content

    Sleep Calculator

    Find the best times to sleep and wake up based on 90-minute sleep cycles.

    Free to use. Runs in your browser.

    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

    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

    StageDurationWhat HappensWake Up Here?
    N1 (Light Sleep)5 to 10 minDrifting off, muscles relax, brain slowsEasy, feels natural
    N2 (Light Sleep)20 to 25 minHeart rate drops, body temperature falls, sleep spindlesGood, alert quickly
    N3 (Deep Sleep)20 to 40 minPhysical repair, growth hormone release, immune boostTerrible, severe grogginess
    REM Sleep10 to 60 minDreaming, memory consolidation, emotional processingOK, 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 GroupRecommendedAcceptable Range
    Teens (14 to 17)8 to 10 hours7 to 11 hours
    Adults (18 to 64)7 to 9 hours6 to 10 hours
    Older adults (65+)7 to 8 hours5 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

    1

    Choose your mode: bedtime or wake-up time

    2

    Enter your target time

    3

    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?
    Most adults need 5 to 6 complete sleep cycles per night (7.5 to 9 hours). Each cycle lasts approximately 90 minutes and moves through light sleep, deep sleep, and REM sleep. Fewer than 4 cycles consistently leads to cognitive impairment.
    Why do I wake up tired even after 8 hours?
    You're almost certainly waking mid-cycle, probably during deep sleep (N3 stage). Waking during deep sleep triggers sleep inertia: that heavy, foggy feeling that can last 30+ minutes. Timing your alarm to complete a full 90-minute cycle fixes this.
    How long does it take to fall asleep?
    The average adult takes 10 to 20 minutes. This calculator defaults to 15 minutes. If you regularly fall asleep in under 5 minutes, that's actually a sign of sleep deprivation, not good sleep ability. Adjust the latency field to match your experience.
    What time should I go to bed?
    Use the 'I need to wake up at' mode and enter your alarm time. The calculator works backwards through 90-minute cycles to find optimal bedtimes. For a 7am alarm with the default 15-minute sleep latency, ideal bedtimes would be 9:45pm (6 cycles), 11:15pm (5 cycles), or 12:45am (4 cycles).
    Is it better to sleep 6 hours or 7.5 hours?
    7.5 hours (5 cycles) is better for most people. However, 6 hours ending at a cycle boundary genuinely feels more refreshing than 7 hours that interrupts a cycle mid-way. The key is completing whole cycles, not hitting a specific hour count.
    What happens during each sleep cycle stage?
    Each 90-minute cycle has 4 stages. N1 (light sleep, 5 to 10 min): drifting off. N2 (light sleep, 20 to 25 min): heart rate drops, sleep spindles form. N3 (deep sleep, 20 to 40 min): physical repair, growth hormone release. REM (10 to 60 min): dreaming, memory consolidation. Deep sleep dominates early cycles; REM dominates later ones.
    Does blue light really affect sleep?
    Yes. Blue light (440 to 490nm wavelength) suppresses melatonin production by up to 50%, according to Harvard research. Melatonin signals your brain that it's time to sleep. Stop screens 60 minutes before bed, or use night mode as a minimum. Blue light glasses help but aren't as effective as avoiding screens entirely.
    Are naps good or bad for nighttime sleep?
    Short naps (20 minutes or less) boost alertness without entering deep sleep and don't affect nighttime sleep for most people. Naps longer than 30 minutes risk entering deep sleep, causing grogginess when you wake and potentially making it harder to fall asleep at night. If you nap, do it before 3pm.
    Does alcohol help you sleep?
    Alcohol helps you fall asleep faster but wrecks sleep quality. It suppresses REM sleep by up to 20%, fragments the second half of the night, and worsens snoring and sleep apnoea. A nightcap might knock you out, but you'll wake up less rested than if you'd skipped it.
    What is the best room temperature for sleep?
    18 to 20°C (65 to 68°F). Your core body temperature needs to drop about 1°C to initiate sleep. A cool room accelerates this process. Too warm and you'll toss and turn; too cold and you'll wake up. The National Sleep Foundation recommends 18.3°C as the ideal.
    Can you catch up on lost sleep at weekends?
    Partially. A 2019 study in Current Biology found that weekend recovery sleep doesn't fully reverse the metabolic damage from weekday sleep deprivation. You can recover some cognitive function, but the metabolic effects (insulin sensitivity, weight gain) persist. Consistent sleep is better than binge-recovery.
    When should I see a doctor about sleep problems?
    See a doctor if you regularly take more than 30 minutes to fall asleep, wake up multiple times per night, feel exhausted despite adequate sleep time, snore loudly or stop breathing during sleep (ask your partner), or have persistent daytime sleepiness that affects work or driving.

    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.