Caffeine half-life
How much caffeine is still in you at bedtime, and when it wears off.
Educational only — caffeine metabolism varies severalfold between people.
5 hours is typical; range is 2–10
13% of the dose remains — unlikely to affect sleep much.
Around 13:00
Effectively cleared
24 hours from your drink. The dashed horizontal line is 50 mg; the vertical line is bedtime.
How it works
Caffeine clears by first-order kinetics: a constant fraction is removed per unit time, not a constant amount. That produces exponential decay, so each half-life halves whatever is left.
remaining = dose × 0.5^(hours / half-life) Why an afternoon coffee reaches midnight
With a 5-hour half-life, a 95 mg coffee at 3pm still leaves about 24 mg at 11pm and 12 mg at 4am. Controlled studies have found measurable sleep disruption from caffeine taken six hours before bed even when people report no subjective effect — the disruption shows up in sleep architecture rather than in how long it takes to fall asleep.
Tolerance is not clearance
Regular drinkers feel less of a jolt, but the caffeine is still present and still acting on adenosine receptors while you sleep. “Coffee doesn't affect me” usually means the alerting effect has faded, not the pharmacology.
Daily limits
The EFSA and FDA both put 400 mg a day as generally safe for healthy adults, and 200 mg in a single dose. Pregnancy guidance is 200 mg a day total. Roughly four cups of brewed coffee reaches the daily figure.
Sources
Caffeine content figures from USDA FoodData Central and manufacturer disclosures; brewed coffee varies widely with method and bean. Safety thresholds from the EFSA Scientific Opinion on Caffeine (2015) and FDA guidance. Sleep-latency findings from Drake C et al., Journal of Clinical Sleep Medicine, 2013.