← Blog

Caffeine Calculator: How Long Until You Can Sleep?

April 8, 2026·7 min read

Caffeine is the world's most widely consumed stimulant. It keeps you alert, boosts focus, and enhances physical performance. But caffeine doesn't leave your body immediately — it breaks down gradually over hours.

If you struggle to fall asleep after an afternoon espresso, the math explains why. Our Caffeine Calculator shows your current caffeine level and the optimal time to sleep — based on caffeine's half-life.

What Is Caffeine Half-Life?

Half-life describes how long it takes for the body to eliminate half of a substance. For caffeine, the average is 5 hours — with individual variation between 2 and 10 hours depending on genetics, age, medications, and pregnancy.

This means: 100 mg of caffeine (roughly one cup of coffee) drops to 50 mg after 5 hours, 25 mg after 10 hours, and 12.5 mg after 15 hours. Our calculator uses 5 hours as the standard value.

Caffeine Content of Common Drinks

DrinkCaffeine
Coffee (250 ml)95 mg
Espresso (30 ml)63 mg
Double Espresso126 mg
Black Tea (240 ml)47 mg
Green Tea (240 ml)28 mg
Energy Drink (250 ml)80 mg
Cola (330 ml)34 mg

Calculate your caffeine level now

Enter today's drinks — the calculator instantly shows your current caffeine level and the optimal time to sleep.

Calculate for free now →

How Much Caffeine Is Too Much?

The FDA recommends a daily limit of 400 mg of caffeine for healthy adults — roughly 4 cups of coffee or 6 espresso shots. Exceeding this raises the risk of heart palpitations, anxiety, sleep disruption, and elevated blood pressure.

For pregnant women, the recommended limit drops to 200 mg per day. Children and teenagers should avoid caffeinated beverages.

When Does Caffeine Disrupt Sleep?

Sleep researchers recommend avoiding caffeine at least 6 hours before bedtime. At a caffeine level below 100 mg, sleep-disrupting effects are generally negligible.

Caffeine Blocks Adenosine Receptors

Adenosine is a neurotransmitter that builds up throughout the day and signals sleepiness. Caffeine blocks its receptors, suppressing fatigue — but adenosine keeps accumulating. When caffeine wears off, the built-up drowsiness hits all at once.

Deep Sleep Suffers Most

Even when caffeine doesn't prevent falling asleep, it reduces deep sleep stages. The result is less restorative sleep — even if total sleep duration seems normal.

Example: Caffeine Level Throughout the Day

Suppose you drink a coffee at 8 AM (95 mg) and an espresso at 2 PM (63 mg). Your combined caffeine level at 8 PM is:

Coffee (8 AM): 95 mg × (0.5 ^ (12/5)) = 95 × 0.193 = 18.4 mg

Espresso (2 PM): 63 mg × (0.5 ^ (6/5)) = 63 × 0.435 = 27.4 mg

Total at 8 PM: ~46 mg

At 46 mg, the caffeine level is already below the 100 mg threshold — you can sleep without trouble.

Conclusion

Caffeine decays with a half-life of ~5 hours. With our Caffeine Calculator, you can track your current level at any time, compare it against the FDA daily limit, and find out when you can safely fall asleep.