Sleep Calculator

What time should you go to sleep to wake up refreshed?

Sleep happens in 90-minute cycles. Waking at the end of a cycle instead of the middle leaves you alert instead of groggy. Enter your wake-up time or bedtime and this calculator shows you exactly when to aim for — based on your cycle count and how long it takes you to fall asleep.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Most alarm clocks are set for convenience — round numbers like 7:00 or 6:30 — with no regard for what stage of sleep your brain is in when it fires. That is the root cause of morning grogginess. Sleep does not progress linearly from light to deep and stop. It cycles. Across a full night you move through the same sequence four to seven times, each lap taking about 90 minutes.

The stages within each cycle shift as the night goes on. Earlier cycles contain more slow-wave deep sleep, which is when your body does physical repair — tissue growth, immune function, metabolic recovery. Later cycles contain longer stretches of REM sleep, where memory consolidation and emotional processing happen. Cutting the night short by even one cycle means you lose disproportionately more REM, since those stages cluster at the end.

This calculator works backward from your fixed constraint — either a required wake-up time or a planned bedtime — and subtracts the right number of complete 90-minute cycles plus the time it takes you to fall asleep. The result is a target time that positions your alarm at the lightest point in your final cycle. You are not sleeping more; you are sleeping smarter by aligning with what your body is already doing.

When To Use This
Right tool, right situation

Use this calculator when you have a hard wake-up constraint — a work start time, a flight, a school run — and want to know the exact bedtime that avoids mid-cycle alarm disruption. It is also useful when testing whether a new sleep schedule is actually giving you enough full cycles, not just enough total hours.

Use it in reverse when your bedtime is fixed — a social event, a late work finish — and you want to find the best wake-up time that still completes whole cycles. This is common for weekend schedules where waking up at the end of a cycle rather than forcing a weekday time can meaningfully reduce accumulated sleep debt.

Do not use this tool as a substitute for medical assessment of chronic sleep problems. If you consistently cannot fall asleep within 30 minutes, wake frequently, or feel unrefreshed after 8 hours regardless of cycle timing, the issue is not math — it may be sleep apnea, restless legs, circadian rhythm disorder, or another condition where cycle timing is irrelevant. The calculator works best for healthy sleepers fine-tuning an already functional sleep pattern.

Common Mistakes
Why results sometimes look wrong

The most common mistake is confusing time in bed with time asleep. An 8-hour sleep window with a 30-minute onset and a 20-minute mid-night waking produces only about 7 hours of actual sleep — potentially fewer than 5 complete cycles. The calculator addresses onset but cannot account for nighttime awakenings, which is why the result is marked as estimated rather than exact.

A second mistake is treating cycle timing as the only lever. Cycle alignment helps when your sleep quality is already reasonable. If you fall asleep at the right time but your sleep is fragmented by stress, alcohol, late-screen exposure, or a warm room, the cycle math is largely irrelevant — the underlying architecture is already disrupted. The calculator gives you a target, not a guarantee.

A third mistake specific to this tool is using the default onset time without checking whether it applies to you. The 14-minute default is a population average. Night owls trying to sleep earlier than their natural rhythm, people under acute stress, and anyone who has had caffeine after 2 PM often take 30-40 minutes to fall asleep. Entering your actual onset time makes a meaningful difference in the recommended bedtime — a 30-minute onset pushes bedtime 16 minutes earlier compared to the default.

The Math
Worked examples and deeper derivation

The core calculation is simple: bedtime = wake-up time minus (cycles times 90 minutes) minus sleep onset time. For wake-up mode it reverses: wake-up time = bedtime plus onset plus (cycles times 90 minutes).

Sleep onset — the time between lying down and actually falling asleep — is often overlooked. If you budget for 7.5 hours but it takes you 20 minutes to fall asleep, you only complete 4.8 cycles, not 5. The calculator adds onset time to the total so your sleep window accounts for the full duration from lights out to alarm.

The 90-minute cycle constant is an average. If you want to tune it to your biology, a sleep tracking wearable can give you your personal average over a few weeks. Once you have that number, you can mentally adjust the result — if your cycles run 95 minutes, add 5 minutes per cycle to the recommended bedtime. The math is the same; only the constant changes.

Early work start — need to be up at 5:45 AM
Wake-up time 05:45, 5 cycles, 14-minute onset
Bedtime calculates to 10:01 PM. That gives you 7.5 hours of sleep across 5 complete cycles. Waking at the end of the final cycle instead of mid-cycle means your body has finished its last REM phase, so your alarm pulls you out of lighter sleep — the difference between hitting snooze three times and actually getting up.
Night shift worker sleeping during the day
Bedtime mode, target wake-up 03:00 PM, 6 cycles, 10-minute onset (falls asleep quickly in darkness)
Bedtime lands at 4:50 AM. Nine hours of sleep covering 6 cycles suits shift workers who often accumulate sleep debt. The cycle logic works identically regardless of time of day — your brain does not care whether it is midnight or noon, as long as the environment supports sleep.
Parent calculating nap window for themselves
Bedtime at 1:00 PM (nap), wake-up mode, 2 cycles selected — use 4 cycles minimum option as closest proxy, 5-minute onset
A single 90-minute cycle wakes you at 2:35 PM. Two cycles would be 3:05 PM. Naps shorter than 90 minutes often leave you in slow-wave sleep when the alarm fires, which is why a 45-minute nap can feel worse than no nap at all. The 90-minute boundary is the key insight here.
Expert Unlock
The thing most explanations skip

The 90-minute cycle model breaks down at the edges of the night in a specific way: the first cycle is often shorter (70-80 minutes) because sleep pressure is highest and the brain moves rapidly into deep slow-wave sleep. This means the calculator may be slightly off for the first transition but becomes more accurate across cycles 2 through 5. For practical purposes this is a minor correction, but it explains why some people find their first alarm miss feels worse than later ones — they are waking from unusually deep slow-wave sleep, not mid-REM.

Why do I still feel tired if I slept 8 hours?

What is a sleep cycle and why does 90 minutes matter?
A sleep cycle is one complete pass through all stages of sleep — light sleep, deep sleep, and REM. Each full cycle takes roughly 90 minutes for most adults. Waking in the middle of deep sleep or REM triggers sleep inertia, the grogginess that makes the first 20-30 minutes after your alarm feel rough. Timing your wake-up to land at the end of a cycle means your body is already in its lightest stage, so getting up feels significantly easier.
How accurate is the 90-minute sleep cycle length?
The 90-minute figure is a well-established average, but individual cycles range from about 80 to 110 minutes and shift slightly across the night — early cycles lean heavier on deep sleep, later ones on REM. For practical bedtime planning, 90 minutes is reliable enough that most people notice a real difference when they align with it. If the recommended time never feels right, try adjusting by 15 minutes in either direction.
Should I use 5 or 6 sleep cycles?
Five cycles (7.5 hours) works well for most adults and is the lower end of what most sleep research considers adequate for full cognitive recovery. Six cycles (9 hours) is better for people who are sleep-deprived, recovering from illness, or doing heavy physical training. If you consistently need 6 cycles to feel normal, that is your actual baseline — not a sign of laziness.

Need something this doesn't cover?

Suggest a tool — we'll build it →