Skip to main content
CalcMax

Sleep Calculator

Range: 0 – 120

Result

23:15:00

Bedtime for 5 cycles

Bedtime for 6 cycles
21:45:00
Bedtime for 4 cycles
00:45:00
Time asleep (5 cycles)
7 hours 30 minutes
Time in bed (5 cycles)
7 hours 45 minutes

A sleep calculator works backwards from the alarm rather than forwards from bedtime. Enter the wake-up time you are stuck with and roughly how long it takes you to fall asleep, and it returns three bedtimes, each landing you at the end of a whole number of sleep cycles — four, five and six cycles, or 6, 7.5 and 9 hours of sleep. What makes that worth calculating is the middle of a cycle. A sleep cycle moves through lighter and deeper stages and lasts about 90 minutes on average, and being pulled out of the deep part of one is what leaves you groggy after eight hours, while waking at the end of one is what makes a shorter night feel survivable. An alarm you cannot move lands wherever it lands, so the thing you can adjust is bedtime — place it so the alarm falls on a boundary instead of in the middle of a stage. The page also reports the sleep duration and the total time in bed, and the two differ by exactly the minutes you said it takes you to drop off. That gap is the one people forget when they count back from the alarm and end up in bed fifteen minutes short of the sleep they were aiming for. It is arithmetic on an average, not a sleep tracker, and it deliberately declines to judge the answer.

Hours of sleep in 4, 5 and 6 cycles

Sleep cyclesHours of sleep
46
57.5
69

Read this as the lookup behind the three bedtimes above: each cycle is 90 minutes on average, so 4, 5 and 6 cycles are 6, 7.5 and 9 hours of sleep. Those hours are time actually asleep, not time in bed — add your own minutes-to-fall-asleep to get the latter, which is the figure the calculator above already does for you. Two cautions go with the table. The 90 minutes is an average, so the real hours will differ a little from the printed ones, and the difference grows across the night because later cycles run longer. And the 7-to-9-hour advice most adults are given is about time asleep, so the middle row is the one that usually lines up with it; the bottom row is where a bedtime stops being a target and starts being a compromise.

Formula

bedtime = wake-up time − (cycles × 90 minutes) − minutes to fall asleep; sleep duration = cycles × 90 minutes; time in bed = sleep duration + minutes to fall asleep

wake-up time
The time the alarm is set for, or the time you have to be up. This is the fixed end of the calculation — the whole page is arranged backwards from it, because the morning is the part most people cannot move
cycles
How many complete sleep cycles to fit in before the alarm. This page uses 4, 5 and 6, which on a 90-minute cycle is 6, 7.5 and 9 hours of sleep; the middle one is shown as the main result because it lands nearest the 7 to 9 hours most adults are advised to get
90
The average length of one sleep cycle. It is an average and not a constant: cycles early in the night are shorter and those towards morning are longer, which is why a bedtime placed on a boundary is a good aim rather than a guarantee (minutes)
minutes to fall asleep
How long you lie awake before dropping off. It is subtracted along with the cycles because the clock starts at bedtime, not at the moment you fall asleep. Fifteen minutes is the default and is a common figure; if you regularly take much longer than that, the thing to change is not the number in this field (minutes)
sleep duration
The time actually spent asleep, which is the cycles multiplied by 90 minutes. It is not the same as the time you spend in bed, and the difference is the whole reason both are reported (hours)
time in bed
Sleep duration plus the minutes it takes you to fall asleep — the time from getting into bed to the alarm going off. It is the figure to use when you are deciding what time to go upstairs, because you cannot spend the falling-asleep minutes asleep (hours)

Use it when the alarm is fixed and the bedtime is not, which is most weekday evenings. Pick the day you have to be up, type in how long you usually take to drop off, and take the middle bedtime unless you already know you need more sleep than that. On a night when you are going to bed later than the calculation says, read down instead of giving up on the idea: the six-cycle bedtime is 9 hours of sleep, and the four-cycle one is 6, which is a worse night than anyone wants but still better than an alarm in the middle of a stage. Do not use it as a way of deciding how little sleep you can get away with. The page will happily print a bedtime for four cycles, and four cycles is not a recommendation — it is the smallest number the page will do arithmetic on.

