Clara Bennett, CQI Q Grader, SCA Roaster · Last reviewed August 3, 2026

Caffeine Half-Life Calculator

Enter what you drank, when you drank it, and how fast you clear caffeine. See the whole decay curve, the exact clock time it drops below a sleep-safe level, and how much is still in you at bedtime. No signup, no ads.

Caffeine half-life calculator: enter the caffeine you had, when you had it, and your metabolism, and see exactly how it leaves your body hour by hour and when it drops low enough to sleep.

Coffee

Tea

Energy & soda

mg to add

Tap what you drank and your caffeine's decay curve — when it drops below the sleep line, and how much is left at bedtime — appears here.

Educational estimate, not medical advice. Caffeine clearance varies widely person to person — these numbers use population averages for half-life. If you're pregnant, on medication, or have a heart or liver condition, talk to your doctor about your own clearance. Reviewed by Clara Bennett, CQI Q Grader.

How to use this caffeine half-life calculator

  1. Tap what you drank. Every tap adds one serving — the badge counts them. Tapped one too many? Right-click (or long-press on mobile) to remove one. Something not on the grid? Type its milligrams into the "something else" box.
  2. Set when you had it. It defaults to right now, so the clock times are real. Change it if your last cup was earlier.
  3. Add your bedtime (optional). The tool then tells you exactly how much caffeine is still on board when your head hits the pillow.
  4. Pick your metabolism. Your half-life isn't a fixed 5 hours — smoking roughly halves it, the pill and pregnancy stretch it out. Choose the profile that fits, or enter your own half-life.
  5. Read the schedule. The curve, the sleep-safe clock time, and the half-life table (50% → 99% gone) all update live. Copy it, share a link that reopens your exact result, or download a one-page PDF. No Calculate button.

Why this half-life calculator is different

Most "how long does caffeine last" pages hand you a single number and a flat 5-hour half-life. This one is built around the fact that your half-life is the whole story:

  • It personalizes your actual half-life. Smokers clear caffeine in about 3.5 hours; on the birth-control pill it stretches to roughly 8; in pregnancy it can reach 11 or more. Pick your profile — or type your own — and the entire curve redraws.
  • It answers in clock time, not just "hours." "Sleep-safe in 8 hours" is abstract. "Under the sleep line by 11:42 PM" is a decision you can act on tonight.
  • It shows the full elimination schedule. A table of when you're 50%, 75%, 90%, 95% and 99% cleared — with the milligrams left and the clock time at each step. No other tool ships this.
  • It puts a number on your bedtime. Enter when you sleep and it tells you exactly how many milligrams are still working — the thing that actually decides whether that afternoon cup costs you sleep.
  • It's shareable, printable, and embeddable — with the math cited below and a fixture test that runs on every build so the numbers can't quietly drift.

How it works (the math)

Caffeine leaves your body by first-order (exponential) elimination — a fixed fraction clears each hour, set by its half-life:

caffeine_remaining(t) = dose_mg x 0.5 ^ (t / half_life)
time to a residual X   = half_life x log2(dose / X)
time to eliminate f    = half_life x log2( 1 / (1 - f) )

A half-life is simply the time it takes to clear half of what's in you. On a typical 5-hour half-life, a 200 mg cold brew is ~100 mg five hours later, ~50 mg after ten, and effectively cleared (under ~10 mg) at about 22 hours. Because the schedule times only depend on the half-life — not the dose — 50% is always gone in one half-life, 75% in two, and 99% in about 6.6. The tool uses a sleep-safe residual of 50 mg and treats under 10 mg as effectively cleared.

The half-life presets come from published pharmacokinetics. The healthy-adult mean is about 5 hours (the literature range is 1.5–9.5). Smoking induces the CYP1A2 enzyme that breaks caffeine down, roughly halving the half-life to ~3.5 hours; estrogen in oral contraceptives roughly doubles it to ~8; and pregnancy slows it progressively, reaching 11 hours or more in the second and third trimesters. Limitation: this models a single dose clearing from its peak, so it's a sensible estimate rather than a per-sip pharmacokinetic model, and it can't know your personal genetics.

Three worked examples

A 3 p.m. cold brew, average adult

A 16 oz cold brew is about 200 mg. On a 5-hour half-life it falls below the 50 mg sleep line about 10 hours later — around 1 a.m. If you go to bed at 11 p.m., roughly 66 mg is still on board — above the sleep-safe line, which is why a mid-afternoon cold brew is the classic sleep-wrecker. Sizing the batch down helps; our cold brew ratio calculator makes a smaller, lower-dose jar easy.

An evening espresso, but you're a smoker

