Skip to content
24zdorovie
Sleep & Recovery

Caffeine Calculator: How Long Will Caffeine Keep You Awake?

Enter your dose and bedtime to see how much caffeine is still in your body when you lie down, and the latest hour you can drink it. Calibrated to a 2023 meta-analysis.

Updated: July 31, 2026 · 🔒 Your data never leaves your browser

For a standard 5-hour half-life, 200 mg of caffeine — a large coffee, a double espresso or two energy drinks — needs about 13 to 14 hours to fall below the level at which studies can still detect an effect on sleep. Drunk at 2 pm, it is still working at midnight.

mg

Or pick a drink

Still in your body at bedtime

57 mg29% of the dose you drank · 9 h after drinking it

What this means: Enough to delay sleep onset and cut slow-wave sleep. Even if you fall asleep quickly, the architecture of your sleep changes.

How the level falls

14:00 · drink23:00 · bed

Half-life. Half the dose is gone by 19:00, and a quarter is still there at 00:00.

Your cut-off for this dose

To be under 30 mg by bedtime, this dose needs to be finished by 09:19 — 13.7 h before sleep. You are already past that time.

These are averages. Real clearance depends on your CYP1A2 genotype, medication and liver health, and varies several-fold between people.

The model behind the number

Caffeine is almost completely absorbed from the gut, peaks in the blood 30 to 60 minutes after you drink it, and is then cleared at a constant proportional rate. That last property is what makes the arithmetic simple: every half-life, whatever is left gets halved again.

The calculator uses the standard one-compartment decay:

Remaining = dose × 0.5 ^ (hours ÷ half-life)

At a 5-hour half-life, 200 mg becomes 100 mg after five hours, 50 mg after ten, and 25 mg after fifteen. There is no point at which caffeine abruptly "wears off" — the phrase describes the moment you stop noticing it, which arrives long before the molecule is gone.

Why 30 mg is the cut-off

Most caffeine calculators pick a threshold that sounds sensible and never justify it. This one derives it.

The 2023 meta-analysis by Gardiner and colleagues pooled controlled trials to answer a practical question: how many hours before bed does a given dose need to be taken so that sleep is not measurably affected? Two of their answers are 8.8 hours for 100 mg and 13.2 hours for 217 mg.

Put both through the decay equation with a 5-hour half-life and you get the amount still circulating at those cut-offs:

DosePublished cut-offStill in the body at that point
100 mg8.8 h before bed29.5 mg
217 mg13.2 h before bed34.8 mg
Both empirical cut-offs land on the same residual amount

Two very different doses and two very different cut-off times converge on roughly 30 mg. That is the threshold the calculator uses, which is why its answers track the published guidance instead of competing with it.

What changes your half-life

The five-hour figure is a population average that hides a very wide spread. The reported range in healthy adults is 2 to 10 hours, and the main driver is the CYP1A2 gene, which controls the liver enzyme responsible for about 95% of caffeine clearance.

  • Smoking induces that same enzyme and cuts the half-life to roughly 3 hours. Quitting reverses it within about a week — which is one reason newly ex-smokers often feel jittery on their usual coffee.
  • Combined hormonal contraceptives inhibit it, roughly doubling the half-life to around 7–10 hours.
  • Pregnancy slows clearance progressively; by the third trimester half-lives above 15 hours have been recorded.
  • Liver disease and some medications — including certain antibiotics and antidepressants — extend it further.

Читайте также: Caffeine and Sleep: When to Stop Drinking Coffee

The 200 mg question specifically

"How long will 200 mg keep me awake" is the most common version of this question, and it deserves a precise answer, because the honest one is not the one people expect.

At a 5-hour half-life, 200 mg falls below 30 mg after 13.7 hours. Drink it at 2 pm and it is still above the threshold at midnight. Drink it at 9 am and you are clear by around 10:45 pm.

But "keep you awake" is the wrong frame. You will very likely fall asleep. The 2013 study by Drake and colleagues gave people 400 mg at bedtime, three hours before bed and six hours before bed, and measured sleep objectively. All three conditions disrupted sleep — including the dose taken six hours ahead, which participants did not perceive as having any effect at all. What caffeine takes from you at that distance is not consciousness. It is deep sleep.

