How to use the sleep calculator
- Choose your age group. The calculator marks which times give the amount of sleep the CDC recommends for that age.
- To plan tonight around an alarm, enter your wake-up time in the first calculator, or tap one of the common times. It lists bedtimes for 6, 5, 4 and 3 sleep cycles.
- If you are going to bed now, press Going to bed now in the second calculator. It lists wake-up times at the end of 3 to 6 cycles, each with a link to set an alarm.
- To check a plan you already have, enter a bedtime and an alarm time in the third calculator. It tells you how much sleep that is and whether the alarm lands mid-cycle.
The settings are saved on this device, and every time you enter is kept in the page address, so a bookmark brings the same plan back.
How sleep cycles work
Through the night, sleep moves in cycles: light sleep, then deep sleep, then REM sleep, the stage when most dreaming happens. A cycle lasts about 90 minutes on average, and a night holds about 4 to 6 of them, according to the StatPearls review of sleep stages in the National Library of Medicine. The first REM period usually starts about 90 minutes after you fall asleep, says the NICHD.
An alarm in the middle of deep sleep is the one that leaves you groggy. Counting whole cycles from the moment you fall asleep puts the alarm near the end of a cycle, when sleep is lighter. That is why the calculator adds the time you take to fall asleep: with 15 minutes to drift off, a 7:00 AM alarm after five cycles means getting into bed at 11:15 PM, not 11:30 PM.
How much sleep you need
Timing matters less than getting enough sleep. These are the CDC’s recommended hours a day for each age (CDC: About Sleep):
| Age | Hours a day |
|---|---|
| Newborn, 0–3 months | 14–17 |
| Infant, 4–12 months | 12–16, including naps |
| Toddler, 1–2 years | 11–14, including naps |
| Preschool, 3–5 years | 10–13, including naps |
| School age, 6–12 years | 9–12 |
| Teen, 13–17 years | 8–10 |
| Adult, 18–60 years | 7 or more |
| Adult, 61–64 years | 7–9 |
| Adult, 65 years and older | 7–8 |
For an adult, five cycles of 90 minutes is 7 hours 30 minutes, the shortest whole-cycle night that meets the 7-hour mark; four cycles, 6 hours, falls short. Babies and young children are not in the age list above the calculator: their totals include naps and their sleep cycles are shorter, so timing their sleep by adult cycles doesn’t fit. Ask your pediatrician about a child’s sleep.
Time to fall asleep
The calculator assumes 15 minutes to fall asleep. Some people drop off in five minutes and others take half an hour, so set your own number in the settings. If you are not sure, think about the last few nights: the time from lights out to the last moment you remember. Taking a long time to fall asleep night after night is worth mentioning to your doctor; the CDC lists trouble falling asleep among the signs of poor sleep.
Naps
For a nap, the second calculator also shows two wake-up times from the moment you lie down: a short nap of about 20 minutes asleep, and a full cycle. NIOSH, the CDC’s workplace safety institute, notes that waking after about 20 minutes, before deeper sleep, or after about 90 minutes, at the predicted end of a cycle, may leave less grogginess, which may then pass more quickly, within 15 to 30 minutes (NIOSH: nap duration). The same page warns that when you are very short of sleep, you may reach deep sleep sooner, so even a short nap can leave you groggy.
Night shifts and early starts
The cycle arithmetic works the same for daytime sleep. After a night shift, enter the time you need to be up in the afternoon, and the first calculator lists when to lie down, counting back from that time. For an unusually early start, such as a 5:00 AM flight, the second calculator shows how many cycles fit between now and your alarm, so you can choose between a shorter night that ends on a cycle and a longer one that doesn’t. NIOSH notes that sleep after night work is usually shorter and less refreshing than sleep during the normal nighttime hours (NIOSH: Plain Language About Shiftwork), so it is worth keeping the room dark and quiet.
Habits that help
The CDC lists these habits for better sleep (CDC: About Sleep):
- Go to bed and get up at the same time every day.
- Keep your bedroom quiet, relaxing and cool.
- Turn off electronic devices at least 30 minutes before bedtime.
- Avoid large meals and alcohol before bedtime, and caffeine in the afternoon or evening.
- Exercise regularly and keep a healthy diet.
A steady wake-up time is the easiest of these to plan with this page: pick the time you need to be up on weekdays, choose a bedtime from the list that gives you enough sleep, and keep both on the weekend too.
What the calculator can’t know
Every number here is an estimate. Cycles differ between people, from one night to the next and through the night, and 90 minutes is an average, not a rule. Use the times as a starting point: if you keep waking a little before the alarm feeling rested, or the alarm always catches you in deep sleep, adjust the cycle length by 10 minutes and try again. If you regularly have problems sleeping, talk to your healthcare provider.
For the alarm itself, the online alarm clock opens with the time filled in from any wake-up time here. For winding down, the white noise generator has a sleep timer, and the time calculator adds up hours and minutes of any kind.
Privacy
Everything is worked out in your browser. Your times and settings stay on this device and in the page address; nothing is sent to this website.
Frequently asked questions
What time should I go to bed to wake up at 7 AM?
With 90-minute cycles and 15 minutes to fall asleep, bedtimes for a 7:00 AM alarm are 9:45 PM (6 cycles, 9 hours of sleep), 11:15 PM (5 cycles, 7 hours 30 minutes) or 12:45 AM (4 cycles, 6 hours). For most adults, 11:15 PM or earlier gives the 7 or more hours the CDC recommends.
How does the sleep calculator work?
Sleep runs in cycles of light sleep, deep sleep and REM sleep, about 90 minutes each on average. The calculator counts back (or forward) in whole cycles from the time you give, and adds the time it takes you to fall asleep, so the alarm comes near the end of a cycle rather than in the middle of one.
Is it better to wake up at the end of a sleep cycle?
Waking from light sleep usually feels easier than waking from deep sleep. NIOSH, part of the CDC, notes that grogginess on waking may be less after about 20 minutes or about 90 minutes of sleep, when a cycle is predicted to end. Cycles vary in length, so treat the times as a guide, not an exact rule.
How many hours of sleep do I need?
The CDC recommends 7 or more hours a day for adults aged 18 to 60, 7 to 9 hours from 61 to 64, and 7 to 8 hours from 65. Teens aged 13 to 17 need 8 to 10 hours, and children aged 6 to 12 need 9 to 12 hours. Choose your age group and the calculator marks which times give enough sleep.
What if my sleep cycles are not 90 minutes?
Cycles differ from person to person and through the night, and 90 minutes is an average. If you often wake up just before your alarm feeling rested, or the times feel off, change the cycle length in the settings, for example to 100 minutes, and see which times suit you.
How long should a nap be?
A short nap of about 20 minutes, or a full cycle of about 90 minutes, tends to leave less grogginess than waking in between. The calculator shows both wake-up times from the time you lie down, including your time to fall asleep.
Can I set an alarm from the results?
Yes. Each wake-up time has a Set an alarm link that opens the online alarm clock with that time filled in; press Set alarm there and keep the page open. For anything important, set your phone’s alarm too.
Is this medical advice?
No. The calculator helps plan the timing of sleep. If you regularly have trouble sleeping, or feel tired despite sleeping enough, talk to your healthcare provider, as the CDC advises.