Caffeine Half-Life Calculator

By Nico Jae · ✓ Based on published sleep research · Updated October 2026

Quick answer: Caffeine has a half-life of about 5 hours in most adults, so half of your last coffee is still in your body 5 hours later and a quarter after 10 hours. Smokers clear it faster (about 3.5 hours) and people on the birth control pill slower (about 8 hours). A 2023 meta-analysis found coffee should be finished at least 8.8 hours before bed to protect sleep. Add your drinks and bedtime below to see how much caffeine you will go to bed with, and your personal cutoff time.

Not sure? Most adults are close to average. Pregnancy slows clearance much more than this and is not modeled here.

Still in your system at bedtime 0 mg

🔒 Calculations happen in your browser. Nothing you enter is stored or sent anywhere.

How long does caffeine last?

Caffeine reaches its peak in your blood within about an hour of drinking it, and then your liver clears it on a steady curve: every half-life, the amount left falls by half. For an average adult that half-life is about 5 hours. So a 95 mg cup of coffee at noon is down to about 48 mg by 5 pm, 24 mg by 10 pm, and 12 mg by 3 am. It takes about five half-lives, roughly a day, for a dose to be almost completely gone.

How long you feel it is a different question. The alert, wired feeling fades well before the caffeine does, which is why an afternoon coffee can still cost you sleep even when you feel calm at bedtime. In sleep studies, caffeine shortens total sleep, makes it take longer to fall asleep, and reduces deep sleep, the most restorative stage. What protects deep sleep is covered in how to get more deep sleep.

Caffeine half-life chart: how much is left, hour by hour

Hours after drinking1 coffee (95 mg)Large dose (200 mg)
0 (just drunk)95 mg200 mg
2 hours72 mg152 mg
4 hours55 mg115 mg
5 hours (one half-life)48 mg100 mg
6 hours41 mg87 mg
8 hours31 mg66 mg
10 hours24 mg50 mg
12 hours18 mg38 mg
15 hours12 mg25 mg
24 hours3 mg7 mg

Calculated with an average 5-hour half-life. With a 3.5-hour half-life the numbers fall faster; with an 8-hour half-life, a 95 mg coffee still leaves about 40 mg after 10 hours.

When to stop caffeine before bed

The best evidence comes from a 2023 systematic review and meta-analysis of 24 studies. On average, caffeine cut total sleep by 45 minutes, added 9 minutes to the time it took to fall asleep, and reduced deep sleep by about 11 minutes. To avoid losing sleep, the authors calculated that a coffee (107 mg) should be finished at least 8.8 hours before bed, and a standard pre-workout supplement (217.5 mg) at least 13.2 hours before.

An earlier controlled study tested 400 mg of caffeine taken at bedtime, 3 hours before, and 6 hours before, against a placebo. All three disturbed sleep, including the dose taken 6 hours before bed, which led the researchers to recommend avoiding substantial caffeine for at least 6 hours before sleep. For most people with a 10:30 pm bedtime, that puts the last regular coffee at around 1:30 pm.

Why this calculator uses 25 mg as the line: at an average 5-hour half-life, the meta-analysis cutoffs for coffee and pre-workout both leave roughly 30 to 35 mg in your body at bedtime. We use 25 mg as a slightly cautious version of that line, so the cutoff times here run a little earlier than the bare minimum.

Caffeine in common drinks

DrinkTypical caffeineTime to fall below 25 mg*
Drip coffee (8 oz)95 mg9.6 hr
Espresso (single shot)63 mg6.7 hr
Cold brew (12 oz)155 mg13.2 hr
Black tea (8 oz)47 mg4.6 hr
Green tea (8 oz)28 mg0.8 hr
Cola (12 oz)40 mg3.4 hr
Energy drink (8.4 oz)80 mg8.4 hr
Energy drink (16 oz)160 mg13.4 hr
Pre-workout (1 scoop, 200 mg)150 – 300 mg15 hr

Typical values; brands vary widely, so check the label. *At an average 5-hour half-life. The FDA cites 400 mg a day as an amount not generally associated with negative effects in healthy adults, and a large 2017 systematic review reached the same conclusion.

What changes your caffeine half-life

Your genes

One liver enzyme, CYP1A2, handles about 95 percent of caffeine breakdown, and common genetic differences in it make some people clear caffeine much faster than others. That is why one person can sleep after an evening espresso while another is kept awake by a lunchtime cup. If late caffeine reliably wrecks your sleep, use the slow setting.

Smoking

Smoking speeds up the same enzyme. In a classic study, the average caffeine half-life was 3.5 hours in smokers and 6.0 hours in non-smokers. One practical consequence: people who quit smoking clear caffeine more slowly afterward, so the same coffee habit can start to cause jitters or poor sleep.

