Sleep calculator

Pick your wake time and get four bedtimes that land at the end of a sleep cycle, not the middle of one.

What do you know?

Bedtimes for a 7:00 AM alarm

  1. Most sleep inside 7 to 9 h9:45 PM6 cycles, 9 h 0 min
  2. Inside 7 to 9 h11:15 PM5 cycles, 7 h 30 min
  3. Below 7 to 9 h12:45 AM4 cycles, 6 h 0 min
  4. Below 7 to 9 h2:15 AM3 cycles, 4 h 30 min

Adults 18 to 64: 7 to 9 hours (National Sleep Foundation panel, Hirshkowitz et al., 2015). The American Academy of Sleep Medicine puts it at 7 or more and sets no upper limit. That is a population range, not your number. Plenty of people sit inside one and still feel wrecked, and some sit under one and are fine.

This is the spreadsheet that stopped me sleeping through alarms, with the working shown. Give it the time you have to be up and it counts back in sleep cycles to the bedtimes that end one right at the alarm.

I built it because "eight hours" never told me when to turn the light off. The alarm did, once I counted backwards from it.

How the math works

Sleep runs in cycles: light sleep, deep sleep, up into REM, and around again. The calculator takes your wake time, subtracts the minutes it takes you to fall asleep, then subtracts whole cycles. Six cycles, five, four, three. Each answer is a bedtime that ends a cycle right at the alarm, so it lands on a light patch instead of the middle of deep sleep.

The other direction works the same. Give it lights out and it adds the fall-asleep time, then adds cycles, and you get four wake times to choose from.

"I am going to sleep now" is the third mode, for the nights you have already lost the argument. It reads the clock and adds cycles from that moment. No fall-asleep time is added there, because you told me you are asleep now, and the clock starts when you say so.

The two assumptions are the ones I get asked about most, so they are sliders, not settings buried somewhere.

Cycle length is set to 90 minutes. That is an average, not a law. Carskadon and Dement's overview of normal sleep in Principles and Practice of Sleep Medicine puts the first cycle of the night at roughly 70 to 100 minutes and the later ones at roughly 90 to 120, so yours may be 70 or 110 and it changes through the night. The slider goes 80 to 100 because that is the band most people actually sit in.

Time to fall asleep is set to 15 minutes. Roughly 10 to 20 is usual for someone who is not sleep deprived and not lying there wired. If you are out in two, set it to 0. If you are still awake after forty, set it to 40 and read the last section.

The list stops at three cycles. Two cycles is three hours, and I am not going to put a number on the page that makes three hours look like a plan.

What the rows mean

The top row is the most sleep, six cycles, nine hours with the default settings. It used to carry a "Best" badge and I took it off, because none of the three panels I cite say nine hours is best for everyone. Every row now carries a mark instead: inside the recommended range for the age you picked, above it, or below it. Five cycles is seven and a half hours, and on a work night that is the row I use. Four is six hours: a short night with a plan. Three is a bad night with a plan, and knowing the number still beats guessing. Below the range is not a scolding. It is the number you have tonight. The big cell is the most sleep that still sits inside the range for the age you picked. At 65 and over nine hours is above that range, so the big cell is the 7 h 30 min row instead of the top one. When nothing in the list sits inside the range, no row gets the big cell, because I am not going to shout a time I have just marked as outside it.

The age select sits beside the sliders and starts on 18 to 64, so the page still answers before you touch anything. It changes no times at all. Move it and only the marks and the cited line under the list change, because a 15-year-old and a 40-year-old with the same alarm and the same cycle length get the same bedtimes. What differs is how many hours the research says to aim for, and that is a population range rather than your number.

Each row shows the clock time to turn the light off (or to set the alarm, in the other modes), the number of cycles, and the total sleep. The 24-hour toggle switches the display and remembers your choice on this browser; nothing else is stored.

Treat every row as a window, not a target. If it says 10:45 p.m., anything from about 10:30 to 11:00 is the same answer, because your cycles are not exactly 90 minutes and mine are not either. I wrote more about the studies behind the numbers in what time should I go to bed.

When to trust it and when not to

