Caffeine Optimizer

Time and dose caffeine for peak performance — and protect deep sleep. Model dose timing against training, deep work windows, and bedtime to ride the half-life curve effectively.

Your Setup

5.0 hrs
What half-life should I use?

Average is around 5 hours, with substantial individual variation (typically 3–7 hours). Slow metabolizers — about half of people, based on CYP1A2 gene variants — sit closer to 6–7 hours. Fast metabolizers sit closer to 3–4. Pregnancy, oral contraceptives, and certain medications extend it; smoking shortens it. Start at 5 and adjust based on how sleep responds.

Add a Dose

No doses added yet.

Activity Windows — optional

No activity windows added.

Results

At Bedtime
mg active
Peak Level
Total Consumed
mg today
Active caffeine (stacked by dose) Bedtime Training window Deep work window
How "active caffeine" is calculated

Each dose decays exponentially: C(t) = dose × 0.5^((t − dose_time) / half_life). All active doses are summed at every time point — that's the cumulative line on the chart. Each colored band shows one dose's contribution to the total.

The model assumes near-instant absorption. In practice, blood caffeine peaks 30–60 minutes after consumption, so the chart's rising edge is slightly idealized. For bedtime planning this is conservative (errs toward overestimating residual caffeine). For dose timing, plan to consume ~30–45 minutes before the moment peak alertness is wanted.

What the sleep impact tiers mean
Bedtime caffeineTierExpected sleep impact
< 25 mgExcellentLargely cleared. Deep (slow-wave) and REM sleep unlikely to be measurably affected.
25 – 50 mgGoodMost people sleep well. Sensitive sleepers may notice slightly reduced deep sleep.
50 – 100 mgModerateResearch suggests deep sleep can be reduced ~10–20% even when sleep onset feels normal.
100 – 200 mgHighSleep onset, deep sleep, and overall quality likely measurably affected.
> 200 mgVery highSubstantial suppression of slow-wave sleep expected. Front-load and set a hard cutoff.

These thresholds are rules of thumb derived from sleep research — individual sensitivity varies. The general guideline is to stop caffeine 8–10 hours before bed to keep bedtime levels low.

Educational tool — not medical advice. This calculator uses a simplified single-compartment pharmacokinetic model. Caffeine sensitivity varies significantly with genetics, body weight, tolerance, medications, pregnancy, and other health factors. Drink reference values are population averages — actual caffeine content varies by brand, brew method, and serving size. For personalized guidance — especially when pregnant, taking medications, or managing a sleep, cardiac, or anxiety condition — consult a qualified healthcare professional.