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.
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\)).
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.