A double espresso is about 126 mg. On a smoker's faster ~3.5-hour half-life it's under the sleep line in roughly 4.6 hours and effectively gone in about 12 — noticeably quicker than the ~6.4 hours a non-smoker would wait. Same cup, very different night, purely because of how fast you metabolize it.

Two morning cups in pregnancy

In pregnancy the half-life can stretch to ~11 hours, so caffeine lingers far longer than the pre-pregnancy norm. Two 8 oz mugs (~190 mg) taken in the morning are still around 148 mg four hours later, and don't reach the sleep-safe line until well into the next day. If you're expecting, our note on how much caffeine is in espresso breaks down exactly where the milligrams come from, and our caffeine intake calculator checks your daily total against the 200 mg pregnancy limit.

Frequently asked questions

What is the half-life of caffeine?

In a typical healthy adult, caffeine's half-life is about 5 hours — meaning half of a dose is gone in 5 hours, three-quarters in 10, and it's effectively cleared (under ~10 mg) after roughly 4–5 half-lives, often 20 to 25 hours for a large dose. The published range is wide, about 1.5 to 9.5 hours, because clearance is highly individual.

How long does caffeine stay in your system?

Long enough to matter for sleep. On a 5-hour half-life a 200 mg cold brew is only halved after 5 hours and still around 50 mg at 10 hours. It's "effectively cleared" — under about 10 mg — after roughly 22 hours. That's why the residual at bedtime, not the total you drank, is what the calculator above highlights.

What makes caffeine's half-life longer or shorter?

The liver enzyme CYP1A2 does most of the work, and anything that speeds it up or slows it down changes your half-life. Smoking speeds it up (roughly halves the half-life). Oral contraceptives and pregnancy slow it down dramatically (roughly double it, or more). Some medications and liver conditions extend it further. The metabolism selector in the tool lets you pick the profile that fits, or enter a half-life your doctor has told you.

When should I stop drinking coffee before bed?

A useful rule is to be under about 50 mg of residual caffeine by the time you sleep. On a 5-hour half-life, a single 95 mg mug takes about 4–5 hours to fall under 50 mg; a 200 mg cold brew takes closer to 10. Set your bedtime in the calculator and it returns your personal cut-off time — the clock time your last cup should be before, given how fast you clear it.

Does decaf have caffeine, and does it affect this?

Decaf isn't caffeine-free — an 8 oz cup has roughly 2–5 mg, versus about 95 for regular. That's far below the 50 mg sleep line on its own, so an evening decaf is a genuine way to cut the residual that keeps you up. Brewing half-caf later in the day is another lever; see our best coffee beans picks for everyday beans that work well diluted.

Managing when caffeine clears is mostly about managing the dose and when you take it. Three things make that easier:

  • A single-serve maker brews exactly one cup, so there's no half-carafe nudging you toward a late refill. Our best single-serve coffee makers roundup covers the pod and ground options.
  • Beans you can dial down. Brewing half-caf, or switching to a lighter afternoon cup, keeps the evening residual under the sleep line — see our best coffee beans picks.
  • A consistent brewer. When every mug is the same strength, you actually know the dose you're timing; our best drip coffee makers guide covers the machines that hold their recipe.

Sources & methodology

Elimination is modeled as first-order decay, C(t) = dose × 0.5^(t/half-life), with half-life presets of 5 h (typical adult), 3.5 h (smoker), 8 h (oral contraceptives) and 11 h (pregnancy), consistent with the published 1.5–9.5 h range. Sleep-safe residual 50 mg; effectively cleared at 10 mg. A fixture test asserts every worked example on every build. Educational estimate only — not medical advice. Reviewed by Clara Bennett, CQI Q Grader. About Clara · Last reviewed August 3, 2026.

Cite this page

Free to cite or link in coursework, handouts, and articles — no permission needed.

Bennett, C. (2026, August 3). Caffeine Half-Life Calculator. Brew Gazette. https://brewgazette.com/caffeine-half-life-calculator/

Embed this calculator on your site

Free for coffee blogs, wellness and sleep sites, nutrition educators, and r/Coffee, r/decaf or r/sleep posts. Required attribution is baked into the snippet — no fee, no account, no analytics attached to the embed.

<iframe
  src="https://brewgazette.com/caffeine-half-life-calculator/embed/"
  width="100%"
  height="820"
  loading="lazy"
  style="border:1px solid #E4D7C7; border-radius:16px; max-width:680px;"
  title="Caffeine Half-Life Calculator (Brew Gazette)">
</iframe>
<p style="font-size:12px;color:#6B5848;margin-top:8px">
  Caffeine half-life calculator by
  <a href="https://brewgazette.com/caffeine-half-life-calculator/">Brew Gazette</a>
  &middot; Reviewed by Clara Bennett, CQI Q Grader
</p>