The quick answer
Bedtime is your wake time minus your sleep need, minus 15 minutes for falling asleep. Waking at 6:30 AM with an 8-hour need gives a target sleep onset of 10:30 PM and a get-into-bed time of 10:15 PM. The calculator does that subtraction live as you type, and the 15-minute allowance is a stated assumption, not a measurement of you.
What the calculator does
Three inputs drive everything: the wake hour in 24-hour format, the wake minute, and the sleep need, chosen from a dropdown offering 7, 7.5, 8, 8.5 or 9 hours. Results recompute on every keystroke into three cards: Target sleep onset, Get into bed by, and Sleep duration. A formula card shows the method, and a Reset to example button restores the defaults, which are a 6:30 AM wake and an 8-hour need.
The 15-minute gap between the two times is sleep latency, the normal 10-to-20 minute window it takes to fall asleep, taken at its midpoint. The number is an assumption the engine states rather than measures: if you know you take longer to drift off, move the bed time back by the difference.
Sleep need by age
The dropdown's range is not an accident: adult recommendations span 7 to 9 hours, and the engine only offers values inside that band. The full published scale runs wider.
| Age group | Recommended sleep per day |
|---|---|
| Newborn (0–3 months) | 14–17 hours |
| Infant (4–11 months) | 12–15 hours |
| Toddler (1–2 years) | 11–14 hours |
| Preschool (3–5 years) | 10–13 hours |
| School age (6–13 years) | 9–12 hours |
| Teen (14–17 years) | 8–10 hours |
| Adult (18–64 years) | 7–9 hours |
| Older adult (65 years and up) | 7–8 hours |
Ranges are the National Sleep Foundation's published daily-duration recommendations. For the calculator, pick the need you wake rested on, not the one you wish were true: running on 7 when you need 9 is the single biggest error this arithmetic can inherit.
Worked example you can check by hand
Input
Wake hour (24h): 6 Wake minute: 30 Sleep need: 8 hours
Output
Target sleep onset: 10:30 PM Get into bed by: 10:15 PM Sleep duration: 8 hours
Check it by subtraction: 6:30 AM minus 8 hours is 10:30 PM, and 15 minutes earlier is 10:15 PM. Change the need to 7 hours and the pair becomes 11:30 PM and 11:15 PM; at 9 hours it becomes 9:30 PM and 9:15 PM. If those three cases check out by hand, the arithmetic holds for every other wake time.
Who counts back to a bedtime
The people who need this arithmetic have a fixed morning and a negotiable evening.
Early-shift workers and healthcare staff: a 5:30 AM alarm with an 8-hour need puts lights out at 9:15 PM, and seeing that number in cold digits is what ends the 10:30 PM show. The fixed wake time is the anchor, and consistency rather than the exact minute is what it buys.
Parents and students: a toddler who wakes at 6:00 AM sets the household's clock, so an 8-hour adult need means bed by 9:45 PM; a 9 AM lecture makes one-more-episode and 7 hours of sleep mutually exclusive.
Frequent travellers and sleep-debt repayors: jet lag and recovery both start from a fixed wake time, and counting back the full need, rather than as much as possible, is what repays the debt without wrecking the next morning.
Where the arithmetic is only guidance
The honest envelope, stated inline: sleep cycles average roughly 90 minutes and vary between people and nights, so wake-time arithmetic is guidance, not physiology. Sleep need is a band, not a number: some adults run true on 7, others need every minute of 9, and a week of honest observation beats any calculator. Sleep latency swings with caffeine, stress and screens, so someone who takes 40 minutes to drift off should move the whole schedule earlier by the difference. The output is a starting hypothesis, and your own rested mornings are the ground truth.
Your wake time stays on your device
Wake times and sleep needs are personal data, and the subtraction runs entirely in your browser: no request carries the inputs, nothing persists after the tab closes, and the page still computes with Wi-Fi off. Proof beats policy: open the network panel, change a field, and watch zero requests leave.
Frequently asked questions
Do you store what I enter into the Bedtime Calculator?
No. The computation is local JavaScript in this tab, so the inputs are never sent anywhere. The network inspector confirms it in about thirty seconds if you want proof rather than prose.
Can I use the Bedtime Calculator offline?
Yes. Load the page once and the calculator keeps working on a plane or in a dead zone, because nothing in the arithmetic requires the network.
What formula does the Bedtime Calculator use?
Two subtractions. Target sleep onset = wake time − sleep need, and Get into bed by = target onset − 15 minutes. The formula card on the page shows the same method, and the default case (6:30 AM wake, 8-hour need) reproduces 10:30 PM and 10:15 PM.
Does the Bedtime Calculator work on mobile?
Yes. On a phone screen the two-column layout collapses to a single column, the number fields pull up the numeric keypad, and the results recompute on every keystroke as they do on desktop.
How accurate is a bedtime calculation?
The arithmetic is exact; the assumptions are labelled. The 15-minute latency allowance and the 7-to-9-hour need band are population guidance, and your own cycle length, caffeine intake and rested mornings override both. Treat the output as a starting hypothesis, not a prescription.
Tools that pair with sleep planning
Sources and further reading
One published table stands behind the dropdown and the guidance above, and it is linked here rather than paraphrased.
Sources and further reading
- National Sleep Foundation: sleep duration recommendations(sleepfoundation.org)
We cite primary sources (standards bodies, government agencies, official documentation) wherever they exist so you can verify every number on this page yourself.