Waking up in the middle of deep sleep is why some mornings feel like wading through fog even after a long night. Sleep is organised in cycles: light sleep, deep slow-wave sleep, then REM (dream) sleep, a sequence that repeats four to six times a night and lasts roughly 80 to 100 minutes. Near the end of a cycle, sleep is lighter and waking up is usually easier.
This sleep calculator works in both directions. Tell it when you go to bed (or that you are going to bed now) and it suggests wake-up times that land at the end of a cycle. Or tell it when you must get up and it works back to the bedtimes that give you complete cycles. It adds the time you need to fall asleep, picks the number of cycles that best matches the sleep duration recommended for your age, and lists the other good options.
The numbers behind it, a 90-minute cycle and about 15 minutes to fall asleep, are averages, not personal measurements. Both settings can be changed, so after a week of noting how you feel you can tune the calculator to your own rhythm.
How to use this calculator
- Choose When to wake up (you know your bedtime) or When to go to bed (you know your alarm time).
- Enter the time. Going to bed now? Type the current time.
- Adjust the time to fall asleep (15 minutes by default) and the cycle length (90 minutes) if you know yours.
- Pick your age group so the suggestion follows the recommended amount of sleep.
- Read the best time, the sleep it gives you and the other options in the table. Times past midnight wrap around the clock automatically.
The formula
With a bedtime , a time to fall asleep , a cycle length and complete cycles:
where is the wake-up time. Times are counted in minutes after midnight and taken modulo 1,440 (24 hours), so a night that crosses midnight needs no special handling.
The calculator chooses so that falls inside the recommended range for your age and as close as possible to its middle. For an adult (7–9 hours, middle 8 hours) and 90-minute cycles, 5 cycles give 7.5 hours and 6 cycles give 9 hours; 7.5 is closer to 8, so 5 cycles is the headline answer and 6 is offered as an alternative.
Worked example
Going to bed at 11:00 PM. With 15 minutes to fall asleep you are asleep at 11:15 PM. Five 90-minute cycles take 7.5 hours, so the best alarm time is 6:45 AM. One cycle less gives 5:15 AM (6 hours), one more gives 8:15 AM (9 hours).
Waking up at 7:00 AM. Counting back five cycles and the 15 minutes to fall asleep gives a bedtime of 11:15 PM. If you are tired, 9:45 PM gives six cycles; on a short night, 12:45 AM still gives four complete cycles.
How much sleep do you need by age?
Recommendations of the National Sleep Foundation expert panel (Hirshkowitz et al., 2015), in hours per 24 hours. Up to 5 years they include naps.
| Age | Recommended | May be appropriate |
|---|---|---|
| Newborn, 0–3 months | 14–17 | 11–19 |
| Infant, 4–11 months | 12–15 | 10–18 |
| Toddler, 1–2 years | 11–14 | 9–16 |
| Preschool, 3–5 years | 10–13 | 8–14 |
| School age, 6–13 years | 9–11 | 7–12 |
| Teen, 14–17 years | 8–10 | 7–11 |
| Young adult, 18–25 years | 7–9 | 6–11 |
| Adult, 26–64 years | 7–9 | 6–10 |
| 65 and over | 7–8 | 5–9 |
The American Academy of Sleep Medicine reaches similar figures: at least 7 hours for adults, 9–12 hours for children aged 6–12 and 8–10 hours for teenagers. Babies and toddlers have shorter cycles (around 50–60 minutes in infants), so the cycle-based times above are meant for school-age children and adults.
Making the most of your sleep
Regular hours matter as much as the total: getting up at the same time every day, weekends included, anchors your body clock. Daylight in the morning, a cool and dark bedroom, no caffeine in the 6 hours before bed and screens put away a little earlier all help you fall asleep within the usual 10 to 20 minutes. If you regularly need more than about 30 minutes to fall asleep, wake up often, snore loudly or feel sleepy during the day despite enough hours, talk to a doctor: insomnia and sleep apnoea are common and treatable.
Frequently asked questions
Is a sleep cycle really 90 minutes?
90 minutes is an average. Cycles usually last 80 to 100 minutes and change across the night, with more deep sleep early and more REM sleep towards morning. That is why the cycle length is adjustable.
What time should I go to bed to wake up at 6 AM?
With 90-minute cycles and 15 minutes to fall asleep, 10:15 PM gives five cycles (7.5 hours) and 8:45 PM six cycles. Choose When to go to bed and enter 06:00 to see all the options.
Is it better to sleep 6 hours or 7.5 hours?
For adults, 7.5 hours is within the recommended 7–9 hours; 6 hours is not, even if it ends at the close of a cycle. Waking at the right moment helps you feel alert, but it does not replace enough sleep.
How long should a nap be?
A short nap of 10 to 20 minutes refreshes you without deep sleep, so you wake up easily. A full cycle of about 90 minutes also works when you have time. Naps in between often leave you groggy.
Can I use it for my child?
Yes for school-age children and teenagers: choose the matching age group so the suggestion follows 9–11 or 8–10 hours. For babies and toddlers, follow the age table, which counts naps, rather than cycle times.
Sources
- Hirshkowitz et al. (2015), National Sleep Foundation’s sleep time duration recommendations, Sleep Health 1(1):40–43
- Watson et al. (2015), Recommended amount of sleep for a healthy adult, AASM/SRS consensus, J Clin Sleep Med 11(6):591–592
- Paruthi et al. (2016), Recommended amount of sleep for pediatric populations, AASM consensus, J Clin Sleep Med 12(6):785–786
- NHLBI (NIH) — Sleep phases and stages
- Ohayon et al. (2004), Meta-analysis of quantitative sleep parameters across the lifespan, Sleep 27(7):1255–1273
Last updated: