EVIDENCE-BASED • FREE

Caffeine Half-LifeCalculator

Estimate how much caffeine is still in your system at bedtime, find your personal caffeine cutoff time, and see a step-by-step decay timeline — so you can enjoy your daily coffee without sacrificing deep sleep.

Your details

Caffeine & Sleep
mg
Metabolizer speed

Not sure? Average (5-hour half-life) fits most adults. Slow metabolizers carry caffeine much longer.

Free, instant, and nothing is stored.

Your caffeine clearance timeline will appear here

Pick a caffeine source, set the time you consumed it and your target bedtime, then choose your metabolizer speed — we will project the caffeine remaining at bedtime and your recommended cutoff time.

The complete guide

Caffeine Half-Life Calculator: Time Your Cutoff to Protect Deep Sleep

It is 3:00 PM and the afternoon slump hits hard, so you grab an iced coffee on the way back to your desk. Or you swing by the gym on the way home from work and mix a pre-workout scoop into your shaker at 6:30 PM to fuel a heavy session. Either way, by 11:00 PM you are in bed, eyes shut, legs restless, mind quietly spinning — unable to drop into the deep, heavy sleep your body needs. You assume it is stress, or a warm room, or one too many thoughts. Almost certainly it is the caffeine. Half of that 3:00 PM dose is still circulating in your bloodstream at bedtime, and a late pre-workout leaves even more.

Caffeine does not leave your body on a tidy countdown. It follows an exponential clearance curve, halving every few hours and leaving active traces that quietly block the sleep signals your brain relies on. The Fitlydoo Caffeine Half-Life calculator above turns that curve into a concrete number — the milligrams still in your system at bedtime, the latest safe time to consume caffeine, and a step-by-step decay timeline — so you can enjoy daily caffeine without trading away slow-wave sleep.

The Science and Math Behind the Calculator

Caffeine works by impersonating adenosine. Throughout the day, your brain produces adenosine as a by-product of energy use, and it binds to adenosine receptors to build sleep pressure — the heaviness that tells you it is time to rest. Caffeine is structurally similar enough to dock onto those same receptors without activating them, acting as an adenosine antagonist. The sleep pressure keeps accumulating, but the receptors cannot report it, so you feel alert long past the point your body actually needs recovery.

The rate at which your liver clears caffeine is described by its half-life (t½) — the time required for half the dose to be eliminated. A related concept, the quarter-life (t¼), is the time to clear three-quarters of the dose, or two half-lives. For an average adult the half-life is roughly 5 hours, so 50% remains at 5 hours, 25% at 10 hours, and about 12.5% at 15 hours. Clearance follows exponential decay, captured by the formula:

C(t) = C0 × (0.5)t / h

t = Tbedtime − Tintake

Here C(t) is the caffeine remaining after t hours, C₀ is the initial dose, and h is the half-life. The calculator solves this equation for your specific intake time, bedtime, and metabolizer speed, then works backwards to find the latest intake that keeps bedtime caffeine under 25 mg — the threshold at which adenosine receptor disruption is minimised.

How to Use the Calculator and Read Your Results

Start by tallying your real daily intake. A single cup of coffee is not always 95 mg — a 16 oz café pour can run 200 mg or more, and a pre-workout scoop varies by brand. Read the label or check the nutrition data for each source you consume in a day, then enter the milligrams for the dose you want to evaluate. If you drink multiple servings, run the calculator on the latest one, since the final dose of the day has the most time to interfere with sleep.

Next, set your actual consumption time and a realistic target bedtime, then pick a metabolizer speed. Default to Average unless you know you are sensitive to caffeine — you lie awake for hours after an afternoon coffee, or a single morning cup still feels active at night — in which case choose Slow. The table below shows how the same tool plays out across four common profiles.

ProfileIntakeTime / BedtimeMetabolizerRemaining at bedCutoff adjustment
Morning coffee drinker95 mg7:30 AM / 11:00 PMAverage (5 h)~3 mgNo change — well within safe range.
Afternoon espresso lover63 mg4:00 PM / 11:00 PMAverage (5 h)~28 mgShift espresso to before 3:00 PM.
Late-day gym goer (pre-workout)250 mg6:30 PM / 11:00 PMAverage (5 h)~89 mgMove pre-workout to before 1:00 PM or use a low-stim scoop.
Slow caffeine metabolizer95 mg2:00 PM / 11:00 PMSlow (7 h)~37 mgCut off all caffeine by noon.

Expert Nuance and the Tool’s Limits

