Sleep Calculator: Bedtime and Caffeine Cut-Off

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.

About 15 minutes is typical. Falling asleep within 30 minutes is a sign of good sleep quality.

Please enter a wake-up time, and 0 to 60 minutes to fall asleep.
Be in bed by
0:00
0:00last regular coffee
0:00last pre-workout (about 200 mg+)
0:00wake-up time

Your bedtime options

Sleep In bed by Time in bed Notes
About “90-minute sleep cycles”: sleep runs in cycles of roughly 90 to 110 minutes, four to six times a night, and the length changes through the night and from person to person. So 7.5 and 9 hours line up with five and six “average” cycles only roughly. Getting enough total sleep at a consistent time matters far more than timing cycles to the minute.
Still tired after 7–9 hours? Loud snoring, pauses in breathing, waking unrefreshed or dozing off during the day can be signs of a sleep disorder such as sleep apnoea. Talk to your doctor, especially if you also have high blood pressure or are gaining weight.

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

  1. 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
  2. Hirshkowitz et al. (2015), Sleep Health: National Sleep Foundation’s sleep time duration recommendations
  3. Gardiner et al. (2023), Sleep Medicine Reviews: the effect of caffeine on subsequent sleep, systematic review and meta-analysis
  4. Drake et al. (2013), Journal of Clinical Sleep Medicine: caffeine effects on sleep taken 0, 3 or 6 hours before going to bed
  5. Ohayon et al. (2017), Sleep Health: National Sleep Foundation’s sleep quality recommendations
  6. 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