Hours of Sleep Calculator

Hours of Sleep Calculator

Leading AI Skill PRO

Enter Calculation

Formula

Sleep=(W−Bmod1440)+1440mod144060hourswhere{B=(Bed hrmod12+12PM)·60+Bed minW=(Wake hrmod12+12PM)·60+Wake min\begin{gathered} \text{Sleep} = \frac{\left(W - B \bmod 1440\right) + 1440 \bmod 1440}{60}\ \text{hours} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} B &= \left(\text{Bed hr} \bmod 12 + 12_{\,\text{PM}}\right)\cdot 60 + \text{Bed min} \\ W &= \left(\text{Wake hr} \bmod 12 + 12_{\,\text{PM}}\right)\cdot 60 + \text{Wake min} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Total Sleep
8
hours of sleep
Hours 8 h
Minutes 0 min
Approx. sleep cycles (90 min) 5

Report an error on this page

What is the Hours of Sleep Calculator?

This tool tells you exactly how much sleep you'll get based on the time you go to bed and the time you wake up. It handles the awkward math of crossing midnight automatically, so you don't have to count on your fingers at 11pm. The result is shown in total hours, an hours-and-minutes breakdown, and an estimate of how many 90-minute sleep cycles you'll complete.

How to use it

Enter your planned bedtime (hour, minute and AM/PM) and your wake-up time the same way. Press calculate and the tool returns your total sleep duration. Because sleep almost always spans midnight, the calculator wraps the time difference around a 24-hour clock, so a 10:30 PM bedtime and a 6:30 AM alarm correctly returns 8 hours rather than a negative number.

The formula explained

Both times are first converted to minutes past midnight on a 24-hour clock. The bedtime minutes are subtracted from the wake minutes, and the result is taken modulo 1440 (the number of minutes in a day) to handle the midnight rollover: $$\text{hours} = \frac{(\text{wake} - \text{bed}) \bmod 1440}{60}$$ The cycle estimate divides total hours by 1.5 and rounds to the nearest whole cycle, since a full sleep cycle is roughly 90 minutes.

Advertisement
Circular 24-hour clock showing the arc from bedtime to wake time as total sleep duration
Total sleep is the arc swept clockwise from bedtime to wake time on a 24-hour clock.

Worked example

Bedtime 10:30 PM = 22:30 = 1350 minutes. Wake 6:30 AM = 06:30 = 390 minutes. Difference = \(390 - 1350 = -960\). Add 1440 $$-960 + 1440 = 480\ \text{minutes} = 8\ \text{hours}$$ exactly, which is about 5 sleep cycles (\(8 \div 1.5 \approx 5.3 \to 5\)).

Horizontal timeline divided into repeating 90-minute sleep cycle segments from sleep start to wake
Sleep divides into roughly 90-minute cycles between falling asleep and waking.

Interpreting Your Sleep Duration

This calculator returns the elapsed time between the bedtime and wake time you entered, expressed in hours and minutes, in decimal hours, and as an approximate number of 90-minute sleep cycles. Read that number against published adult guidance rather than against how you happen to feel on one particular morning.

What the published bands say

The American Academy of Sleep Medicine (AASM) and the Sleep Research Society, in the consensus statement adopted by the US Centers for Disease Control and Prevention (CDC), recommend that adults aged 18–60 regularly obtain 7 or more hours of sleep per night. The National Sleep Foundation's expert consensus gives a range of 7–9 hours for adults 18–64 and 7–8 hours for older adults 65 and over. These are population recommendations from US-based professional bodies; they are widely cited internationally, but they are not laws of nature and individual need varies within and slightly beyond the range.

  • Below about 6 hours: in the published guidance this is clearly short of the recommendation. The AASM/CDC consensus associates habitually sleeping less than 7 hours with adverse outcomes including impaired attention and performance, increased accident risk, weight gain and obesity, hypertension, cardiovascular and metabolic disease, and depression. Under 6 hours is described in the same literature as "not recommended" for adults.
  • About 6 to 7 hours: below the recommended range but, in the National Sleep Foundation consensus, judged "may be appropriate" for some adults rather than clearly inadequate. Treat it as a figure worth improving if you also feel sleepy during the day.
  • About 7 to 9 hours: the recommended range for adults 18–64.
  • Above about 9–10 hours: long sleep is not simply "extra credit." The consensus statements note that regularly sleeping more than 9 hours (adults) or more than 10 hours has uncertain benefit and, in observational studies, is associated with poorer health outcomes — though the guidance is explicit that long sleep may be a marker of illness, medication effects, depression, or poor sleep quality rather than a cause of harm. It can be entirely appropriate for young adults, for people recovering from sleep debt, and during illness.

