Sleep Calculator: What Is Your Best Bedtime?

Use our sleep calculator to find your best bedtime based on age and your desired wake-up time.

A women stretching in bed hugging a pillow to her side with one arm and the other reaching upward.
Leo Medrano

You’ve likely heard that the average person should get at least seven hours of sleep per night. And if you’ve ever woken up feeling foggy and groggy — who hasn’t? — you might have wished you’d gone to bed at “a more reasonable time.”

But sleep isn’t just about a chunk of time spent lights-out. It’s made up of sleep cycles, each with several layered phases. And there’s more to calculating your sleep than just stacking up the snooze hours. The amount of sleep you need is based on your genetics, as well as your age. One helpful way of determining the number of hours you need each night to thrive, is to track your sleep with a sleep diary. Write down the times you go to bed, the times you wake up the following day, and how you feel. The more you can standardize your routines to zero in on the timing that helps you feel most rested, the better you’ll be at calculating your ideal sleep times.

If you know when you need to wake up, we’ve built a sleep calculator table to help you figure out exactly what time you need to go to bed based on the time you need to be up and at it, incorporating the average number of sleep cycles you’d be able to complete.

Sleep calculator

This calculate backtracks from a set wakeup time. Find your desired wake time in the left-most column, and match it with the corresponding time for the number of hours (and approximate number of sleep cycles) you’d like to achieve. The resulting square is your corresponding bedtime. Our sleep time calculator accounts for 15 minutes of sleep latency, also known as the time needed to nod off. Read on to find out what sleep cycles are, their phases, and how many cycles you need.

An image of a sleep calculator chart to help you figure out what time you should go to sleep for your wake up time depending on how many hours your sleep cycle is.
Leo Medrano

Sleep cycles

Critical to understanding sleep is understanding what happens when we sleep: a series of phases of light and deep sleep that comprise a sleep cycle.

What are sleep cycles?

A good night’s rest is about much more than sleeping (mostly) through the night and then waking up, either when the alarm chimes or you naturally rise. Instead, we sleep in a set of cycles.

We experience two types of sleep: rapid eye movement (REM) and non-REM (NREM) sleep. Each sleep cycle has four phases, with NREM occurring in the first three and REM sleep happening in the final sleep stage. Each sleep cycle lasts from 90 to 110 minutes, but the lengths of each phase within the cycle change over the course of the night, with the REM phase increasing in length toward morning or when you normally wake.

NREM 1

This first sleep phase is that in-between time when you’re not really awake but not fully asleep either. NREM 1 lasts around five minutes, give or take a few. And it accounts for about 5% of your slumber.

During NREM 1, your brain slows, with 50% of alpha waves changing to low-amplitude mixed-frequency (LAMF) activity. Your eye movement also slows, and your muscles go into chill mode. But they may twitch. If you’ve ever jolted yourself awake after feeling like you were falling — only to realize you were only “crashing” int your mattress — you were experiencing what’s called a hypnic jerk. These are common during NREM1.

NREM 2

This second phase helps transition your body and brain into a deeper state of sleep. At first, you’ll spend about 25 minutes in this stage, but with each sleep cycle, NREM 2 will increase in length. By morning, it will have accounted for about 50% of your snooze time.

During this phase, your heart rate slows, and your body temp cools. Your brain generates short sequences of brain wave activity called sleep spindles. Although more research is needed, spindles are thought to aid in memory consolidation — the process of taking new information and experiences and sorting what needs to be stored or forgotten. Spindles may also play a role in preventing your external environment — like your frisky cat — from waking you as you transition into even deeper sleep.

NREM 3

If sleep were a pool, NREM 3 would be the deep end. This slumber abyss initially lasts up to about 50 minutes but lessens with subsequent sleep cycles toward morning. NREM3 makes up about 15% to 20% of your total sleep time.

During this phase, your heart and breath rates are at their slowest. Your brain then engages in slow-wave activity. Of all the phases, this one has the highest arousal threshold, meaning it’s the hardest for external stimuli to wake you from this state. Even a loud noise might not do the trick.

