Calcxi · Health & Fitness
Sleep Calculator
Work out what time to go to bed for a given wake-up time, or what time to wake if you are going to bed now. Every result is shown with the honest window around it, because the sleep cycle it is built on is 80 to 100 minutes long, not exactly 90. Nothing you enter leaves your browser.
Enter the hours you actually slept over the last seven nights. Short nights are added up. Long nights are not subtracted, because a lie-in on Sunday does not undo a 5 hour Tuesday, and treating it as if it did is how a real shortfall stays hidden.
Sleep debt
·
Short nights only
Nightly average
·
Worst night
·
Target
·
There are two nap lengths that tend to work and one stretch in the middle that does not. A short nap ends before deep sleep takes hold. A full cycle ends after it has passed. Waking in between is what produces that heavy, worse-than-before feeling.
Short nap, set an alarm for
·
Full cycle nap, set an alarm for
·
How to use this sleep calculator
A sleep calculator works backwards from the time you have to be awake, counting whole sleep cycles so your alarm lands at the end of one rather than in the middle of deep sleep. This one does that in four ways, and it does one thing the others do not: it shows you how wide the answer really is.
Work out what time to go to bed
Enter the time you need to be up. The calculator returns bedtimes for six, five, four and three complete cycles, marks the options that meet the CDC recommendation for your age, and shows the window around each one. If you have to be up at 6:30 am, five cycles puts your bedtime at 10:45 pm.
Work out what time to wake up
Going to bed now, or at a time you already know? The second tab runs the same arithmetic forwards and gives you wake-up times that land on a cycle boundary.
Add up your sleep debt
Enter what you actually slept over seven nights. Short nights accumulate. Long nights do not cancel them out, which is a deliberate choice explained further down, and it is the reason this tab usually reports a bigger shortfall than you expect.
Time a nap so you do not wake up worse
Two nap lengths work and the stretch between them does not. The fourth tab gives you both alarm times and names the window to avoid.
What is a sleep calculator?
A sleep calculator is a tool that suggests bedtimes or wake-up times based on the length of a sleep cycle, so that you wake at the end of a cycle rather than partway through one. The idea is simple: sleep is not uniform. It moves through stages in a repeating pattern, and being woken out of the deepest stage feels considerably worse than being woken out of the lightest one.
The National Heart, Lung, and Blood Institute, part of the US National Institutes of Health, describes the pattern this way: "The cycle starts over every 80 to 100 minutes. Usually there are four to six cycles per night."
What a sleep calculator cannot do
It cannot measure your sleep. It has no idea how long you actually took to drift off, whether you woke at three in the morning, or how long your own cycles run. It is arithmetic applied to an average, and it is useful in the way a train timetable is useful: a good plan that reality will amend.
How this sleep calculator works: the formula
Working backwards from a wake-up time
Working forwards from a bedtime
Why the time to fall asleep is separate
Most people treat bedtime and sleep onset as the same moment, and they are not. The gap is called sleep latency. This calculator keeps it as its own input with a 15 minute default, and that default is an assumption rather than a fact about you. If you routinely lie awake for 45 minutes, put 45 in the box and every result shifts accordingly. If you are asleep before the light is off, put 5.
Why the 90 minute sleep cycle is an average, not your number
This is the part every other sleep calculator skips, and it is the single most important thing on this page.
The 90 minute figure is a midpoint. NHLBI gives the range as 80 to 100 minutes. Twenty minutes of uncertainty per cycle does not stay small, because you multiply it by the number of cycles.
| Cycles | If your cycle is 80 min | If it is 90 min | If it is 100 min | Spread |
|---|---|---|---|---|
| 3 | 2:15 AM | 1:45 AM | 1:15 AM | 1h |
| 4 | 12:55 AM | 12:15 AM | 11:35 PM | 1h 20m |
| 5 | 11:35 PM | 10:45 PM | 9:55 PM | 1h 40m |
| 6 | 10:15 PM | 9:15 PM | 8:15 PM | 2h |
Bedtimes for a 6:30 am wake-up, calculated three ways from the same published range. Every figure here comes from the calculator above.
Read the bottom row again. For a six cycle night, the difference between the 80 minute assumption and the 100 minute one is 2h of bedtime. A tool that tells you "go to bed at 9:15 pm" is quoting the middle of a two hour band as though it were a train departure.
What to do with that
Treat the headline time as the centre of a window, not an instruction. Then narrow it yourself. Try the middle figure for a week and notice whether the alarm feels sharp or brutal. If it is consistently brutal, nudge your assumed cycle length up or down by five minutes and try again. You are calibrating an average against one person, which is you, and no calculator can do that part.
Cycles are not identical to each other either
Even within one night the cycles differ. NHLBI notes that you "usually spend more time" in deep sleep early in the night, and "usually have more REM sleep later in the night". So the first cycle and the fifth are not interchangeable ninety minute blocks. They contain different proportions of different things. Cutting a night short does not remove a slice of average sleep, it removes disproportionately more REM, because REM is loaded towards the end.
How much sleep do I need? Recommendations by age
The Centers for Disease Control and Prevention publishes recommended sleep by age group. These are the figures this sleep calculator checks your chosen option against.
| Age group | Recommended per 24 hours | Notes | Cycles at 90 min |
|---|---|---|---|
| Newborn, 0 to 3 months | 14 to 17 | Overnight sleep | 9 to 11 |
| Infant, 4 to 12 months | 12 to 16 | Includes naps | 8 to 11 |
| Toddler, 1 to 2 years | 11 to 14 | Includes naps | 7 to 9 |
| Preschool, 3 to 5 years | 10 to 13 | Includes naps | 7 to 9 |
| School age, 6 to 12 years | 9 to 12 | Overnight sleep | 6 to 8 |
| Teen, 13 to 17 years | 8 to 10 | Overnight sleep | 5 to 7 |
| Adult, 18 to 60 years | 7 or more | Overnight sleep | 5+ |
| Adult, 61 to 64 years | 7 to 9 | Overnight sleep | 5 to 6 |
| Adult, 65 and over | 7 to 8 | Overnight sleep | 5 to 5 |
CDC recommended hours per 24 hours. The cycle column is this page's arithmetic, not a CDC figure, and uses the 90 minute midpoint.
Why the adult row says "7 or more"
Because the CDC gives adults aged 18 to 60 a floor rather than a range. There is no upper bound published for that group, which is why the calculator will never tell an adult they have slept too much. Making up a ceiling to fill the gap would be inventing guidance that does not exist.
Why the child bands say "including naps"
For infants, toddlers and preschool children the CDC figures are per 24 hours and explicitly count daytime sleep. A toddler on 11 hours overnight plus a 2 hour nap has had 13 hours, not 11. Adding a nap on top of the overnight target is a common misreading of that table.
What time should I go to bed?
Work backwards from when you must be awake, not forwards from when you finish what you are doing. That single reversal is most of the value of a bedtime calculator.
| Cycles | Go to bed at | Sleep | Honest window |
|---|---|---|---|
| 6 | 9:15 PM | 9h | 8:15 PM to 10:15 PM |
| 5 | 10:45 PM | 7h 30m | 9:55 PM to 11:35 PM |
| 4 | 12:15 AM | 6h | 11:35 PM to 12:55 AM |
| 3 | 1:45 AM | 4h 30m | 1:15 AM to 2:15 AM |
Bedtimes for a 6:30 am wake-up at a 90 minute cycle and 15 minutes to fall asleep, with the NHLBI window beside each.
Five cycles or six?
Six cycles is 9 hours of sleep and five is 7 hours 30 minutes. For an adult, both clear the CDC floor of 7 hours. Five is realistic on a weeknight for most people; six is what you might aim for when catching up. Four cycles, at 6 hours, is below the recommendation and should be a fallback rather than a plan.
What time should I wake up?
| Cycles | Wake at | Sleep | Honest window |
|---|---|---|---|
| 3 | 3:15 AM | 4h 30m | 2:45 AM to 3:45 AM |
| 4 | 4:45 AM | 6h | 4:05 AM to 5:25 AM |
| 5 | 6:15 AM | 7h 30m | 5:25 AM to 7:05 AM |
| 6 | 7:45 AM | 9h | 6:45 AM to 8:45 AM |
Wake-up times from a 10:30 pm bedtime, same assumptions.
If you are going to bed late and the only cycle-aligned options are four or fewer, the calculator says so rather than dressing up a short night as an optimised one. Landing neatly on a cycle boundary does not turn 6 hours into enough sleep.
Sleep cycles and sleep stages explained
The four stages
Sleep alternates between non-REM and REM. Non-REM has three stages: the light drift as you fall asleep, a longer light stage, and then deep slow-wave sleep. REM follows, and it is where most vivid dreaming happens. Then the pattern begins again.
The shape of a night
The bar above is a simplification of the pattern NHLBI describes, not a measurement of anyone's night. The point it makes is the one that matters: the night is front-loaded with deep sleep and back-loaded with REM.
Why waking mid-cycle feels so bad
Being pulled out of deep slow-wave sleep produces sleep inertia, that heavy disoriented stretch where you are technically awake and functionally not. Being woken from light sleep at the end of a cycle is a much gentler transition. This is the entire premise of cycle-aligned alarms, and it is a real effect. What is oversold is the precision with which anyone can predict where those boundaries fall.
Sleep debt: what you actually owe
Sleep debt is the accumulated shortfall between what you needed and what you got. The calculator's third tab totals it across seven nights.
| Night | Slept | Short by |
|---|---|---|
| Monday | 6h | 1h |
| Tuesday | 6h 30m | 0h 30m |
| Wednesday | 5h | 2h |
| Thursday | 7h | none |
| Friday | 6h | 1h |
| Saturday | 8h | none |
| Sunday | 7h 30m | none |
| Total shortfall | 4h 30m |
A worked week against a 7 hour adult target. Total shortfall: 4h 30m.
Why good nights do not cancel bad ones here
Take that week and simply add it up. The total across seven nights, compared against seven times the target, leaves you only 3h short. Count only the nights that fell below target and the figure is 4h 30m, half as much again.
The difference is the Saturday lie-in netting off the Wednesday. That netting is why people who are genuinely short on sleep look fine on a weekly average. This calculator does not net, and that is a modelling choice rather than a physiological claim: the honest position is that recovery sleep helps but does not simply reverse a deficit hour for hour, so treating it as a bank account with credits and debits overstates how much a weekend repairs.
What one lost cycle costs
Trimming a single 90 minute cycle from each night adds up to 10h 30m across a week. That is the arithmetic, and it is the clearest argument for moving bedtime rather than hoping to catch up later.
How to nap without waking up groggy
There are two nap lengths that tend to work, and the calculator gives you both alarm times.
The short nap
About 20 minutes asleep. Short enough that you have not descended into deep slow-wave sleep, so waking is easy. From a 2:00 pm start with 15 minutes to drift off, the alarm goes at 2:35 PM.
The full cycle nap
A complete cycle, so you come up through light sleep at the end of it rather than being hauled out of the middle. Same start, and the alarm goes at 3:45 PM.
The window to avoid
Roughly 2:45 PM to 3:15 PM on that example, meaning about 30 to 60 minutes after falling asleep. This is where you are most likely to be woken out of deep sleep, and it is why a 45 minute nap so often leaves you worse than no nap at all.
Why you can wake up tired after eight hours
A sleep calculator answers one question: when should the alarm go off. Plenty of tiredness has nothing to do with that question, and it is worth saying so on a page like this one rather than implying the arithmetic is the whole story.
Time in bed is not time asleep
Eight hours between lights out and alarm might be seven hours of sleep with an hour of waking scattered through it. The calculator separates the two with the latency input, but it cannot see the awakenings in the middle.
Fragmented sleep is not the same as short sleep
Six uninterrupted hours and eight badly broken ones are not equivalent, even though only one of them looks short on paper. Anything that repeatedly interrupts the night, whether that is a young child, a noisy street, pain, or breathing that stops and starts, changes what those hours are worth.
Timing against your body clock
Sleeping from 3 am to 11 am is eight hours, and for most people it is not the same eight hours as 11 pm to 7 am. Your internal clock has opinions about when sleep should happen, and fighting it costs you quality even when the duration is identical.
Habits that change the numbers above
Keep the wake-up time steadier than the bedtime
A consistent wake time anchors the whole rhythm and is usually easier to control than when you actually fall asleep. If you only fix one end, fix that one.
Give caffeine more room than you think
It has a long half-life. An afternoon coffee is still measurably present at bedtime for many people, and it can shorten deep sleep without preventing you from falling asleep at all, which makes it easy to conclude it had no effect.
Treat alcohol as a sleep disrupter, not a sedative
It shortens the time to fall asleep and then fragments the second half of the night, which is precisely where REM is concentrated.
Light in the evening, light in the morning
Bright light late pushes your clock later; bright light on waking pulls it earlier. If your calculated bedtime feels impossible, this is often the lever that moves it.
Do not chase the arithmetic at the cost of the routine
Staying up 40 minutes to hit a cycle boundary is a bad trade. A consistent, slightly imperfect schedule beats a precisely calculated erratic one.
When a sleep calculator is not the answer
Worth saying plainly
This page is general information, not medical advice, and no calculator can diagnose anything. Speak to a doctor or a qualified sleep specialist if you regularly sleep a full night and still wake unrefreshed, if you snore heavily or have been told your breathing stops during sleep, if you fall asleep unintentionally during the day, if you cannot fall or stay asleep for weeks at a time, or if tiredness is affecting your driving, your work or your mood. Conditions such as sleep apnoea, insomnia and restless legs are common, treatable, and completely invisible to arithmetic like this.
Sleep calculator FAQ
How does a sleep calculator work?
+
It subtracts whole sleep cycles and your time to fall asleep from the hour you need to be awake. The formula is bedtime equals wake-up time minus cycles times cycle length minus sleep latency. Working forwards from a bedtime instead, you add the same components. The goal is an alarm that lands at the end of a cycle rather than in the middle of deep sleep.
What time should I go to bed if I wake up at 6:30 am?
+
Around 10:45 pm for five cycles, or 9:15 pm for six, assuming 90 minute cycles and 15 minutes to fall asleep. Because the published cycle length is a range rather than a fixed number, the realistic band for the five cycle option runs from about 9:55 pm to 11:35 pm. Treat the headline time as the middle of that window.
How long is a sleep cycle?
+
Between 80 and 100 minutes, according to the National Heart, Lung, and Blood Institute, which also notes there are usually four to six cycles per night. The commonly quoted 90 minutes is the midpoint of that range, not a fixed constant, and individual cycles vary both between people and across a single night.
How much sleep do I need for my age?
+
The CDC recommends 7 or more hours for adults aged 18 to 60, 7 to 9 hours at 61 to 64, and 7 to 8 hours at 65 and over. Teenagers aged 13 to 17 need 8 to 10 hours and school age children 9 to 12. The sleep calculator above checks your chosen option against the band for the age group you select.
Is it better to sleep 6 hours or 7 and a half?
+
Seven and a half, for an adult. Six hours is four complete cycles and falls below the CDC floor of 7 hours, while seven and a half is five cycles and clears it. Cycle alignment is a refinement on top of getting enough sleep, not a substitute for it, and a neatly aligned short night is still a short night.
What is sleep debt and can I catch up at the weekend?
+
Sleep debt is the accumulated shortfall between the sleep you needed and the sleep you got. Recovery sleep helps, but the honest position is that it does not simply reverse the deficit hour for hour, which is why the debt tab here adds up short nights without letting long ones cancel them. If a weekly average looks fine while your weeknights are consistently short, the average is hiding the problem.
Why do I wake up tired after 8 hours of sleep?
+
Usually because eight hours in bed was not eight hours asleep, or because the sleep was fragmented, or because it happened at the wrong point in your body clock. A sleep calculator can only address when the alarm rings. If a genuinely full night regularly leaves you unrefreshed, that is worth raising with a doctor rather than solving with arithmetic.
How long should a nap be?
+
About 20 minutes, or one full cycle of roughly 80 to 100 minutes. The awkward middle, somewhere between 30 and 60 minutes after falling asleep, is where you are most likely to be woken out of deep sleep and feel worse than before. The nap tab of the sleep calculator gives you both alarm times and names the window to avoid.
Does the sleep calculator work for children and teenagers?
+
The cycle arithmetic is the same, and the age selector switches the CDC target the results are checked against, so a teenager sees 8 to 10 hours rather than an adult's 7. Bear in mind that young children have shorter cycles than adults, so the 80 to 100 minute range fits adults better than infants, and the CDC bands for young children count daytime naps towards the total.
Should I trust the exact time a sleep calculator gives me?
+
Treat it as the centre of a window, not a precise instruction. Because cycle length is published as a range of 80 to 100 minutes, a six cycle bedtime carries roughly two hours of legitimate uncertainty. Any tool presenting a single minute-exact time is showing you the midpoint of a band without mentioning the band exists.
How many sleep cycles do I need per night?
+
Four to six is the usual range per night according to NHLBI. For an adult, five cycles at the 90 minute midpoint is 7 hours 30 minutes and clears the CDC floor, while six is 9 hours. Counting cycles is a useful way to pick a bedtime, but the hours matter more than the count.
Does this sleep calculator store what I enter?
+
No. Every calculation runs inside your browser and nothing is transmitted to a server or stored anywhere. Your sleep times, your age group and the hours you slept last week never leave your device.
Sources and limits
Sleep cycle length, the number of cycles per night and the distribution of deep and REM sleep across the night come from the National Heart, Lung, and Blood Institute at the US National Institutes of Health, which states that "the cycle starts over every 80 to 100 minutes" and that "usually there are four to six cycles per night".
Recommended sleep by age comes from the Centers for Disease Control and Prevention, reproduced without alteration in the table above.
What this page deliberately does not do is publish an average sleep latency, an ideal bedtime, or a single correct cycle length for you. The 15 minute default for falling asleep is an editable assumption, clearly labelled as one. No figure on this page is invented to fill a gap in the published guidance, which is also why an adult is never told they have overslept: the CDC does not set an upper bound for that age group.
This is general information, not medical advice, and it cannot diagnose or treat anything. If sleep is a persistent problem, speak to a qualified clinician.
Related calculators
Cycle length and sleep architecture: NHLBI, National Institutes of Health
Recommended sleep by age: Centers for Disease Control and Prevention
Every table on this page generated from the same engine that runs the calculator
Last updated: 31 August 2026
Written & verified by
B.Tech Computer Science · 8 years in web development & SEO · Bhilwara, India
About ·
LinkedIn ·
Report an error