Worked examples

  1. Waking at 07:00 and taking 15 minutes to fall asleep

    1. Five cycles is 5 × 90 = 450 minutes, or 7 hours 30 minutes, which is 27000 seconds
    2. Work backwards from 07:00: 07:00 minus 7 hours 30 minutes is 23:30, and 15 minutes to fall asleep puts bedtime at 23:15
    3. Six cycles is 9 hours, so 07:00 minus 9 hours is 22:00, and minus the 15 minutes is 21:45
    4. Four cycles is 6 hours, so 07:00 minus 6 hours is 01:00, and minus the 15 minutes is 00:45 — the only one of the three that falls after midnight
    5. Time in bed is 7 hours 30 minutes plus the 15 minutes, which is 7 hours 45 minutes or 27900 seconds

    The combination the page opens with, and the arithmetic to check any of the others against. Note what the 15 minutes does: it moves all three bedtimes earlier by the same amount and it does not change the sleep duration at all. That is the whole point of keeping the two duration figures separate — the gap between them is the part of the night you are lying awake, and it is the part people leave out when they count backwards from the alarm themselves.

  2. Waking at 06:30 with a slower start

    1. Five cycles is still 27000 seconds of sleep — the cycle count does not change with the alarm
    2. 06:30 minus 7 hours 30 minutes is 23:00
    3. Subtract the 20 minutes to fall asleep and bedtime is 22:40
    4. Six cycles: 06:30 minus 9 hours is 21:30, and minus 20 minutes is 21:10
    5. Four cycles: 06:30 minus 6 hours is 00:30, and minus 20 minutes is 00:10
    6. Time in bed is 27000 + 1200 = 28200 seconds, which is 7 hours 50 minutes

    The case where none of the three answers is a round number, which is what most real bedtimes look like. It also shows that the 20 minutes is subtracted three times, once per option, so it shifts every bedtime rather than only the one you are reading. If you have ever set an alarm, counted back eight hours on your fingers and still felt short the next morning, this is the missing term.

  3. Waking at 09:00 on a day off

    1. Six cycles is 9 hours, and 09:00 minus 9 hours is exactly midnight
    2. Five cycles is 7 hours 30 minutes, so 09:00 minus that is 01:30
    3. Four cycles is 6 hours, so 09:00 minus that is 03:00
    4. With no time to fall asleep, the sleep duration and the time in bed are the same number: 27000 seconds

    The boundary case, and it is included because it is the one an off-by-one lands on. Subtracting 9 hours from 09:00 gives 00:00:00 — midnight, printed as such rather than as 24:00 or as blank. It is also the only combination on the page where time in bed equals sleep duration, so it is the fastest way to check that the two figures are wired to different things. Set the falling-asleep field back to 15 and the middle bedtime moves to 23:45 while the sleep duration stays at 27000, which is the behaviour to expect.

  4. Waking at 06:00

    1. 06:00 minus 7 hours 30 minutes is 22:30
    2. Subtract 15 minutes to fall asleep and the five-cycle bedtime is 22:15
    3. Six cycles: 06:00 minus 9 hours is 21:00, and minus 15 minutes is 20:45
    4. Four cycles: 06:00 minus 6 hours is midnight, and minus 15 minutes is 23:45 — on the previous day, not the same one
    5. Time in bed stays at 27900 seconds, because the alarm did not move

    A bedtime that arrives before the wake-up time but still on the previous evening, which is where this kind of subtraction is easiest to get wrong by hand. All three bedtimes here are on the night before; none of them is 22:15 on the day of the alarm. The four-cycle answer at 23:45 is the one to watch — it is fifteen minutes before midnight, and a page that treated the subtraction as a plain clock difference would print 23:45 the following evening.

Limitations

