To calculate hours of sleep, take the time you spent in bed and subtract the time it took to fall asleep and any time you were awake during the night. For example, 7 hours 45 minutes in bed, minus 15 minutes to fall asleep, minus 20 minutes awake at night, equals 7 hours 10 minutes of sleep. This guide gives the formula, shows how to do the sums across midnight and walks through worked examples. It also explains why your tracker may disagree. It is for education only.
Want the sum done for you? Use the sleep duration calculator.
The Sleep Time Formula
Four numbers are all you need.
- Time in bed. From when you turned off the light to when you got up.
- Time to fall asleep. The Sleep Foundation defines sleep latency as the time it takes to fall asleep after turning the lights out, with about 10 to 20 minutes normal (Sleep Foundation).
- Time awake in the night. The Sleep Foundation calls this wakefulness after sleep onset, the total minutes awake after first falling asleep (Sleep Foundation).
- Total sleep time. Time in bed, minus time to fall asleep, minus time awake in the night.
How To Calculate Sleep Duration Across Midnight
The only tricky part is crossing midnight. Split the night in two.
- Count the time from bedtime to midnight. From 10:45 p.m. that is 1 hour 15 minutes.
- Count the time from midnight to wake-up. To 6:30 a.m. that is 6 hours 30 minutes.
- Add them: 1 hour 15 minutes plus 6 hours 30 minutes is 7 hours 45 minutes in bed.
Then subtract the time to fall asleep and the time awake, as above. A second method is to switch to a 24-hour clock. Wake time 06:30 plus 24 hours is 30:30, and 30:30 minus 22:45 is 7 hours 45 minutes. Either way gives the same answer. This is exactly what a calculate-sleep-across-midnight tool does, and you can check your result with the bedtime calculator.
How Many Hours Did I Sleep? Worked Examples
| Case | In Bed | Fall Asleep | Awake at Night | Total Sleep |
|---|---|---|---|---|
| A good night | 10:45 pm to 6:30 am (7 h 45) | 15 min | 20 min | 7 h 10 |
| A restless night | 11:30 pm to 7:00 am (7 h 30) | 30 min | 45 min | 6 h 15 |
| A quick sleeper | 11:00 pm to 6:00 am (7 h) | 5 min | 0 min | 6 h 55 |
Notice that the second person spent 7 hours 30 minutes in bed and slept 6 hours 15. Many people say they “got 7 and a half hours” when they mean time in bed. The CDC guidance of 7 or more hours for adults aged 18 to 60 is about sleep, not time in bed (CDC). For the weekly picture, see average hours of sleep.
Time In Bed vs Time Asleep: Sleep Efficiency
Sleep efficiency compares the two. The Sleep Foundation says it is generally calculated by dividing total sleep time by the time spent in bed (Sleep Foundation), and then multiplying by 100 to get a percentage (Sleep Foundation). Using the examples above:
- Good night: 430 minutes asleep divided by 465 minutes in bed is about 92 percent.
- Restless night: 375 divided by 450 is about 83 percent.
In sleep restriction therapy, below 85 percent suggests shortening time in bed, 85 to 90 percent means keep the schedule, and above 90 percent means lengthening it (Sleep Foundation). That is a treatment rule, not a pass mark for healthy sleepers. I did not find a source that sets a norm for people without insomnia. For a quick calculation, use the sleep efficiency calculator. For the therapy itself, read sleep restriction therapy.
Turning Hours Into Sleep Cycles
Some people like to count cycles. The Sleep Foundation says cycles last about 90 minutes on average and a typical night includes four to six, with the first often shortest at 70 to 100 minutes and later ones 90 to 120 (Sleep Foundation). So 7 hours 10 minutes, which is 430 minutes, is about 4.8 cycles at 90 minutes each. Its own calculator assumes about 15 minutes to fall asleep and aims for at least four full cycles (Sleep Foundation). Because cycle length varies from person to person and night to night, treat cycles as a rough guide. See does the 90-minute rule work and the 90-minute sleep cycle calculator.
Why Your Tracker And Your Memory May Disagree
You will rarely get exact numbers. In a study of 669 adults, measured sleep averaged 6.0 hours while self-reports averaged 6.8. People who slept 5 hours over-reported by about 1.2 hours (Lauderdale et al. 2008). Wearables have their own bias. A 2023 study found that most wearables overestimate sleep by misclassifying time awake, which inflates sleep efficiency (Lee et al. 2023). So use your tracker for trends and your diary for honest numbers. See are sleep trackers accurate.
Keep A Sleep Diary For A Week
A diary gives you real numbers for the formula. NHLBI suggests keeping one for 1 to 2 weeks and noting when you go to sleep, wake up and nap, plus how long it takes to fall asleep and how often you wake (NHLBI). The widely used core sleep diary has nine items, including bedtime, time to fall asleep, number and length of awakenings, final wake time and sleep quality (Carney et al. 2012). One study found a diary should run for at least seven days, including a weekend, to be reliable (Sleep Science 2020).
No source I opened says whether naps should be added to a daily total, so log them separately and decide how to count them. The Sleep Foundation advises naps of about 20 minutes, no longer than 30 (Sleep Foundation).
Common Mistakes To Avoid
- Counting time in bed as sleep. This overstates sleep by the time it takes to fall asleep plus every wake-up.
- Forgetting the night wakings. Even 20 minutes a night is worth removing. The Sleep Foundation notes that about 20 minutes or more awake during the night can be worth acting on (Sleep Foundation).
- Using one night. A single night is noise. Average a week, including a weekend.
- Copying the tracker blindly. A tracker is a good guide for trends, not an exact clock.
- Mixing up weekday and weekend sleep. Calculate each separately, then average them.
From Nightly Sums To A Weekly Average
Once you have total sleep time for each night, add the seven values and divide by seven. For example, 7 h 10, 6 h 15, 6 h 55, 7 h 30, 6 h 45, 8 h and 8 h 30 add up to 51 hours 5 minutes, which is about 7 hours 18 minutes a night. Compare that with the 7 or more hours that the CDC lists for adults aged 18 to 60 (CDC). If you fall short, the sleep debt calculator shows the gap, and how to recover from sleep debt explains how to close it.
When To See A Doctor
If your diary shows you are in bed much longer than you sleep, or you regularly lie awake, speak to a clinician. The Sleep Foundation says taking much longer than 20 to 30 minutes to fall asleep may indicate insomnia or another sleep issue (Sleep Foundation). The NHS suggests seeing a GP if changing habits has not helped, you have had trouble sleeping for months, or it makes daily life hard to cope with (NHS). The CDC advises talking to a provider if you regularly have problems sleeping (CDC).
FAQs About Calculating Sleep Hours
How Do You Work Out Hours Of Sleep Across Two Days?
Split the night at midnight, count each part and add them. Then subtract the time to fall asleep and the time awake (Sleep Foundation).
Should I Subtract The Time It Takes To Fall Asleep?
Yes. Sleep latency is the time between lights out and sleep, and it is not sleep. About 10 to 20 minutes is normal (Sleep Foundation).
What Is A Good Sleep Efficiency?
The usual target in sleep restriction therapy is 85 to 90 percent or more, but that is a treatment threshold, not a norm for everyone (Sleep Foundation).
How Many Sleep Cycles Is 7 Hours?
About four to five at 90 minutes each. Real cycles run about 70 to 120 minutes (Sleep Foundation).
Is My Tracker’s Number The Same As Hours Asleep?
Not exactly. Most wearables overestimate sleep by counting some wake time as sleep (Lee et al. 2023).
How Long Should I Track My Sleep?
At least seven days, including a weekend, and up to two weeks if you plan to see a doctor (Sleep Science 2020, NHLBI).
Sources
- Sleep Foundation (sleep latency)
- Sleep Foundation (wakefulness after sleep onset)
- Sleep Foundation (sleep restriction therapy)
- Sleep Foundation (stages of sleep)
- Sleep Foundation (sleep calculator)
- Sleep Foundation (napping)
- Carney et al. 2012
- Sleep Science 2020
- NHLBI (insomnia diagnosis)
- Lauderdale et al. 2008
- Lee et al. 2023
- NHS (insomnia)
- CDC (about sleep)