Why the cycle count is only an estimate

The tool divides your time by 90 minutes because 90 is the conventional average length of one non-REM/REM cycle. Real cycles vary roughly 70 to 120 minutes between individuals and between cycles in the same night. Early cycles carry more deep (N3) slow-wave sleep and tend to be shorter; later cycles contain progressively longer REM periods, so REM lengthens toward morning. A whole number of 90-minute blocks is therefore a rough alignment heuristic, not a guarantee that you will wake at a light-sleep boundary.

Time in bed is not sleep

The result is time in bed between the two clock times you entered — the calculator cannot know when you actually fell asleep or how often you woke. Two subtractions matter in practice:

  • Sleep-onset latency: falling asleep typically takes about 10–20 minutes in healthy sleepers.
  • Wake after sleep onset: brief night wakings are normal and add further lost minutes.

Sleep researchers combine these into sleep efficiency — actual sleep divided by time in bed — and generally regard about 85% or more as normal for adults. So a scheduled 8 hours in bed commonly yields closer to 7 to 7½ hours of sleep.

Worked example

Bedtime 11:00 PM, wake time 6:00 AM. Converting both to minutes after midnight:

$$B = (11 \bmod 12 + 12)\cdot 60 + 0 = 1380 \qquad W = (6 \bmod 12 + 0)\cdot 60 + 0 = 360$$

$$\text{Sleep} = \frac{ \bigl((360 - 1380) \bmod 1440 + 1440\bigr) \bmod 1440}{60} = \frac{420}{60} = 7.00\ \text{hours}$$

That is 7.00 hours in bed — inside the adult recommendation, but after ~15 minutes of sleep latency the actual sleep is closer to 6 h 45 min, and 420 minutes is 4 full 90-minute cycles with 60 minutes left over.

General information, not medical advice. The bands above are population reference figures from published guidance and cannot diagnose anything. If you regularly cannot get enough sleep, take a long time to fall asleep, wake unrefreshed, snore heavily or stop breathing in your sleep, or feel sleepy during the day despite adequate time in bed, that is a matter for a doctor or a sleep clinician rather than a calculator.

Recommended Sleep Hours by Age

The ranges below are the recommended amounts of sleep per 24 hours — for infants and young children this includes naps, not only the overnight block. They come from the National Sleep Foundation's expert-panel sleep duration recommendations (Hirshkowitz et al., Sleep Health, 2015) and, for children and teens, the American Academy of Sleep Medicine consensus statement on recommended sleep for pediatric populations (2016), which is endorsed by the American Academy of Pediatrics and used by the US CDC. These are US professional-body recommendations; they are widely referenced worldwide but national health bodies elsewhere may phrase their advice differently.

The cycle column simply divides the range by 90 minutes (\(\text{cycles} = \text{hours} \times 60 / 90\)) and is rounded. It is a rough guide only: young children's sleep cycles are considerably shorter than an adult's — closer to 50–60 minutes in infancy — so the 90-minute figure is not meaningful for the youngest groups.