Think of NREM 3 as hitting the reset button. Your body physically repairs itself during this phase, and your brain does additional work with memory. The hippocampus reactivates new memories from the day and trains the cortex for long-term storage. This process also helps the brain prep for new learning the next time you are awake.

A drawing of a man sleeping in bed with three imaginary sheep surrounding his head
Leo Medrano

REM Sleep

The final stage of each cycle is REM sleep, where your brain activity increases again and you’re closer to a state of wakefulness. Your first REM state will last roughly 10 minutes, but as you near wake-up time, subsequent phases will increase in length. About 25% of your night is spent in REM sleep.

During REM, your heart and breath rate increase again, and your eyes move rapidly from side to side. But the rest of your body is still. That’s because neurotransmitters and their receptors effectively paralyze your muscles. That sounds scary. But research suggests the mechanism prevents you from performing your dreams, which mostly occur during REM sleep.

REM also plays a role in how you process new information by helping to stabilize what’s been encoded in your long-term memory during NREM 3. But REM is also crucial for procedural memory. We might learn a new skill during our awake time, but we commit that training to memory “offline” during REM sleep. So if you’re frustrated with not nailing something right away, give it a literal rest and try again the next day.

REM is also thought to gently transition us to a more wakeful state after being in the deep abyss of NREM 3.

How many sleep cycles should you get every night?

On average, adults need about four to six sleep cycles per night.

Why do sleep cycles matter?

Over the course of the night, we spend varying time in each of the phases of each cycle. At the beginning of the night, we spend more time in the deep sleep of NREM 3. We need this full sleep plunge for our mind and body to repair.

But as the night progresses and we cycle back to NREM 3 again, we spend less time there and we don’t go as deep as the last time. It’s a slightly shallower pool. Then as the night wears on, we spend more time in the REM phase, the wading pool of sleep, helping our brain to recuperate from each deep session and prepare us to wake. Without sleep cycles to help us transition, researchers theorize our brains would keep us in the state of NREM 3, which some researchers liken to a coma, unless something external woke us up.

Ideally, you’ll wake up in the morning from REM sleep, which likely serves the purpose of driving us toward a state of consciousness. Waking up mid-NREM 3 — because of a blaring alarm before you’re ready — will leave you feeling muddled for a bit. But if you’ve logged enough sleep cycles, you’re likely not spending much time in NREM 3 by morning, if at all. You’ll mostly snooze in REM and the lighter stages of NREM, especially NREM 2, until you wake.

How much sleep do you need?

Each cycle takes about 90 to 110 minutes, and you should log four to six per night. You need seven hours to achieve the bare minimum of four, eight hours for five, and nine hours for six. Plus, you need about 15 minutes, give or take, to nod off and get into your first go round. Ultimately, how much sleep you need is somewhat individualized, but it also varies by age. Here are the general recommendations.

A chart that shows how much sleep you need by age. Newborns need 14 to 15 hours, infants 12 to 16, toddlers 11 to 14, preschoolers 10 to 13, kids 9 to 12, teens 8 to 10, adults 7 or more and seniors 7 to 9.
Leo Medrano

Still waking up tired?

If you’re consistently getting the recommended amount of sleep but your mornings are still leaving you feeling cloudy and reaching for that triple-shot espresso, it’s possible you require more hours per night than average — a sleep diary could help you determine which amounts of sleep help you feel most rested. It’s also possible that you’re not getting quality sleep.

Are you battling a noisy sleep environment or other disruptions that make it difficult to fall asleep or cause Junk Sleep? Take stock of your sleep hygiene, as well. And it’s also worth looking into whether you have obstructive sleep apnea or other issues impacting the quality of your sleep. You can try checking out our app for assessing potential sleep disorders. No, an app can’t diagnose, but it can help you gain a snapshot of your sleep patterns that you can then discuss with your doctor.

On the other hand, you may just need an extra 30 to 90 minutes of pillow time to either log another sleep cycle or let a little more REM do its good work of gently rousing you from slumber at the right time.