Home / Blog

How to Calculate Hours Slept (Even When You Cross Midnight)

Hours slept = time in bed minus time to fall asleep and time awake. How to do the math across midnight, with worked examples and a free calculator.

To calculate hours slept, take the time from getting into bed to getting up, then subtract the time it took to fall asleep and any time you were awake. In bed from 11:30 PM to 6:45 AM is 7 h 15 min in bed. Take off 20 minutes to fall asleep, 25 minutes awake in the night and 10 minutes lying awake before getting up, and you slept 6 h 20 min.

The hours of sleep calculator does the midnight math for you. Here's how to do it by hand, and why your answer is probably less than you think.

Free toolSleep CalculatorBest bedtime or wake-up time, based on 90-minute sleep cycles.

How do you calculate total sleep time?

Total sleep time is time in bed minus every stretch you spent awake in it. Written out:

Hours slept = time in bed - time to fall asleep - time awake during the night - time awake before getting up

Sleep researchers track exactly these pieces in the standard sleep diary used in insomnia studies: when you got into bed, when you tried to sleep, how long it took, how long you were awake, and when you got up. You don't need a diary form, just those four or five numbers.

How to calculate hours slept across midnight

Crossing midnight is where most people trip up. The simplest fix is to add 24 hours to the wake-up time whenever it's "smaller" than the bedtime.

Using the example above, in 24-hour time:

  1. Bedtime: 23:30. Wake-up: 6:45.
  2. Wake-up is smaller, so add 24 hours: 6:45 becomes 30:45.
  3. 30:45 - 23:30 = 7 h 15 min in bed.

Another way that works in your head: count to midnight, then add the morning. 11:30 PM to midnight is 30 minutes; midnight to 6:45 AM is 6 h 45 min; together, 7 h 15 min.

Common bedtimes, worked out

In bed Up Time in bed Hours slept (minus 15 min to fall asleep)
10:00 PM 6:00 AM 8 h 0 min 7 h 45 min
11:00 PM 7:00 AM 8 h 0 min 7 h 45 min
10:45 PM 5:30 AM 6 h 45 min 6 h 30 min
11:30 PM 6:30 AM 7 h 0 min 6 h 45 min
12:30 AM 7:15 AM 6 h 45 min 6 h 30 min
1:15 AM 8:00 AM 6 h 45 min 6 h 30 min

The last column assumes a quick, unbroken night. If you wake up in the night, subtract that too. For any other pair of times, plug them into the hours of sleep calculator, which also tells you whether your alarm lands mid-cycle.

Time in bed vs time asleep: don't count the same thing

The single biggest error in "how long did I sleep" math is counting time in bed as sleep. They're different numbers, and the gap between them is often 30 minutes to an hour, even on a decent night.

What to leave out of your total:

  • Scrolling, reading or TV in bed before you try to sleep. Start the clock at lights-out.
  • Time to fall asleep. Typically 10 to 20 minutes.
  • Night wakings. Add up the stretches you remember. A bathroom trip plus lying awake for 15 minutes counts.
  • Lying awake after your final wake-up before you get up.

The full breakdown is in time in bed vs time asleep. If you divide your hours slept by your time in bed, you get your sleep efficiency, which the sleep efficiency calculator scores for you.

How to calculate your average hours of sleep for a week

One night is noisy. A weekly average tells you far more. Add up each night's hours slept, then divide by 7.

Night Hours slept
Mon 6 h 30 min
Tue 6 h 45 min
Wed 5 h 50 min
Thu 7 h 10 min
Fri 6 h 20 min
Sat 8 h 5 min
Sun 7 h 40 min
Total 48 h 20 min
Average 6 h 54 min

That average sits just under the 7 hours adults need, even with a long Saturday. The shortfall across the week is your sleep debt, which the sleep debt calculator adds up night by night.

Why your estimate is probably a little high

When people guess their usual sleep, they tend to guess high. In a study of about 670 middle-aged adults, the average self-reported sleep was 6.8 hours, while wrist monitors measured 6 hours. Brief wake-ups that last only a minute or two are easy to forget, and they add up.

A few ways to get a truer number:

  1. Write it down in the morning, not at the end of the week.
  2. Round awake time up, not down, if you're unsure.
  3. Don't watch the clock at night. Checking the time when you wake tends to keep you awake longer. A rough guess in the morning is enough.

If your honest number keeps coming out under 6 hours, see is 6 hours of sleep enough. And if you're getting plenty of hours but still wake up exhausted, or you've struggled to sleep for weeks, it's worth talking to a doctor.

Frequently asked questions

How do I calculate how many hours I slept?

Subtract your bedtime from your wake-up time to get time in bed, then subtract the time it took to fall asleep and any time you were awake during the night.

How do you calculate hours slept across midnight?

Count from bedtime to midnight, then add the hours from midnight to your wake-up time. 11:30 PM to 6:45 AM is 30 minutes plus 6 h 45 min, or 7 h 15 min.

How many hours did I sleep if I went to bed at 11 PM and woke at 7 AM?

That is 8 hours in bed. After about 15 minutes to fall asleep, it is roughly 7 h 45 min of sleep, less if you woke up during the night.

Is time in bed the same as total sleep time?

No. Total sleep time leaves out the time it takes to fall asleep and any time awake, so it is usually 30 minutes to an hour less than time in bed.

This article is general information, not medical advice. If you're often exhausted despite enough time in bed, snore loudly, or have been told you stop breathing in your sleep, see a doctor.