TL;DR — Caffeine's half-life averages 5 hours. A 200 mg coffee at 3 PM still leaves about 50 mg circulating at 11 PM and 25 mg at 4 AM — enough to fragment sleep for many people. Cut off caffeine ~10 hours before bed for cleanest sleep.
At bedtime
—

Not medical advice. Half-life varies dramatically by individual — smokers, oral-contraceptive users, pregnancy, liver function and CYP1A2 enzyme variants can move it from 2 to 10+ hours.

Why caffeine half-life matters for sleep

Caffeine works by blocking adenosine receptors. Adenosine is a brain chemical that builds up while you're awake and creates the pressure to sleep. Blocking it doesn't remove tiredness — it masks it. When the caffeine clears, the backlog of adenosine floods the receptors at once.

The textbook half-life for caffeine in healthy adults is about 5 hours, meaning every 5 hours half of what remains is metabolized. Even at "negligible" 12–25 mg residual levels, polysomnography shows reduced deep sleep and more nighttime wake-ups for sensitive people.

Individual variation: CYP1A2

Caffeine is metabolized almost entirely by the CYP1A2 liver enzyme. Genetic variants split adults into roughly two populations:

  • Fast metabolizers — half-life around 3–4 hours. Often tolerate evening coffee without sleep disruption.
  • Slow metabolizers — half-life 6–8+ hours. A noon coffee can still affect sleep onset 12 hours later.

Other factors that lengthen half-life: oral contraceptives (nearly double it), pregnancy (up to 15 hours in third trimester), liver disease, some SSRIs. Smoking shortens half-life — quitters often need to cut their coffee intake to avoid jitters.

Recommended caffeine cutoff

A 2013 study in the Journal of Clinical Sleep Medicine tested 400 mg caffeine doses at 0, 3, and 6 hours before bed. All three doses caused measurable sleep disruption — even the 6-hour-before dose reduced total sleep by over an hour. Conservative guidance: no caffeine within 8–10 hours of bedtime, especially for slow metabolizers and people with sleep complaints.

How the formula works

Standard first-order decay: remaining = dose × 0.5^(hours / half-life). So 200 mg with a 5-hour half-life leaves 100 mg after 5 h, 50 mg after 10 h, 25 mg after 15 h. The calculator above runs this hour by hour and flags how much is still active at your chosen bedtime.

FAQ

How much caffeine is safe per day?

The FDA cites 400 mg/day as generally safe for healthy adults. Pregnant people are usually advised to stay under 200 mg/day.

Does decaf have caffeine?

Yes — typically 2–15 mg per 8 oz cup. Usually negligible for sleep unless you drink many cups late.

Why am I still tired right after coffee?

Peak blood caffeine takes 30–60 minutes. The fastest perceived lift is often partly the placebo / ritual of drinking it.

Next step

If caffeine is wrecking your sleep, rebuild your wind-down with our evidence-based sleep guide.

Read Sleep Tips → Try Sleep Cycle Calc

Frequently Asked Questions

What is caffeine's half-life?
Caffeine's half-life in healthy adults averages 5–6 hours, but ranges from 1.5 to 9.5 hours depending on genetics (CYP1A2 enzyme variation), smoking status, pregnancy, liver function, and certain medications. Oral contraceptives roughly double caffeine half-life.
How does the caffeine half-life calculator work?
Enter the dose, time consumed, and your metaboliser type. The calculator models exponential decay using your half-life estimate to show how much caffeine remains in your bloodstream over time. This helps identify your optimal caffeine cut-off time to protect sleep.
What caffeine level disrupts sleep?
Research shows caffeine levels above ~100mg in your system at bedtime meaningfully delay sleep onset and reduce slow-wave (deep) sleep. This means a typical 200mg coffee consumed 6 hours before bed still leaves ~100mg in a slow metaboliser's blood.
Why is caffeine bad for sleep even when you feel tired?
Caffeine blocks adenosine receptors rather than eliminating adenosine. Sleep pressure (adenosine) continues building while blocked. When caffeine wears off, accumulated adenosine floods receptors causing a crash. Meanwhile, caffeine-disrupted sleep architecture reduces restoration even when sleep quantity is maintained.
What is a slow vs fast caffeine metaboliser?
Fast metabolisers carry the CYP1A2*1F genetic variant and clear caffeine roughly 40% faster than slow metabolisers. Fast metabolisers have a half-life of ~3–4 hours; slow metabolisers 6–9 hours. A DNA test (23andMe or similar) can identify your type.
What is the caffeine cut-off time for 10pm sleep?
For an average 5-hour half-life metaboliser: last caffeine by 2–3pm to keep bedtime levels under 50mg. For a slow metaboliser (7-hour half-life): noon is safer. For a fast metaboliser: a 4–5pm cut-off may suffice.
How much caffeine is in common drinks?
Approximate caffeine: espresso 63mg/shot, drip coffee 95mg/cup, cold brew 100–200mg, energy drink 80–150mg, black tea 47mg, green tea 28mg, matcha 70mg, dark chocolate bar 20mg. Levels vary significantly between brands and brew methods.
Can caffeine cause anxiety?
Yes. Caffeine increases cortisol and adrenaline, and at doses above ~300mg can cause palpitations, jitteriness, and anxiety — particularly in slow metabolisers and people with anxiety disorders. Those with generalised anxiety disorder are advised to minimise or avoid caffeine.
Is caffeine tolerance real?
Yes. Regular caffeine use downregulates adenosine receptors, requiring larger doses to achieve the same alertness effect. However, tolerance to caffeine's sleep-disrupting effects is incomplete — even habitual users show measurable sleep architecture disruption from evening caffeine.
How long for a caffeine detox?
Adenosine receptor upregulation from habitual caffeine use reverses within 7–10 days of abstinence. Withdrawal symptoms (headache, fatigue, irritability) peak at 20–51 hours and resolve within 2–9 days. Tapering by 10% per day minimises withdrawal symptoms.