Total Sleep Time Calculator

Total Sleep Time Calculator

#3 · Wellness and Mindfulness AI Skill PRO

Enter Calculation

Formula

Sleep=[(Wake−Bed)mod24]−Awake (min)60where{Bed=Bed hr+Bed min60Wake=Wake hr+Wake min60\begin{gathered} \text{Sleep} = \left[\left(\text{Wake} - \text{Bed}\right) \bmod 24\right] - \frac{\text{Awake (min)}}{60} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \text{Bed} &= \text{Bed hr} + \frac{\text{Bed min}}{60} \\ \text{Wake} &= \text{Wake hr} + \frac{\text{Wake min}}{60} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Total Sleep Time
8h 0m
8 hours of sleep
Time in bed 8 hours
Minutes awake 0 min
Actual sleep 8h 0m

Report an error on this page

What is the Total Sleep Time Calculator?

This tool tells you exactly how many hours and minutes you slept between the moment you went to bed and the moment you woke up. Because most people sleep across midnight, the calculator automatically "wraps" the time around the 24-hour clock — so a 23:00 bedtime and a 07:00 wake time correctly gives 8 hours rather than a negative number. You can also subtract the minutes you spent lying awake during the night to estimate your true sleep duration.

How to use it

Enter your bedtime as an hour (0–23) and minute, then enter your wake time the same way. If you were awake during the night (trouble falling asleep, bathroom trips, restless periods), enter the total minutes awake in the optional field. The calculator returns your time in bed, the minutes deducted, and your final total sleep time in hours and minutes.

The formula explained

First the calculator finds the raw interval: Wake − Bed. If the result is negative (you woke the next day), it adds 24 hours using a modulo operation, giving the true overnight time in bed. It then subtracts your night awakenings, converted from minutes to hours:

$$\text{SleepHours} = \left(\text{Wake} - \text{Bed}\right) \bmod 24 - \frac{\text{Awake}}{60}$$

Advertisement
Clock circle showing bedtime and wake time with overnight arc and a small awake gap
Sleep time spans from bedtime to wake time across midnight, minus minutes spent awake.

Worked example

Bedtime 22:30, wake time 06:45, awake 20 minutes. Time in bed = \((6.75 - 22.5) \bmod 24 = 8.25\) hours. Subtract \(20/60 = 0.333\) hours → \(7.917\) hours, which is 7 hours and 55 minutes of actual sleep.

Horizontal timeline from bedtime to wake time with a small awake block subtracted
Worked example: total span between the two times minus the awake interval gives sleep hours.

Interpreting Your Total Sleep Time

This calculator returns a duration — how much of the night fell between your bedtime and your wake time, minus the minutes you spent awake. It says nothing about sleep quality or sleep-stage composition (light N1/N2, deep N3, and REM). Two people can both record 7.5 hours and have very different amounts of deep and REM sleep; only a sleep study can describe that structure.

Two quantities are worth separating:

  • Time in bed (TIB) — the clock interval from lights-out to final rise: \((\text{Wake} - \text{Bed}) \bmod 24\). The \(\bmod 24\) is what lets the calculation cross midnight.
  • Total sleep time (TST) — time in bed minus wake after sleep onset and minus the time it took to fall asleep. Entering your awake minutes converts TIB into an estimate of TST.

From those two numbers you get sleep efficiency, a standard measure in sleep medicine:

$$\text{Sleep efficiency} = \frac{\text{Total sleep time}}{\text{Time in bed}} \times 100\%$$

For example, a 23:00 bedtime with a 07:00 wake time gives 8.00 hours in bed; subtracting 45 minutes awake leaves a total sleep time of 7.25 hours. The efficiency is then \(\frac{7.25}{8.00} \times 100\% = 90.6\%\). By long-standing convention in sleep medicine, an efficiency of 85% or higher is treated as normal for adults, and values persistently below that are one of the features clinicians look at when evaluating insomnia.

Treat the result as an approximation. Self-reported awake minutes are typically overestimated — people who wake in the night tend to judge those intervals as longer than they were, and time spent in light sleep is often recalled as wakefulness. Compared with polysomnography (the in-lab reference standard) or wrist actigraphy, sleep diaries commonly understate total sleep time and understate efficiency. That bias is systematic rather than random, so diary numbers are still useful for tracking change over time even though they are not interchangeable with lab values.

On how much sleep to aim for: the joint consensus statement of the American Academy of Sleep Medicine (AASM) and the Sleep Research Society (SRS) recommends that adults sleep 7 or more hours per night on a regular basis to promote optimal health, and notes that regularly sleeping less than 7 hours is associated with adverse health outcomes. These are US professional-society recommendations, though they are widely cited internationally and are echoed by the CDC.

Finally, a single night tells you very little. Night-to-night variability in healthy sleepers is large, and one short night after a late event is not a pattern. Sleep researchers and clinicians conventionally average a 7- to 14-night diary before drawing conclusions, and increasingly look at the regularity of bedtimes and wake times alongside the average duration. Log every night, then compare your mean and your spread rather than yesterday's figure.

This section is general factual information tied to published standards, not medical advice, and it is not a diagnosis. If you have persistent difficulty falling or staying asleep, loud snoring or witnessed breathing pauses, or daytime sleepiness that affects your driving, work, or mood, discuss it with a physician or a sleep specialist.

Advertisement

Recommended Sleep Duration by Age

The ranges below are recommended sleep per 24 hours — for infants and young children that includes naps, not just the overnight block. They come from the American Academy of Sleep Medicine's pediatric consensus statement, the AASM/Sleep Research Society adult consensus statement, the National Sleep Foundation's recommendations (for newborns and adults 65+), and the CDC's summary of those recommendations. These are US-based professional guidance, widely referenced elsewhere.

Age group Age Recommended sleep per 24 hours Source / standard
Newborn 0–3 months 14–17 hours National Sleep Foundation
Infant 4–12 months 12–16 hours (including naps) AASM pediatric consensus; CDC
Toddler 1–2 years 11–14 hours (including naps) AASM pediatric consensus; CDC
Preschool 3–5 years 10–13 hours (including naps) AASM pediatric consensus; CDC
School age 6–12 years 9–12 hours AASM pediatric consensus; CDC
Teen 13–18 years 8–10 hours AASM pediatric consensus; CDC
Adult 18–60 years 7 or more hours AASM/SRS adult consensus; CDC
Older adult 65+ years 7–8 hours National Sleep Foundation

How to use the table with your result: compare it against the row for your age, not against a single "8 hours" figure. Note that the adult recommendation is expressed as a floor (7 or more hours) rather than a band, because the evidence for harm from habitually short sleep is stronger than the evidence for an upper cut-off in working-age adults.

A worked check for a school-age child: a 20:30 bedtime and a 06:45 wake time gives 10.25 hours in bed; with 20 minutes awake the estimated total sleep time is 9.92 hours — inside the 9–12 hour range for ages 6–12.

Two caveats. First, these are population ranges, not individual targets: they describe the amount associated with the best health outcomes for most people in an age band, and individual need varies. Someone who consistently feels alert on 7 hours and someone who needs 8.5 are both accounted for by the width of the band. Second, the numbers refer to habitual sleep obtained regularly, so judge yourself on a 1–2 week average rather than on any one night.

General information only, not medical advice. Persistent sleepiness despite hitting these ranges, or a child who cannot reach them, is worth raising with a clinician.

FAQ

What if I go to bed and wake the same morning? As long as wake time is later than bedtime, the calculator simply returns the difference; the modulo only kicks in for overnight spans.

Does this measure sleep quality? No — it measures duration only. Sleep quality depends on cycles and disturbances not captured here.

What if my awakenings exceed time in bed? The result is floored at zero, since you cannot sleep negative hours.

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