Sleep Cycle Calculator

Pick a wake-up time and get the best bedtimes, or pick a bedtime and see when you will naturally surface. Based on 90-minute sleep cycles.

Everything runs locally in your browser. Your times never leave your device.

Times use the 24-hour clock — 22:30 means 10:30 PM.

Your sleep plan

For general information — not medical advice.

How It Works

Sleep is not one flat block: it runs in repeating cycles of roughly 90 minutes. This planner counts in whole cycles either backwards from your alarm or forwards from your bedtime, and adds an average 15 minutes of time-to-fall-asleep on the bedtime side, so the plan targets waking at the end of a cycle rather than in the middle of one.

Cycle structure
One full cycle — light NREM sleep, deep slow-wave sleep, then REM dream sleep — averages about 90 minutes in adults, and a normal night strings four to six of them together.
Why count back from your alarm
A fixed alarm is the harder number to move, so the planner subtracts whole cycles (cycles × 90 minutes) from it, plus about 15 minutes — the population-average time it takes to actually fall asleep. Going to bed at the result means your last cycle finishes close to the alarm.
The 4–6 cycle sweet spot
Four to six cycles is 6 to 9 hours of sleep. Five and six cycles (7.5–9 hours) are marked as recommended because they match the 7+ hours adult guidelines call for; three cycles (4.5 hours) is shown only as an emergency floor, not a habit.
Waking mid-cycle
If the alarm lands in deep NREM — mid-cycle — you surface with strong sleep inertia, the heavy, disoriented feeling that can linger well beyond the roughly 15–30 minutes it usually takes to shake off. Ending on the light stage at a cycle boundary is what makes this planner worth using.
Your cycles may not be 90 minutes
Measured cycle length varies between people — and within one night — from about 80 to 110 minutes. If a plan consistently leaves you groggy, shift bedtime by 10–20 minutes and treat your own experience, not the grid, as the final judge.

Frequently Asked Questions

Is the 90-minute sleep cycle exact?

No — 90 minutes is a population average. In practice individual cycles typically run between about 80 and 110 minutes, and the first cycles of the night are shorter and deeper while the later ones carry more REM. Use 90 minutes as the starting grid, then fine-tune: if you keep waking groggy at the planned time, shift your bedtime by 15–20 minutes and see what a couple of weeks of real-world results say.

Can this calculator fix my insomnia?

No — it is a scheduling aid, not a treatment. Going to bed at a consistent, cycle-aware time helps some people fall asleep faster and wake more easily, but insomnia has many causes (stress, light, caffeine, medical conditions) and persistent insomnia is treatable — cognitive behavioural therapy for insomnia (CBT-I) is the first-line recommendation in most guidelines. Talk to a healthcare provider if sleep problems last for weeks or affect your days.

What about naps?

Two nap lengths fit the cycle logic: about 20 minutes, which keeps you in light sleep and avoids waking from deep sleep, or a full ~90-minute cycle if you have the time. Anything in between — 40–70 minutes — is the most likely to leave you groggy, and long or late naps can eat into your night sleep.

What happens when the plan crosses midnight?

It is handled correctly. Bedtimes and wake times are computed modulo 24 hours, so an alarm at 06:00 can give a bedtime of 23:15 the previous evening, and a 23:00 bedtime can give a 05:30 wake-up. Only the clock time is shown — the plan is assumed to start on the evening of your chosen day.

Is anything uploaded to a server?

No. The whole tool is a few lines of vanilla JavaScript running in your browser. Your times never leave your device, and there is no account, no tracking and no network request attached to a calculation.