Trust it when your problem is that you go to bed at random times, or that the alarm keeps landing in deep sleep and you wake up thick and slow. That was my problem for most of my twenties, and counting cycles fixed it. Pick a row you can keep most nights and give it two weeks before you judge it.

Trust it less after a long flight, or on a rotating shift, or when the clocks change. Your body clock is somewhere else and the arithmetic does not know that. It still gives you a sane bedtime, but expect a rougher week than the rows suggest. Waffles, for what it is worth, ignores the clocks changing and wakes me at 5:40 either way.

Do not use it instead of a doctor. If you lie awake for an hour most nights, if you wake at 3 a.m. and cannot get back to sleep for weeks on end, if you snore hard enough to wake yourself, or if nine hours in bed still leaves you exhausted, those are not arithmetic problems. They may be insomnia or sleep apnea, and a calculator cannot see either. I am not a doctor, and I would rather say so twice than have you rearrange your evenings around the wrong number.

Questions I get about this

How many sleep cycles do I need?
Five or six. Five cycles of roughly 90 minutes is seven and a half hours, six is nine, and both sit inside the 7 to 9 hours the National Sleep Foundation panel recommends for adults (Hirshkowitz et al., Sleep Health, 2015). Four cycles is six hours, which that panel lists as possibly acceptable for some adults, not as a target.
Why does the calculator use 90 minutes?
Because it is the middle of the range. Carskadon and Dement's overview of normal sleep in Principles and Practice of Sleep Medicine puts the first cycle of the night at roughly 70 to 100 minutes and later cycles at roughly 90 to 120. Ninety is a fair average for arithmetic. If you know yours runs short or long, the slider goes from 80 to 100.
What if I wake up before the alarm?
If you wake a few minutes early and feel fine, you probably ended a cycle on your own; get up. If you wake an hour early and feel wrecked, try the next bedtime up the list or a shorter cycle length. Waking early most nights for weeks is a question for a doctor, not a calculator.
Is 6 hours of sleep enough?
For most adults, no, not as a habit. The National Sleep Foundation panel put 6 hours at the edge of what may be appropriate for some people and recommended 7 to 9. The four-cycle row is on the list because some nights that is the best you can do, not because I think it is enough.
Does the calculator work for naps?
Not well. A nap has different arithmetic: a 20 minute nap stays in light sleep on purpose, and a 90 minute nap is one full cycle. That is what the nap calculator is for now. It sets the alarm for a 20, 60 or 90 minute nap, adds about 10 minutes to fall asleep, and tells you when a nap ends too close to bedtime.
How much sleep do I need for my age?
Teenagers 13 to 17, 8 to 10 hours per 24 hours. Adults 18 to 64, 7 to 9 hours. Adults 65 and over, 7 to 8 hours. The teen figure is the American Academy of Sleep Medicine (Paruthi et al., 2016). The adult figure is the National Sleep Foundation panel (Hirshkowitz et al., Sleep Health, 2015), and the 7 to 8 for 65 and over is that same panel and the CDC. The panels do not line up at the edges: the AASM runs its teen band 13 to 18 where the CDC runs it 13 to 17, and the AASM's adult statement is 7 or more hours with no upper limit while the other two give a range. Under 13 is a different question, because the recommendation there is hours per 24 hours including naps and this calculator counts night cycles. For a child, use the kids sleep calculator at /tools/kids-sleep-calculator, which takes the naps off for you. All of these are population ranges, not your personal number.
Does sleep need change with gender or weight?
No, not in a way any of the panels put a number on. The National Sleep Foundation, the American Academy of Sleep Medicine and the CDC all break their recommendations down by age and nothing else. People really do differ in how much sleep they need, but the difference is individual rather than something you can read off a category, so a calculator that asks your gender or your weight and then hands back a different bedtime is making that number up. That is why this one does not ask.
Can I see the times in 24-hour or military time?
Yes. The toggle next to the results heading switches the times in the results to the 24-hour clock, so 9:45 PM becomes 21:45. It remembers your choice on this browser and nothing else is stored.

Everything on Sleep calculator

What to sleep on

Guides to pillows, built from the manufacturers' own specifications and the arithmetic this site runs on. Nobody here has slept on these.

Other tools