The whole page rests on one number being a constant when it is not: 90 minutes is the average length of a sleep cycle, and an average is not what any individual cycle does. Cycles early in the night run shorter, cycles towards morning run longer, and the pattern shifts with age — so a bedtime placed exactly on a boundary is a good target rather than a guarantee, and being woken fifteen minutes into a deep stage is still possible from any of the three answers. Second, the minutes-to-fall-asleep figure is one you have to guess at. People are poor at estimating it, and the usual direction of the error is to underestimate, because time spent lying awake before sleep is not remembered well. If you have a watch or a phone that reports it, use that number rather than your impression. Third, this is arithmetic on a schedule and says nothing about sleep quality. It does not know whether you feel rested, whether you wake in the night, whether you snore, or whether you are relying on alcohol or a sleep aid to get to sleep — and none of those are things a bedtime can fix. If you are consistently sleeping the hours this page suggests and still exhausted, or if you regularly take more than half an hour to fall asleep, or if you wake gasping or are told you stop breathing in the night, those are reasons to see a clinician rather than to move your bedtime around. Finally, the calculation assumes the sleep happens in one stretch ending at the alarm. It does not model shift work, split sleep, or a night interrupted by a child, and for those the three bedtimes are still arithmetic but the underlying assumption has stopped holding.

Frequently asked questions

How many sleep cycles should I aim for?
Five is the usual answer and the one this page shows as the main result, because five cycles of 90 minutes is 7 hours 30 minutes and that sits inside the 7 to 9 hours most adults are advised to get. Six cycles is 9 hours and is a reasonable target if you know you need more, or if you are catching up. Four is 6 hours, which is below the recommendation for most adults and is offered here as a floor rather than as a goal — a four-cycle night is better than an alarm in the middle of a deep stage, but it is not a plan to build a week around.
Why 90 minutes and not some other number?
Because 90 minutes is the average length of a sleep cycle in adults, and it is the figure both sources cited on this page give. It is an average over people and over the night, not a fixed property of your own sleep: cycles early in the night tend to be shorter and those towards morning longer, so the last cycle before your alarm is often the longest one. That is why a bedtime placed exactly on a boundary is a good aim rather than a promise, and why the difference between landing on a boundary and landing fifteen minutes past one is smaller in practice than the arithmetic suggests.
Should I count the time it takes me to fall asleep?
Yes, and leaving it out is the most common mistake people make with this kind of calculation. If you need to be up at 07:00 and want 7 hours 30 minutes of sleep, going to bed at 23:30 gives you less than you asked for, because the first fifteen minutes are spent awake. The clock starts when you get into bed. That is why the page asks for the figure separately and reports both the sleep duration and the time in bed — the gap between them is exactly this term. Fifteen minutes is a reasonable default; if you are regularly staring at the ceiling for an hour, changing the number in the field will not help and the thing worth looking at is the routine before bed.
What if I wake up in the middle of the night?
Then the arithmetic on this page is describing a night you did not have. The three bedtimes assume the sleep runs in one stretch from when you drop off to when the alarm goes, and a night broken by waking is not that. Waking briefly between cycles is ordinary and not a problem in itself; waking for long stretches, or waking and being unable to get back to sleep, is a different situation and one that moving your bedtime will not fix. If that pattern is regular, the useful step is to keep a record of when you wake and for how long, and take that to a clinician rather than adjusting the numbers here.
Does this work for a night shift or an early flight?
The arithmetic works for any wake-up time, including one in the middle of the night — enter 02:00 and it will give you bedtimes on the previous evening, which is what you want before an early flight. What it cannot do is decide when your body will actually be ready to sleep. Sleep timing is set by your body clock, and a bedtime that is correct arithmetic but four hours earlier than your usual one will mostly be spent awake. For shift work and for the days after a long flight, treat these bedtimes as the target your body needs to be moved towards over several days, not as a schedule you can adopt in one night.
Is it better to sleep six cycles or five?
More sleep is better if you are getting enough of it, and worse if you are not — which is not a useful answer until you know which situation you are in. For most adults, 7 to 9 hours is the recommended range, so five cycles at 7 hours 30 minutes is comfortably inside it and six cycles at 9 hours is at the top of it. If you are routinely cutting nights short, the six-cycle bedtime is the better habit and the four-cycle one should be the exception. If you are regularly sleeping nine hours and still tired, the answer is not more sleep and the bedtime is not the thing to change.

References

  • Stages of Sleep — Sleep Foundation, updated 25 July 2025 — the source of the two figures this page is built on: that a night contains four to six sleep cycles, and that a cycle averages about 90 minutes
  • What is sleep architecture? — Harvard Health Publishing, 17 March 2026 — describes the four to six cycles of a typical night and gives the same 90-minute average, and notes that the length of each cycle varies rather than being fixed

Related calculators