Bedtime Calculator
Find the ideal bedtime to wake up refreshed at your target wake-up time.
Enter your values and click Calculate
Working backwards from your desired wake-up time, this bedtime calculator finds the optimal times to go to sleep based on completing full 90-minute sleep cycles, while accounting for the time it typically takes you to fall asleep. Sleep research consistently shows that waking up at the end of a complete cycle — rather than in the middle of one — leaves you feeling significantly more refreshed, even if the total hours are similar. The 90-minute cycle is the average duration of one complete pass through the four stages of sleep: light sleep, deep sleep (slow-wave sleep), and REM sleep. Waking mid-cycle, especially during deep sleep, causes sleep inertia — the groggy, disoriented feeling that can persist for an hour or more. This calculator gives you three bedtime options corresponding to 4, 5, and 6 complete cycles (6, 7.5, and 9 hours of actual sleep), so you can choose the option that fits your schedule while still targeting a natural cycle endpoint. It is especially useful for early-morning appointments, shift workers, and students managing irregular sleep schedules.
How It Works
The calculator works backwards from your target wake-up time using this formula: bedtime = wake-up time − (number of cycles × 90 minutes) − fall-asleep time. Your wake-up time is converted to total minutes from midnight (wakeHour × 60 + wakeMinute). For six sleep cycles: 6 × 90 = 540 minutes of actual sleep. Adding your fall-asleep time (typically 10–20 minutes for most people) gives the total time you need to be in bed before waking. Subtracting that from the wake-up time in minutes gives your target bedtime in minutes from midnight, which is then converted back to a 12-hour AM/PM format. The same process is repeated for five cycles (450 minutes of sleep) and four cycles (360 minutes). All times are normalized using modulo 1440 arithmetic to handle bedtimes that wrap past midnight correctly — for example, a 6-cycle bedtime for a 6:00 AM wake-up correctly shows 8:46 PM rather than a negative or incorrect time.