Caffeine Half-Life Calculator

See how much of that cup is still in your system when you try to sleep.

By the Sleep Time Calculator Editorial DeskLast updated

Preset mg values follow common USDA FoodData Central figures for a single serving.

31.3 mg
Left at bedtime
8h
Hours until bed
7:38 PM
Below 50 mg
5:38 AM
Below 12.5 mg
At bedtime you still have about 31.3 mg from this 95 mg dose (≈ 5-hour half-life). Safe window — at least 6 hours between this cup and bedtime. Sources.

These are planning estimates, not a personal pharmacokinetic measurement. Adult half-life often averages about 5 hours but ranges roughly 1.5–9.5 hours — that spread matters more than the calculator's decimal places.

How This Caffeine Half-Life Calculator Works

Enter the time of your last dose, how many milligrams it was, your bedtime, and a half-life assumption (3, 5, or 7 hours). The tool multiplies dose by 0.5^(hours ÷ half-life), reports what is left when you lie down, and marks when you cross 50 mg and 12.5 mg. It is a schedule planner, not a blood test.

What a Caffeine Half-Life Actually Means

Half-life is the time it takes for the amount of caffeine in your body to fall by half. For many adults that average is about five hours, with a published personal range of roughly 1.5 to 9.5 hours.3 After one half-life you still have half the dose; after two, a quarter. It does not mean “gone in five hours.” That misunderstanding is why a mid-afternoon coffee can still be active at lights-out even when the buzz has faded.

Absorption is relatively quick — peak blood levels often arrive within about an hour — and clearance is slower and more variable. The calculator above models only the clearance half after you pick a half-life band. If evenings leave you wired, try the 7-hour setting; if coffee barely touches you, try 3.

How Long Caffeine Stays in Your System

A practical rule of thumb: most of a dose is gone after about five half-lives. At five hours each, that is close to a full day before levels are tiny.23 The table below walks a single 95 mg cup (a common 8 oz coffee) under a five-hour half-life.

Time after 95 mgApprox. remaining
0 h95 mg
5 h≈ 48 mg
10 h≈ 24 mg
15 h≈ 12 mg
20 h≈ 6 mg

So “how long does caffeine stay in your system?” is less a single hour and more a fading curve: meaningful amounts can remain 10–15 hours later, which is exactly when many people want deep sleep. Use the sleep calculator once you know the last cup that still fits your bedtime.

What Changes Your Half-Life

Smoking tends to speed caffeine metabolism. Oral contraceptives and pregnancy tend to slow it. Liver function and CYP1A2 gene variants also move the needle. Each of those is a one-line reminder that the 5-hour default is a midpoint, not a prescription — switch the half-life control above rather than treating the number as personal medical advice.3

How to Sleep Better If You Drink Coffee Late

Flip the calculator: pick the bedtime you want, decide how many milligrams you will tolerate at lights-out, and work backward. Example — bedtime 11:00 PM, one 95 mg coffee, five-hour half-life, target about 25 mg left: you need roughly 9–10 hours, so the last cup belongs before about 1:30 PM (by 3:00 PM you still have around 30 mg). Controlled work found that caffeine taken even six hours before bed can still reduce total sleep time.4

Protect the hour before bed the same way you would when paying down how many hours of sleep you need: dim lights, skip the “one more episode,” and keep the last caffeine dose on the safe side of that six-hour line. After a long flight, caffeine timing and clock shift stack — pair this page with the jet lag recovery calculator. A short afternoon reset belongs in the nap calculator, not a third late coffee.

Caffeine Half-Life Reference

Approximate leftovers at a five-hour half-life. Labels vary; treat these as planning figures, not lab assays.

DrinkTypical mgAfter 5 hAfter 10 h
Coffee (8 oz)95≈ 48≈ 24
Double espresso125≈ 63≈ 31
Energy drink (8 oz)80≈ 40≈ 20
Matcha (8 oz)70≈ 35≈ 18
Black tea (8 oz)47≈ 24≈ 12
Cola (12 oz)34≈ 17≈ 9

Frequently Asked Questions

What is the half-life of caffeine?

In healthy adults the average is about five hours, with a wide personal range of roughly 1.5 to 9.5 hours. After one half-life, about half of the dose is still in your system — it is not gone. Genetics (CYP1A2), smoking, pregnancy, and some medicines shift that number.

How long does caffeine stay in your system?

Most of a dose clears over about five half-lives. At a five-hour half-life that is close to 24 hours before levels are tiny. A 95 mg cup still leaves about 24 mg at 10 hours and about 12 mg at 15 hours under that assumption — enough to matter for sleep for some people.

Can I drink coffee at 4pm and still sleep at 11pm?

That is a seven-hour gap, which sits just outside the six-hour cutoff used in controlled research. Many people sleep fine; others still feel a longer sleep latency. Run the times through the calculator above with your usual dose and a slower half-life setting if evenings leave you wired.

Does caffeine affect sleep even if I fall asleep fine?

Yes. Lab work shows caffeine taken even six hours before bed can cut total sleep time and change sleep structure, including when you do not notice a hard time falling asleep. Feeling tired enough to drop off is not the same as an undisturbed night.

Does this work for tea and energy drinks?

Yes. The math is the same for any source — coffee, tea, cola, energy drinks, matcha — because clearance depends on milligrams absorbed, not the brand. Use the serving presets or enter a custom mg from the label.

How much caffeine is too much in a day?

For healthy adults the FDA points to 400 mg per day as an amount not generally associated with dangerous negative effects. Sensitivity, pregnancy, and some medical conditions call for less. This page is about bedtime timing, not a personal daily limit.

Sources

Numbers in the text point here. These are peer-reviewed papers, consensus statements, or official public-health pages you can open and check. The calculators still use planning averages; they are not a personal sleep study.

  1. U.S. Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much?
  2. Sleep Foundation. Caffeine and Sleep.
  3. Evans J, Richards JR, Battisti AS. Caffeine. StatPearls. NCBI Bookshelf. Updated 2024.
  4. 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;9(11):1195–1200.

More Sleep Tools

← Back to Sleep Time Calculator