Caffeine Half-Life Calculator

Updated June 2026

Log what you drank and when, and see roughly how much caffeine is still in your body now and at bedtime — plus the latest time you could grab a typical coffee. Everything runs privately in your browser. Informational only, not medical advice.

Caffeine has an average half-life of about 5 hours, so roughly half is still in your body 5 hours after a drink and about a quarter after 10 hours. To protect sleep, many people stop caffeine 8–10 hours before bed. Individual half-life varies (about 4–6 hours, longer in pregnancy or with some medications).
h
Individual half-life varies (~4–6h, longer in pregnancy or with some meds). Informational only.
Used to estimate caffeine in your body right now.
Add each drink and the time you had it. Pick "Custom…" to enter your own mg.
Caffeine at bedtime 0 mg
Total consumed
0 mg
In body now
0 mg
Last coffee by
Half-life used
5 h

Disclosure: the link below is a partner link. If you buy through it we may earn a commission, at no extra cost to you. This tool is informational only and not medical advice.

😴

Wind down better tonight

Sleep masks, blackout shades, magnesium and focus aids that help when you've had one cup too many.

Shop sleep & focus aids →

How caffeine leaves your body

Caffeine is cleared from your bloodstream at a roughly exponential rate, described by its half-life — the time it takes for the amount in your body to fall by half. On average that's around 5 hours, so a 200 mg dose drops to about 100 mg after 5 hours, 50 mg after 10 hours, and so on.

This calculator models the remaining caffeine from a single drink as:

remaining = amount × 0.5((t − tconsumed) ÷ half-life)
and simply adds up every drink you logged. It's a simplified average — real life is messier.

Individual half-life varies a lot, commonly between 4 and 6 hours. It tends to be longer during pregnancy, with certain medications (for example some oral contraceptives), and with reduced liver function; it can be shorter in heavy smokers. Because of this variation, treat the numbers here as a rough guide, not a precise reading.

Timing coffee for better sleep

Even when you fall asleep fine, leftover caffeine can lighten and fragment your sleep. A common approach is to stop caffeine several hours before bed so the amount remaining at bedtime is low. Use the target at bedtime setting to pick how strict you want to be, then check the last coffee by time the tool calculates.

That last-coffee time solves for when a typical 95 mg coffee would decay to your chosen threshold by bedtime: t = bedtime − half-life × log₂(95 ÷ threshold). If you're caffeine-sensitive, aim for the stricter targets and an earlier cutoff.

Frequently asked questions

How long does caffeine stay in your system?
With an average half-life of about 5 hours, roughly half clears every 5 hours. After about 5 half-lives (around a day) very little is left — but your personal rate can be anywhere from 4 to 6 hours, and longer in pregnancy or with some medications.
What is caffeine's half-life?
Half-life is the time it takes for the amount of caffeine in your body to drop by half. On average it's about 5 hours, so 200 mg falls to roughly 100 mg after 5 hours and about 50 mg after 10 hours.
When should I stop drinking coffee before bed?
A common rule of thumb is to stop 8–10 hours before bed, though some people are fine with 6 hours and others need longer. It depends on your dose, your half-life and how sensitive you are; the "last coffee by" time above estimates a cutoff so a typical cup stays under your chosen bedtime threshold.
How much caffeine is in coffee, espresso, tea and energy drinks?
Rough typical amounts: an 8 oz brewed coffee has about 95 mg, a single espresso shot about 63 mg, black tea about 47 mg, green tea about 28 mg, and an 8 oz energy drink about 80 mg. See the table below for more, and note that values vary widely by brand and preparation.
Does caffeine affect everyone the same?
No. Genetics, pregnancy, some medications and your built-up tolerance all change how quickly you clear caffeine and how strongly you feel it. Two people drinking the same coffee can have very different responses.
How much caffeine is safe per day?
For most healthy adults, the U.S. FDA cites up to about 400 mg per day as an amount not generally associated with negative effects. This is general information, not a personal recommendation — needs and tolerances differ.
Is this medical advice?
No. This is an informational tool using a simplified average model. It is not medical advice, and individual responses vary — consult a qualified healthcare professional for guidance specific to you.

Caffeine in common drinks

DrinkTypical caffeine
Brewed coffee (8 oz)~95 mg
Espresso (1 shot)~63 mg
Cold brew (16 oz)~200 mg
Black tea~47 mg
Green tea~28 mg
Cola (12 oz)~34 mg
Energy drink (8 oz)~80 mg

These are typical values that vary by brand and preparation.

More free tools from larely

PennyPath

Free, private personal-finance calculators: compound interest, loans, mortgage payoff,…

Golden Hour Calculator

Sunrise, sunset, golden & blue hour and moon phase for any location and date — for phot…

Schengen 90/180 Calculator

Track your Schengen days and see how long you can stay under the 90/180-day rule.

BTU Calculator

Find the right AC or heater size for any room by area, climate, sun and occupants.

Planting Calendar

Frost dates and a vegetable planting calendar by USDA hardiness zone.

Catering Calculator

How much food, non-alcoholic drinks, ice and cake to serve for any number of party guests.

Size Converter

Convert shoe, clothing and ring sizes between US, EU, UK and more.

Business Days Calculator

Count business days between dates or add working days, excluding weekends and public ho…

Final Grade Calculator

Find the grade you need on the final, plus weighted-grade and GPA calculators.

Road Trip Cost Calculator

Estimate road-trip fuel cost and compare gas vs EV, split among travelers.