Better sleep starts with better timing. Find your ideal bedtime in seconds.
Best Time For BedCalculate My Sleep
Home / Blog / Sleep Duration Calculator Guide
Calculator Guide

Sleep Duration Calculator: How Many Hours Did You Sleep?

By Nauman, Founder and Editor · Updated October 20, 2026 · 3 min read

A sleep duration calculator tells you how long you spent in bed and how long you actually slept. It is useful for checking whether a schedule meets your needs, and it handles the awkward case of a bedtime before midnight and a wake-up after it.

Key takeaways

  • Time in bed is not the same as time asleep.
  • Subtract the time you took to fall asleep and any long awakenings.
  • Sleep efficiency is time asleep divided by time in bed.
  • Use the “Sleep Time” mode in the sleep calculator to check a schedule.

Time in bed versus time asleep

Time in bed runs from when you lie down to when you get up. Time asleep is shorter, because it excludes the minutes you take to fall asleep and any time awake in the night.

Worked example across midnight

You get into bed at 11:30 PM and get up at 6:45 AM. Time in bed is 7 hours 15 minutes. If you took 20 minutes to fall asleep and were awake for 10 minutes in the night, time asleep is 6 hours 45 minutes.

Sleep efficiency = time asleep ÷ time in bed. Here, 6.75 ÷ 7.25 is about 93%. Sleep specialists often treat 85% or higher as good.

Does it meet your needs?

Compare time asleep with the range for your age: adults regularly need 7 or more hours and teenagers about 8 to 10. See sleep duration by age and how much sleep you need.

How to improve a short night

If the numbers are short, move bedtime earlier before changing the alarm. Our bedtime calculator shows the options.

Frequently asked questions

How do I calculate sleep hours across midnight?

Add 24 hours to the wake-up time if it is smaller than the bedtime, then subtract. The calculator does this automatically.

What is a good sleep efficiency?

Often 85% or higher is considered good.

Sources and further reading: American Academy of Sleep Medicine (aasm.org), Sleep Research Society, National Sleep Foundation (sleepfoundation.org), CDC sleep resources (cdc.gov/sleep). See our full source list and editorial policy. This guide is general information, not medical advice.

About the author

Nauman, founder and editor of Best Time For Bed. He explains published sleep guidance in plain language and cites his sources. He is not a medical professional, and this page has not been medically reviewed. Read our editorial policy and sources, and talk to a doctor about personal health concerns.

Keep reading

Calculator guides

Bedtime Calculator: How to Find Your Best Bedtime

Learn how a bedtime calculator works, what to enter and how to choose between results. Includes a bedtime table for common wake-up times.

Read guide →
Calculator guides

Circadian Rhythm Calculator: Find Your Body Clock

What a circadian rhythm calculator and chronotype quiz can tell you, how to find your mid-sleep time, and how to plan a schedule that fits your body clock.

Read guide →
Calculator guides

Jet Lag Calculator: Plan Your Sleep Across Time Zones

How to use a jet lag calculator to plan sleep before, during and after a flight. Includes rules of thumb for adjustment time and light timing tips.

Read guide →

Ready to find your sleep time?

Plan a bedtime or wake-up time in under a minute with our free sleep calculator.

Open the sleep calculator