GetHealthyCalculators
Skip to content

Caffeine and Sleep: When to Cut Off Your Last Cup

By GetHealthyCalculators Editorial Team

If you have ever had a 3 PM coffee, told yourself it will be "out of your system" by bed, and then stared at the ceiling at midnight — you are not imagining things. Caffeine clears slowly. Our caffeine sleep optimizer estimates when your last dose drops below a sleep-friendly threshold so you can plan the day around it.

The Half-Life That Matters

The average adult metabolizes caffeine with a half-life of about 5 to 6 hours, although it can range from 2 to 10 hours depending on genetics, liver enzyme activity, pregnancy, hormonal contraceptives, smoking, and certain medications. Half-life means that 5-6 hours after your dose, half of the caffeine is still in your bloodstream.

So a 200 mg afternoon coffee at 3 PM:

  • At 9 PM: about 100 mg still circulating
  • At 3 AM: about 50 mg still circulating
  • At 9 AM the next day: about 25 mg lingering

What Afternoon Caffeine Does to Sleep

A well-cited 2013 study by Drake and colleagues gave participants 400 mg of caffeine at three timepoints — bedtime, 3 hours before bed, and 6 hours before bed. Even the 6-hour-before-bed dose reduced total sleep time by more than an hour compared with placebo. Participants often did not notice the disruption subjectively.

Common effects include:

  • Longer sleep latency — more time lying awake before falling asleep
  • Reduced deep (slow-wave) sleep — the phase linked to physical recovery
  • More fragmented sleep — brief awakenings you may not remember
  • Blunted next-day alertness — creating a "need" for more caffeine

Why "I Sleep Fine on Coffee" Is Often Wrong

Objective sleep measurements tend to show disruption even when people report sleeping well. Your perception of falling asleep quickly does not mean deep sleep was preserved. Sleep trackers and clinical polysomnography often tell a different story than subjective recall.

Finding Your Personal Cutoff

A reasonable starting rule is to stop caffeine 8 to 10 hours before your target bedtime. For a midnight sleeper, that is roughly 2-4 PM. For someone targeting an 11 PM bedtime, that is 1-3 PM. Some people, especially slow metabolizers, may benefit from stopping by noon.

Factors that may shorten your safe window (meaning you should cut off earlier):

  • Pregnancy — half-life may double or triple
  • Oral contraceptives or hormone therapy
  • Liver conditions or certain medications
  • Older age (metabolism tends to slow)
  • Genetic slow-metabolizer variants (CYP1A2 alleles)

Common Caffeine Sources

Approximate caffeine per serving, per the FDA and manufacturer data:

  • Brewed coffee (8 oz): 80-100 mg
  • Espresso shot (1 oz): 60-70 mg
  • Cold brew (12 oz): 150-250 mg
  • Black tea (8 oz): 40-60 mg
  • Green tea (8 oz): 25-45 mg
  • Energy drink (12 oz): 100-300 mg
  • Pre-workout (1 scoop): 150-400 mg
  • Dark chocolate (1 oz): 12-25 mg

What About Decaf?

Decaf is not caffeine-free. A typical decaf cup contains 2-15 mg, which is usually negligible for sleep but can add up if you drink multiple cups after dinner.

Practical Swaps for Late-Day Energy

If the afternoon slump drives you toward coffee, consider:

  • A 10-minute walk outside — daylight and movement may boost alertness without the delayed sleep cost
  • A short nap (10-20 minutes) before 3 PM
  • Cold water and a protein-rich snack instead of pure caffeine
  • Herbal tea in the evening instead of coffee or matcha

Sleep Hygiene Basics From AASM

The American Academy of Sleep Medicine recommends consistent sleep and wake times, a dark and cool bedroom, and avoiding screens and large meals near bedtime. Caffeine timing sits in the same category — small daily habits that compound into meaningful differences in next-day function.

Next Steps

Want a personalized cutoff time based on your dose, bedtime, and sensitivity? Use the caffeine sleep optimizer to find the latest safe cup. Pair it with our sleep calculator to time bedtime around your natural cycles.

Editorial Notes & Sources

Reviewed and updated April 14, 2026 · Prepared by GetHealthyCalculators Editorial Team

This article is written for educational purposes, aligned with evidence-based guidance, and reviewed against the cited sources below before publication or update.

References

  • Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed · Drake et al., Journal of Clinical Sleep Medicine (2013)
  • Clinical practice guideline for sleep disorders · American Academy of Sleep Medicine
  • Caffeine pharmacokinetics · National Institutes of Health
  • Caffeine and Health · U.S. Food and Drug Administration