Skip to main content

Caffeine Half-Life Calculator

Track caffeine levels in your body and find the best time to stop drinking coffee.

Last Updated: June 24, 2026
3 min read

Caffeine Details

Coffee ~95 mg/cup · Espresso ~63 mg/shot · Tea ~47 mg/cup · Energy drink ~80 mg/can

How It Works

Caffeine follows exponential decay: remaining = intake × 0.5^(t / half‑life). The half-life varies by genetics, liver enzymes (CYP1A2), pregnancy, and medications.

Caffeine Remaining Now

mg

Enter caffeine intake and times to see your caffeine curve

The Caffeine Half-Life Calculator models how caffeine concentration in your bloodstream declines over time after consumption and identifies your ideal coffee cutoff time to prevent sleep disruption. Caffeine has an average half-life of 5–6 hours, meaning it takes that long for the level in your blood to drop by half. With a typical half-life, a cup of coffee consumed at 3 PM still has significant caffeine activity by bedtime at 10 PM.

How to Use This Calculator

  1. Enter the amount of caffeine consumed in milligrams (standard coffee: ~95 mg; espresso shot: ~63 mg; energy drink: 80–160 mg).
  2. Enter the time of consumption.
  3. Enter your target bedtime.
  4. Optionally select your metabolism speed — fast metabolizers clear caffeine in 3–4 hours; slow metabolizers (CYP1A2 gene variants) may take 8–10 hours.
  5. Click Calculate to see caffeine level at bedtime and your ideal last coffee time.

What This Calculator Measures

This calculator models blood caffeine concentration over time and identifies the optimal caffeine cutoff time.

  • Half-life: The time for caffeine concentration to fall by 50% — average 5–6 hours.
  • Caffeine at bedtime: Estimated mg still active when you plan to sleep.
  • Cutoff time: The latest time to consume caffeine so that less than 25 mg (negligible effect) remains at bedtime.
  • Metabolism type: Genetic variations in CYP1A2 enzyme significantly affect clearance rate.

Formula or Logic

Caffeine remaining (mg) = Initial dose × (0.5)^(hours elapsed ÷ half-life). For a 5.5-hour half-life: Remaining at time T = Dose × (0.5)^(T/5.5). Cutoff time = Bedtime − half-lives needed to reduce to < 25 mg. For 200 mg caffeine at a 5.5-hour half-life to reach < 25 mg: needs 3 half-lives (16.5 hours), so cutoff is 16.5 hours before bedtime.

Example Calculations

Example 1: 200 mg (2 cups coffee) at 2:00 PM, bedtime 10:00 PM. Time elapsed = 8 hours. Remaining = 200 × (0.5)^(8/5.5) = 200 × 0.36 = ~72 mg still active at bedtime — enough to delay sleep onset.

Example 2: 95 mg (1 cup) at 1:00 PM, bedtime 10:00 PM, normal metabolizer. Remaining = 95 × (0.5)^(9/5.5) = 95 × 0.32 = ~30 mg — close to negligible threshold.

Understanding Your Results

Most sleep experts recommend consuming less than 50 mg of caffeine (about half a cup of coffee) in the 6 hours before bedtime. For slow metabolizers, this window extends to 10–12 hours. Even if you feel you can fall asleep with caffeine in your system, it reduces deep (slow-wave) sleep quality measurably.

Common Mistakes to Avoid

  • Overlooking hidden caffeine sources: chocolate, pre-workout supplements, some medications, and green tea all contribute.
  • Assuming caffeine tolerance means it no longer affects sleep — tolerance develops to alertness effects but sleep disruption often persists.
  • Setting a hard cutoff at 2:00 PM without considering your individual metabolism speed or usual bedtime.
  • Drinking a large late-afternoon energy drink assuming the caffeine fully clears by midnight — it often does not.