The birth control pill and pregnancy

Estrogen-containing birth control pills slow caffeine clearance. In one study, the half-life averaged 7.9 hours in women on the pill against 5.4 hours in matched women who were not. Pregnancy slows it further, especially later in pregnancy, which is part of why advice for pregnant women sets a lower daily limit (200 mg in ACOG guidance; a 2017 review supported up to 300 mg). This calculator does not model pregnancy.

Age, liver health and medicines

Caffeine clearance also varies with age, liver disease and a number of medicines that compete for the same enzyme. If you take regular medication and notice caffeine affects you more than it used to, ask your pharmacist whether there is an interaction.

How to protect your sleep without quitting caffeine

Keep the morning coffee and move the last one earlier. For an average metabolizer, finishing a regular coffee about 9 to 10 hours before bed brings bedtime levels under 25 mg. After lunch, switch to green tea or half-caf: at about 28 mg, green tea clears below the line in under an hour. Save pre-workout supplements for morning sessions. If you are getting enough hours but still waking tired, the sleep debt calculator shows whether you are actually short of sleep, and core sleep vs deep sleep explains what your sleep tracker is and is not telling you.

Frequently asked questions

What is the half-life of caffeine?

About 5 hours for an average healthy adult, with a wide range between people. In one study it averaged 3.5 hours in smokers and 6.0 hours in non-smokers, and in another 7.9 hours in women taking the birth control pill. Genetics, liver health, some medicines and pregnancy all change it.

How long does caffeine last?

Caffeine peaks in your blood within about an hour, and then half of it is cleared every 5 hours or so. A 95 mg coffee is down to about 48 mg after 5 hours, 24 mg after 10 hours and 3 mg after 24 hours. The alert feeling fades sooner than the caffeine itself, which is why an afternoon coffee can still affect sleep.

How long before bed should you stop drinking caffeine?

At least 8.8 hours for a regular coffee and 13.2 hours for a standard pre-workout supplement, according to a 2023 meta-analysis of 24 studies. A controlled study also found 400 mg of caffeine taken 6 hours before bed still disturbed sleep. For a 10:30 pm bedtime, that means finishing coffee by about 1:30 pm.

How long does caffeine stay in your system?

It takes about five half-lives, roughly 24 hours for an average adult, for a dose to be almost completely cleared. For sleep, what matters is how much is left at bedtime: this calculator flags anything above 25 mg, which a regular coffee drops below after about 9 to 10 hours.

How much caffeine is too much in a day?

For healthy adults, up to 400 mg a day is not generally associated with harmful effects, according to the FDA and a large 2017 systematic review. That is about four regular cups of coffee. Pregnant women are advised to stay lower, at 200 mg a day in ACOG guidance. Sensitivity varies, so less may be right for you if caffeine causes anxiety, a racing heart or poor sleep.

Related guides

GuideHow to get more deep sleep Free toolSleep debt calculator GuideCore sleep vs deep sleep Free toolsBrowse all free health tools

Sources & References

Gardiner C, et al. Sleep Medicine Reviews, 2023Meta-analysis of 24 studies: coffee 8.8 h and pre-workout 13.2 h before bedpubmed.ncbi.nlm.nih.gov
Drake C, et al. Journal of Clinical Sleep Medicine, 2013400 mg taken 0, 3 or 6 hours before bed all disturbed sleeppubmed.ncbi.nlm.nih.gov
Parsons WD, Neims AH. Clinical Pharmacology and Therapeutics, 1978Caffeine half-life 3.5 h in smokers vs 6.0 h in non-smokerspubmed.ncbi.nlm.nih.gov
Abernethy DR, Todd EL. European Journal of Clinical Pharmacology, 1985Birth control pill users: half-life 7.9 h vs 5.4 hpubmed.ncbi.nlm.nih.gov
Nehlig A. Pharmacological Reviews, 2018CYP1A2 handles 95% of caffeine; genes, age, hormones, smoking and drugs change clearancepubmed.ncbi.nlm.nih.gov
Wikoff D, et al. Food and Chemical Toxicology, 2017Systematic review: up to 400 mg/day in adults, 300 mg/day in pregnancypubmed.ncbi.nlm.nih.gov
US Food and Drug AdministrationSpilling the beans: how much caffeine is too much?fda.gov

For your safety

Estimate disclaimer: This calculator provides an educational estimate based on published average half-life values. It is not medical advice, and it does not model pregnancy, liver conditions, or medication interactions. If caffeine affects your heart rhythm, anxiety, or sleep despite an early cutoff, talk to your physician.

This content is not intended to be a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.