The Science Behind the Buzz
Caffeine is the most widely used psychoactive substance on Earth, and it works by deception. All day long, a molecule called adenosine accumulates in your brain and binds to receptors that make you feel steadily more tired. Caffeine has a nearly identical shape, so it slips into those same receptors and blocks them. The "I am tired" signal is still being broadcast, you just cannot hear it. That is why caffeine does not really hand you energy. It hides your exhaustion until it wears off, at which point all that backed-up adenosine lands at once. Hello, afternoon crash.
What Half-Life Actually Means
In pharmacology, a substance's half-life is the time your body needs to clear exactly half of it. For caffeine in a healthy adult, that is roughly 5 to 6 hours, and this tool defaults to 5.7. The trap is that halving compounds slowly: - 8:00 AM: you drink a 200 milligram coffee. - 1:40 PM: 100 milligrams remain, one half-life later. - 7:20 PM: 50 milligrams remain. - 1:00 AM: 25 milligrams are still circulating.
Even once you no longer feel wired, 25 to 50 milligrams is plenty to fragment your deep sleep. That is precisely why a 3 PM coffee can wreck a night you would never consciously blame on caffeine.
How Much Caffeine Are You Actually Drinking?
Dose is half of the equation, and most people badly underestimate it. Here is the approximate caffeine content of common drinks: - Espresso, single shot, about 30 milliliters: about 63 milligrams - Drip or filter coffee, 240 milliliters: about 95 milligrams - Cold brew, 340 milliliters: about 200 milligrams - Instant coffee, 240 milliliters: about 62 milligrams - Black tea, 240 milliliters: about 47 milligrams - Green tea, 240 milliliters: about 28 milligrams - Energy drink, 250 milliliters: about 80 milligrams - Cola, 350 milliliters: about 35 milligrams - Dark chocolate, 50 grams: about 25 milligrams
A large cafe coffee is frequently two or three shots, so the cold brew you nurse across an afternoon can rival three espressos. When you use the calculator above, enter your real dose, not just "one coffee."
Are You a Fast or a Slow Metabolizer?
This is why two people can drink the identical latte and have completely different nights. The liver enzyme that breaks caffeine down, known as CYP1A2, varies enormously from person to person, partly due to genetics and partly due to lifestyle: - Smoking roughly doubles how fast you clear caffeine, resulting in a shorter half-life. - Pregnancy can triple the half-life, reaching up to 15 hours or more in the third trimester. - Oral contraceptives can roughly double the half-life. - Age and liver load generally slow clearance down. - Genetics alone sort people into fast and slow metabolizers, independent of everything else.
If a single lunchtime cup reliably keeps you up, you are probably a slow metabolizer. Move your cutoff earlier and your dose lower.
Your Personal Caffeine Curfew
The useful question is not "how much caffeine is in my mug," but rather "when must I stop to still sleep well?" A common sleep-science rule of thumb is to be under roughly 50 milligrams by bedtime. Working backwards from a 200 milligram coffee at a 5.7-hour half-life, that is about two half-lives, or roughly 11 hours before bed. For an 11 PM bedtime, your last real coffee should land around noon.
The calculator does this for you. Enter the dose and time, and it plots the decay curve so you can see the exact moment you drop back under the sleep-safe line.
How the Math Works
The model is plain exponential decay, the same equation physicists use for radioactive material.
The remaining amount equals your starting dose multiplied by 0.5 raised to the power of the hours elapsed divided by the half-life.
Your dose is your starting amount, for example, 200 milligrams. Hours is the time elapsed since you drank it. The half-life defaults to 5.7 hours, then shifts with the genetic and lifestyle factors mentioned above. Because the exponent climbs slowly, caffeine lingers far longer than the "I stopped feeling it ages ago" intuition suggests.
How Much Is Too Much?
For most healthy adults, health authorities including the U.S. FDA put the ceiling around 400 milligrams per day, which is roughly four cups of filter coffee. Pregnant people are usually advised to stay under 200 milligrams per day. Doses near 1,000 milligrams can trigger a racing heart, anxiety, and tremors. The genuinely dangerous range, around 10,000 milligrams, is effectively impossible to reach through coffee but reachable through caffeine powders and pills, which is exactly why those are risky. As always, this tool is an educational estimate, not medical advice.