SleepTools

Caffeine Cutoff Calculator

Enter your bedtime and find the latest safe time to have your last coffee, tea, or energy drink. The calculator uses caffeine half-life science and your metabolic sensitivity to show exactly how much caffeine will remain in your system at sleep time.

How caffeine affects sleep

Caffeine works by blocking adenosine receptors in the brain. Adenosine is a chemical that accumulates while you're awake, gradually increasing sleep pressure — the feeling of growing tiredness across the day. Caffeine doesn't eliminate adenosine; it blocks the receptors that detect it, masking the signal. When caffeine clears, adenosine floods back in.

This mechanism explains why caffeine impairs sleep even when it doesn't prevent you from falling asleep. A 2013 study by Drake et al. at the Henry Ford Sleep Disorders and Research Center found that caffeine consumed 6 hours before bedtime reduced total sleep by more than 1 hour — measurable on objective polysomnography — even though participants reported feeling they slept normally.

Caffeine specifically suppresses slow-wave deep sleep (N3). This is the most restorative sleep stage — critical for physical repair, immune function, growth hormone release, and long-term memory consolidation. Having caffeine in your system at bedtime doesn't just make you sleep lighter; it shortchanges the sleep stage your body most needs.

The half-life model explained

Caffeine is eliminated from the body through a predictable exponential decay process. Its half-life — the time for blood concentration to fall by half — is approximately 5–9 hours for most adults. At 7 hours (the average), you still have 50% of peak caffeine in your system after one half-life, 25% after two, and 12.5% after three.

Sleep researchers generally use 25% of peak caffeine as the threshold below which sleep disruption is minimal for most people. This calculator finds the latest time you can consume caffeine such that it will be at or below this threshold by your target bedtime.

The decay curve in the calculator shows exactly how your caffeine level drops from the cutoff point through the next 12 hours. The dashed reference line marks the 25% target.

Individual variation in caffeine metabolism

Caffeine metabolism is primarily determined by the CYP1A2 gene. Fast metabolizers (roughly 50% of the population) process caffeine with a half-life of around 5 hours and typically experience fewer sleep disruptions from afternoon coffee. Slow metabolizers have a half-life closer to 9 hours and may notice sleep disruption even from morning caffeine consumed before noon.

Several factors slow caffeine metabolism beyond genetics: oral contraceptives extend the half-life to approximately 10–12 hours; pregnancy (especially the third trimester) can extend it to 15+ hours; liver disease slows clearance significantly. Some antibiotics, particularly fluoroquinolones like ciprofloxacin, inhibit CYP1A2 and significantly slow caffeine metabolism during the course of treatment.

If you're unsure of your sensitivity, the "Normal" setting is the right starting point. Pay attention to how coffee affects your sleep quality — tracking this in the Sleep Debt Calculator over a few weeks can reveal patterns.

Common caffeine amounts by source

SourceServingCaffeine
Brewed coffee8 oz80–100mg
Espresso1 shot63mg
Latte / cappuccino8 oz63mg
Black tea8 oz40–70mg
Green tea8 oz20–45mg
Energy drink8 oz80–160mg
Cola / soda12 oz34–46mg
Decaf coffee8 oz2–15mg

Related calculators

Frequently asked questions

What time should I stop drinking coffee?

For most people (normal caffeine metabolism, 7-hour half-life), stopping caffeine 7–8 hours before bedtime leaves approximately 25% of peak caffeine at sleep time — the threshold used in sleep research. If you sleep at 11pm, this means stopping around 3–4pm. Sensitive metabolisers (9h half-life) should cut off 2 hours earlier; fast metabolisers (5h half-life) can cut off later.

How long does caffeine last in your system?

Caffeine has a half-life of approximately 5–9 hours depending on your metabolism, age, medications, and genetics. At an average half-life of 7 hours: after 7 hours, 50% remains; after 14 hours, 25% remains; after 21 hours, 12.5% remains. The target for sleep is getting below 25% of peak before bedtime, which means the recommended cutoff is about 1–2 half-lives before sleep.

Does caffeine really affect sleep quality even if I fall asleep?

Yes. Drake et al. (2013) found that caffeine consumed 6 hours before sleep reduced total sleep time by over 1 hour, even when subjects didn't have trouble falling asleep. Caffeine specifically suppresses slow-wave deep sleep (N3), which is critical for physical recovery and immune function. You may sleep but sleep quality is compromised.

What factors affect caffeine sensitivity?

The CYP1A2 gene determines how quickly your liver metabolizes caffeine. Fast metabolizers process it in about 5 hours; slow metabolizers take 9+ hours. Pregnancy significantly slows caffeine metabolism (half-life can extend to 15 hours in third trimester). Oral contraceptives, some antibiotics (particularly ciprofloxacin), and liver function also affect metabolism. Age generally slows caffeine clearance.

Is decaf actually caffeine-free?

No. Decaf coffee typically contains 2–15mg of caffeine per 8oz cup, compared to 80–100mg for regular. For most people, this is negligible. However, if you're highly sensitive to caffeine or have anxiety disorders, even decaf in the evening may have a measurable effect. The safest option within 3 hours of bed is herbal tea.

How much caffeine is in a cup of coffee?

An 8oz brewed coffee contains approximately 80–100mg of caffeine (average: 95mg). Espresso contains about 63mg per shot (but is consumed in smaller volume). Energy drinks vary widely: 80–300mg per can. Black tea: 40–70mg. Green tea: 20–45mg. The calculator includes common sources with average values based on USDA Food Data Central data.

General guidance based on published caffeine and sleep research. Not medical advice.

Get notified when new sleep calculators launch.

Free. No spam. Unsubscribe anytime.