Bedtime Calculator
Find the ideal bedtime to wake up refreshed at your target wake-up time.
Enter your values and click Calculate
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.