What time should you go to bed? Enter the time you need to wake up and this sleep calculator gives you bedtimes for 7, 7.5, 8 and 9 hours of sleep, plus a research-based cut-off time for your last coffee or pre-workout so caffeine does not eat into your night.
Your bedtime options
| Sleep | In bed by | Time in bed | Notes |
|---|
How this sleep calculator works
The calculator counts back from your wake-up time. For each option it subtracts the hours of sleep plus the minutes you usually need to fall asleep (15 minutes by default), so “in bed by” means lights out and phone away. The options cover the range experts recommend: the American Academy of Sleep Medicine and Sleep Research Society advise adults to sleep 7 or more hours a night regularly, and the National Sleep Foundation recommends 7–9 hours for adults aged 26–64 (7–8 hours after 65).
The caffeine cut-off comes from a 2023 meta-analysis of 24 studies (Gardiner et al.). On average, caffeine cut total sleep by about 45 minutes and reduced deep sleep. To avoid losing sleep, the authors suggest having a regular coffee (about 107 mg of caffeine) at least 8.8 hours before bed, and a typical pre-workout serving (about 217 mg) at least 13.2 hours before bed. An earlier sleep-lab study (Drake et al., 2013) found that 400 mg of caffeine taken even 6 hours before bed cut sleep by more than an hour, and people did not notice it. Tea and cola usually contain less caffeine than coffee, but energy drinks and strong espressos can contain more.
Simple habits that help
- Keep the same wake-up time on weekends as on workdays, as far as you can.
- Get daylight early in the day and keep the bedroom dark, cool and quiet.
- Finish big meals and alcohol well before bed.
- Train hard earlier in the day if late sessions keep you wired.
Go deeper with How to sleep better after 35, Why you are always tired after 35 and Magnesium for sleep and recovery.
Sources
- Watson et al. (2015), Journal of Clinical Sleep Medicine: recommended amount of sleep for a healthy adult, joint consensus of the AASM and Sleep Research Society
- Hirshkowitz et al. (2015), Sleep Health: National Sleep Foundation’s sleep time duration recommendations
- Gardiner et al. (2023), Sleep Medicine Reviews: the effect of caffeine on subsequent sleep, systematic review and meta-analysis
- Drake et al. (2013), Journal of Clinical Sleep Medicine: caffeine effects on sleep taken 0, 3 or 6 hours before going to bed
- Ohayon et al. (2017), Sleep Health: National Sleep Foundation’s sleep quality recommendations
- Patel et al., StatPearls (NCBI Bookshelf): physiology, sleep stages
This calculator gives general education, not medical advice. If you have ongoing trouble sleeping, snore loudly, or feel very sleepy during the day, speak to your doctor.
More free tools: Hydration calculator · Fit after 35 score · Zone 2 heart rate calculator · All tools