Caffeine half-life is not a fixed constant — it swings widely with biology. The CYP1A2 gene produces the liver enzyme that metabolises roughly 95% of caffeine, and common variants split the population into fast, slow, and intermediate metabolizers. Oral contraceptives and pregnancy can double the half-life by competitively inhibiting that enzyme, pushing clearance to 10–15 hours in the third trimester. Smoking accelerates clearance by inducing CYP1A2, so smokers may clear caffeine in 2–3 hours but lose that speed quickly after quitting. Liver disease, certain antibiotics, and cardiovascular medications further shift the curve.

The more important distinction is between falling asleep and sleeping well. Sleep latency — how quickly you drift off — is only the first checkpoint. Caffeine’s adenosine blockade suppresses slow-wave deep sleep and fragments REM even when you fall asleep on time, so you can spend eight hours in bed and still wake under-recovered. Feeling sleepy is not proof that caffeine has cleared; it only means the sleep pressure finally overpowered the blockade. That is why the calculator flags anything above 25 mg at bedtime as a sleep-architecture risk, not just a sleep-onset risk.

Frequently Asked Questions

What is the average half-life of caffeine?

In healthy, non-pregnant adults the average caffeine half-life is roughly 5 hours, meaning half the dose is cleared in that window. The full range in the research literature spans about 3 to 7 hours, and it can stretch to 10–15 hours during pregnancy or with certain medications. The calculator defaults to a 5-hour average half-life and lets you toggle a slow (7-hour), average (5-hour), or fast (3-hour) clearance rate to bracket your likely range.

Why can I fall asleep after drinking coffee but still wake up tired?

Falling asleep measures sleep latency, not sleep quality. Caffeine is an adenosine antagonist, so even when you drift off, residual caffeine continues to suppress slow-wave (deep) sleep and fragment REM across the night. You may close your eyes on time yet spend less time in the restorative stages that repair muscle, consolidate memory, and regulate hormones — leaving you groggy and under-recovered the next morning despite a full night in bed.

How many hours before bed should I stop consuming caffeine?

A practical rule is to set a caffeine curfew 8–10 hours before your target bedtime. For an 11:00 PM bedtime, that means no caffeine after 1:00–3:00 PM. The calculator gives a personalised cutoff by solving for the latest intake time that leaves under 25 mg circulating at bedtime — the threshold below which adenosine receptor disruption is minimised. Slow metabolizers and anyone taking oral contraceptives should push that curfew earlier.

Does pre-workout affect sleep worse than coffee?

Often, yes — but because of dose, not chemistry. A typical pre-workout scoop delivers 200–300 mg of caffeine, two to three times a standard cup of coffee, and it is usually taken in the late afternoon or early evening to fuel a post-work session. That larger dose combined with a later consumption time leaves far more caffeine active at bedtime. The molecule itself is identical; the sleep impact scales with milligrams consumed and hours until sleep.

How long does caffeine stay in your system?

Caffeine follows exponential decay, so it never clears at a fixed hourly rate. After one half-life (about 5 hours) 50% remains, after two half-lives 25% remains, and it takes roughly 4–6 half-lives — about 20–30 hours for an average metabolizer — to drop below detectable levels. A 200 mg dose at 3:00 PM still leaves around 25 mg circulating at 11:00 PM for an average metabolizer, and considerably more for a slow one.

Your 3-Step Caffeine Timing Blueprint

  1. 1

    Set a firm caffeine curfew 8–10 hours before bed

    Use the calculator’s recommended cutoff for your bedtime and metabolizer speed. For an 11:00 PM bedtime on an average half-life, that means no caffeine after roughly 1:00–3:00 PM.

  2. 2

    Switch to decaf or herbal alternatives past 2:00 PM

    If you want the ritual of an afternoon drink, choose decaf coffee, herbal tea, or sparkling water. Even a “half-caf” at 4:00 PM can leave 20–30 mg active at bedtime for a slow metabolizer.

  3. 3

    Reserve high-dose pre-workouts for morning or early afternoon

    A 250 mg pre-workout taken at 6:30 PM leaves nearly 90 mg circulating at 11:00 PM. Save stimulant-heavy scoops for sessions before 1:00 PM, or use a low-caffeine formula for evening training.

Health & medical disclaimer: This article and the Caffeine Half-Life calculator are provided for educational and fitness purposes only. They are not a substitute for professional medical advice, diagnosis, or treatment. The half-life model uses population averages and does not account for individual genetic variation, pregnancy, medications, or underlying health conditions. Consult a qualified healthcare provider if you experience chronic sleep issues, anxiety, or cardiovascular sensitivity to stimulants.

Stay Updated

Receive new calculators, wellness tips, and health articles delivered to your inbox.

Optional. We respect your privacy.