What the calculator does not know

It does not know your genotype, so the half-life you pick is a category rather than a measurement. It does not model tolerance, adenosine receptor upregulation, or the interaction with alcohol. It assumes a single dose rather than a day of sipping — for several drinks, add up the doses and use the time of the last one, which slightly understates the total.

And it says nothing about whether caffeine is a problem for you. If you sleep seven to eight hours, wake unprompted and function without a morning dose to feel normal, the number in this calculator is a curiosity. If you need coffee to start and cannot switch off at night, it is the loop worth breaking — and moving the cut-off earlier is the cheapest intervention available.

FAQ

How long will 200 mg of caffeine keep you awake?+

Around 13–14 hours for a typical adult. After 5 hours you still have 100 mg on board — a full cup of coffee's worth — and after 10 hours, 50 mg. The 2023 meta-analysis by Gardiner and colleagues found that doses of 217 mg needed to be taken 13.2 hours before bed to avoid measurable disruption to sleep. That does not mean you lie awake for 13 hours; it means the dose is still shortening your deep sleep at the point you go to bed.

Is caffeine's half-life really 5 hours?+

Five hours is the population average, not your number. The reported range in healthy adults is 2 to 10 hours, driven mostly by the CYP1A2 gene. Smoking nearly halves the half-life, hormonal contraceptives roughly double it, and by the third trimester of pregnancy it can exceed 15 hours. The calculator lets you pick the closest profile, but only a genuine test would give you your own figure.

Where does the 30 mg threshold come from?+

It is reverse-engineered from the evidence rather than picked by feel. The 2023 meta-analysis puts the practical cut-off at 8.8 hours for 100 mg and 13.2 hours for 217 mg. Run both through a 5-hour half-life and the amount left at bedtime is 29.5 mg and 34.8 mg — essentially the same number. So a single 30 mg threshold reproduces both published cut-offs.

I sleep fine after an evening coffee. Does that mean it does not affect me?+

It means it does not affect how quickly you fall asleep, which is the one part of sleep you can actually perceive. Controlled studies consistently show reduced slow-wave sleep and lower delta power in people who report no difference at all. Your sense of how you slept is a poor instrument for measuring how you slept.

How much caffeine is safe in a day?+

EFSA considers up to 400 mg a day safe for healthy adults, and up to 200 mg in a single dose. During pregnancy and breastfeeding the limit is 200 mg a day in total. For children and adolescents the reference point is roughly 3 mg per kg of body weight.

Does the calculator account for tolerance?+

No, and no calculator honestly can. Tolerance to the alerting effect develops within days, but tolerance to the sleep-disrupting effect is much less complete — which is why habitual drinkers still show measurably worse sleep architecture. Assume the pharmacokinetics apply to you regardless of how many years you have been drinking coffee.

References

  1. 1.Gardiner C, et al. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 2023
  2. 2.EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine. EFSA Journal, 2015
  3. 3.Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 2013
  4. 4.Nehlig A. Interindividual Differences in Caffeine Metabolism and Factors Driving Caffeine Consumption. Pharmacological Reviews, 2018
  5. 5.Institute of Medicine. Caffeine for the Sustainment of Mental Task Performance: pharmacology of caffeine
Share:TelegramWhatsAppXVK

Related reading

A cup of coffee on a table
Sleep & Recovery

Caffeine and Sleep: When to Stop Drinking Coffee

How caffeine really works: adenosine blockade, half-life and CYP1A2 genetics, EFSA safe limits, and the evidence-based cut-off time from a 2023 meta-analysis.

13 min read
A made bed in morning light
Sleep & Recovery

Sleep Hygiene: 12 Rules That Actually Work

Sleep hygiene rules sorted by strength of evidence: what genuinely improves sleep, what is oversold, and why chronic insomnia needs CBT-I instead.

13 min read
A dark bedroom at night
Sleep & Recovery

Insomnia: What to Try Before Reaching for Pills

How chronic insomnia is diagnosed, why your compensations keep it going, and what CBT-I involves — the first-line treatment recommended by the AASM and the ACP.

19 min read

More tools