Age group Age Recommended per 24 h Approx. 90-min cycles Source standard
Newborns 0–3 months 14–17 hours ~9–11 (cycles are much shorter at this age) NSF 2015; AASM pediatric consensus 2016 (0–4 mo not given a range by AASM)
Infants 4–11 months 12–15 hours ~8–10 (shorter cycles) NSF 2015 (AASM: 12–16 h for 4–12 mo, incl. naps)
Toddlers 1–2 years 11–14 hours ~7–9 NSF 2015; AASM 2016 (incl. naps)
Preschoolers 3–5 years 10–13 hours ~7–9 NSF 2015; AASM 2016 (incl. naps)
School-age children 6–13 years 9–11 hours ~6–7 NSF 2015 (AASM 2016: 9–12 h for 6–12 y)
Teenagers 14–17 years 8–10 hours ~5–7 NSF 2015 (AASM 2016: 8–10 h for 13–18 y)
Young adults 18–25 years 7–9 hours ~5–6 NSF 2015
Adults 26–64 years 7–9 hours ~5–6 NSF 2015; AASM/SRS & CDC: 7 or more hours (18–60 y)
Older adults 65+ years 7–8 hours ~5 NSF 2015

Because the calculator reports time in bed, aim your scheduled window slightly above the target — roughly 15–30 minutes more than the hours you want to sleep — to absorb sleep-onset latency and brief night wakings.

Advertisement

Bedtime and Wake Time Scenarios Compared

Every row below is computed with this article's own formula, so the table is internally consistent with the tool. Both clock times are converted to minutes after midnight, then:

$$\text{minutes} = \bigl((W - B) \bmod 1440 + 1440\bigr) \bmod 1440$$

The double modulo is what makes an overnight schedule work: when the wake time is numerically smaller than the bedtime, adding 1440 (the minutes in a day) rolls the result forward into the next day. Whole cycles are \(\lfloor \text{minutes} / 90 \rfloor\) and the leftover is \(\text{minutes} \bmod 90\).

Bedtime Wake time Total minutes Hours:minutes Hours (decimal) Whole 90-min cycles Leftover minutes
10:00 PM 6:00 AM 480 8:00 8.00 5 30
10:30 PM 6:30 AM 480 8:00 8.00 5 30
11:00 PM 6:00 AM 420 7:00 7.00 4 60
11:30 PM 5:30 AM 360 6:00 6.00 4 0
12:30 AM 7:00 AM 390 6:30 6.50 4 30
8:00 AM (day sleep after a night shift) 3:30 PM 450 7:30 7.50 5 0
2:00 PM (nap) 2:30 PM 30 0:30 0.50 0 30

Reading the rows

  • 10:00 PM → 6:00 AM and 10:30 PM → 6:30 AM are the same duration. Shifting both ends by the same amount changes nothing arithmetically: \((390 - 1350) \bmod 1440 = 480\) just as \((360 - 1320) \bmod 1440 = 480\). Only the subtraction matters to the calculator — but the clock position still matters to your body, since circadian timing and light exposure are not captured here.
  • 11:30 PM → 5:30 AM is the one row with zero leftover: 360 minutes is exactly 4 × 90. The 8-hour rows leave 30 minutes past the fifth cycle, which is why people sometimes choose 7:30 or 9:00 hours when they want the block to land on a cycle boundary.
  • The 7:30-hour day-sleep row shows the formula handling an entirely daytime window with no midnight crossing: \(930 - 480 = 450\) minutes, no wraparound needed. Shift workers should note that equal duration does not mean equal restorative value — daytime sleep is typically shorter and more fragmented because it runs against the circadian drive for wakefulness.
  • The 30-minute nap row completes no full cycle at all. Short naps of roughly 10–30 minutes are generally kept brief precisely to avoid waking out of deep slow-wave sleep, which produces grogginess (sleep inertia).

All of these figures are scheduled time in bed. Subtract your typical sleep-onset latency, commonly around 10–20 minutes, to estimate actual sleep. This section is general reference information, not medical advice.

FAQ

How many hours of sleep do I need? Most adults need 7–9 hours per night, though needs vary by age and individual.

What is a sleep cycle? A sleep cycle lasts roughly 90 minutes and moves through light, deep and REM sleep. Waking at the end of a cycle can help you feel more refreshed.

Does it work for naps and day sleepers? Yes. Any bedtime and wake time work, including daytime sleep, because the calculation wraps around the 24-hour clock.

Sources & References

Checked against these sources on . Not reviewed by a clinician. For general information only, not medical advice or a diagnosis. Talk to a doctor about any health concern.

Last updated:

Most popular in Wellness and Mindfulness

View all Wellness and Mindfulness calculators