Audited 31 Jul 2026·Last updated 28 Oct 2026·5 citations·Tier 2·0 uses

Coffee Kick Calculator

See when the caffeine in your coffee peaks, how much is still in your body at bedtime, and how long before bed your last cup should be, from your half-life.

Coffee Kick Calculator

90 mg is the midpoint of the FDA's published 80–100 mg for an 8 oz cup of brewed coffee. The FDA also gives 30–50 mg for 8 oz of green or black tea, 30–40 mg for a 12 oz caffeinated soft drink, and 40–250 mg per 8 fl oz for energy drinks.
mg
All of them treated as one dose finished at the same moment. If your cups were hours apart, run the calculator once per cup and add the results at the time you care about.
StatPearls gives approximately 5 hours for the average adult. Cappelletti et al. report a human range of 2 to 12 hours. Pregnancy and oral contraceptives lengthen it substantially; smoking shortens it. This is the input that changes the answer most.
h
How fast caffeine moves from gut to bloodstream. 10 minutes is not itself a published figure — it is the value that puts this model's derived peak at 50.8 minutes, inside the 30–60 minute window Cappelletti et al. report. Must be shorter than your elimination half-life.
min
A 3 pm coffee and an 11 pm bedtime is 8 hours. Enter 0 to see the model at the moment you finish drinking, when nothing has been absorbed yet.
h
The amount you are willing to have on board at lights-out. 50 mg is a Quanta default, not a published safety limit — no authority publishes a bedtime caffeine threshold. The sourced comparison is the Drake reference reported beside the result.
mg
Caffeine at the peak
160.0801
The largest amount of caffeine in your body at any moment after the drink, in milligrams; always a little below the dose.
Time to the peak
50.7609 min
Total caffeine consumed
180 mg
Peak as a share of the dose
88.93
Caffeine left at bedtime
61.4254 mg
Share of the dose left at bedtime
34.13
Hours until below your threshold
9.4845 h
Still there after 24 hours
6.6842 mg
Elimination rate constant
0.1386 /h
Drake reference level
180.1139 mg
Where bedtime sits
Above your 50 mg threshold but below the 180.1 mg this model leaves from Drake et al.'s sleep-disrupting condition — about 61.4 mg is still in your body at bedtime.
Hour by hour
+1 h 159 mg | +2 h 141 mg | +4 h 107 mg | +6 h 81 mg | +8 h 61 mg | +12 h 35 mg
Summary
2.0 servings of 90 mg is 180 mg of caffeine. It peaks at 160.1 mg about 51 minutes after you drink it, and 8.0 hours later, at bedtime, about 61.4 mg (34.1% of the dose) is still in your body. It falls below 50 mg 9.5 hours after the last cup.

Background.

Can a coffee at three in the afternoon still be in you at eleven at night? Mostly, yes. In the average adult, caffeine's half-life is about five hours, so after ten hours roughly a quarter of it is still circulating. Two mugs of brewed coffee at 3 pm can leave around 61 mg in your body at an 11 pm bedtime, more than the 30 to 50 mg the FDA gives for an 8 oz cup of black or green tea.

The calculator follows one sitting of coffee, tea or energy drink through the hours after you finish it, using the one-compartment model pharmacology applies to drugs taken by mouth: caffeine enters the blood from the gut at one rate and is cleared by the liver at another. It reports the peak and when it arrives, what is left at bedtime, how long it takes to fall below a level you choose, and what remains a day later.

Your own elimination half-life sets the shape of the whole curve, and people differ widely: a review by Cappelletti and colleagues gives 2 to 12 hours. Smoking speeds clearance; pregnancy and oral contraceptives slow it substantially.

No health authority publishes a safe bedtime level of caffeine, so the comparison point comes from a sleep study. Drake and colleagues gave volunteers 400 mg six hours before their usual bedtime, and they lost more than an hour of sleep. Your bedtime figure is shown against what that dose leaves in the same model, alongside a threshold you set yourself.

What is coffee kick calculator?

Caffeine moves through the body in two overlapping stages. After you swallow it, it passes from the gut into the bloodstream over roughly the first hour, and essentially all of it gets there. Meanwhile the liver, mainly through the enzyme CYP1A2, removes it at a first-order rate: a constant fraction each hour rather than a fixed number of milligrams. Together those produce a curve that climbs steeply to a peak, typically 30 to 60 minutes after the drink, then decays exponentially. The calculator gives that curve as the amount of caffeine in your body in milligrams. It does not give a blood concentration, which would need your weight and a volume of distribution, about 0.6 L/kg in adults, and would imply more precision than a two-parameter model can deliver.

How to use this calculator.

  1. Enter the caffeine in one serving. The FDA gives 80 to 100 mg for an 8 oz cup of brewed coffee (the 90 mg default is the midpoint), 30 to 50 mg for 8 oz of tea, 30 to 40 mg for a 12 oz soft drink and 40 to 250 mg per 8 fl oz for energy drinks.
  2. Enter the number of servings drunk at that sitting. They are treated as one dose finished at the same moment.
  3. Set your caffeine half-life. Start at 5 hours; go higher if you are pregnant, take oral contraceptives, or find that an afternoon coffee reliably keeps you awake, and lower if you smoke.
  4. Leave the absorption half-life at 10 minutes unless you have a reason to change it, and check that the time to the peak stays in the 30 to 60 minute range. It has to be shorter than the elimination half-life.
  5. Enter the hours from finishing this drink to bedtime and the most caffeine you are willing to have on board at lights-out. The 50 mg default is a Quanta choice, not a published limit.
  6. Read "Hours until below your threshold" as your cut-off: the last cup needs to be at least that long before you plan to sleep.

The formula.

A(t) = D · ka⁄(ka−ke) · (e^(−ke·t) − e^(−ka·t)) · t_max = ln(ka⁄ke)⁄(ka−ke)

The amount in the body t hours after you finish drinking is A(t) = D × ka ÷ (ka − ke) × (e^(−ke·t) − e^(−ka·t)), the Bateman function. D is the dose in milligrams, and ka and ke are the absorption and elimination rate constants, each ln 2 divided by the corresponding half-life in hours. With the defaults, ke = 0.6931 ÷ 5 = 0.1386 per hour and ka = 0.6931 ÷ (10 ÷ 60) = 4.1589 per hour, exactly 30 times faster.

At t = 0 both exponentials equal 1 and A is zero. Because ka is so much larger, the e^(−ka·t) term fades within an hour or two, and after that the curve is plain exponential decay at your elimination half-life. The peak comes at t_max = ln(ka ÷ ke) ÷ (ka − ke), which depends on the two half-lives but not on the dose. Bioavailability is taken as 1, the usual assumption for caffeine.

The 10-minute absorption half-life is not a measured figure. Studies report time to peak instead, 30 to 60 minutes in Cappelletti's review, and 10 minutes puts this model's peak at 50.8 minutes; across elimination half-lives of 2 to 12 hours the derived peak stays between about 39 and 63 minutes.

The time to fall below your threshold has no closed form, so it is found numerically on the falling side of the curve, and reads 0 if the peak never reaches the threshold. The Drake reference is A(6) for D = 400 mg at your half-life.

A worked example.

Example

Two 8 oz cups of brewed coffee at 3 pm, at the FDA range's 90 mg midpoint, make a dose of 2 × 90 = 180 mg, and bedtime is 11 pm, eight hours later. A 5-hour half-life gives ke = 0.1386 per hour and the 10-minute absorption half-life gives ka = 4.1589 per hour. The peak arrives at ln(4.1589 ÷ 0.1386) ÷ (4.1589 − 0.1386) = ln 30 ÷ 4.0202 ≈ 0.8460 hours, about 50.76 minutes after the last sip, and reaches 160.08 mg, 88.93% of what was drunk. After that the decline is steady: 141 mg at two hours, 107 mg at four, 81 mg at six and 61 mg at eight. At bedtime 61.43 mg is left, 34.13% of the dose, which is above the 50 mg threshold. The amount does not fall below 50 mg until 9.48 hours after the coffee, at about half past midnight, so finishing the second cup an hour and a half earlier would bring bedtime under the line. Measured against the Drake reference, the 180.11 mg that 400 mg taken six hours before bed leaves in the same model, this afternoon's coffee is about a third of that tested condition.

hours Until Bedtime8
servings2
absorption Half Life Minutes10
half Life Hours5
mg Per Serving90
sleep Threshold Mg50

Frequently asked questions.

How long before bed should I stop drinking coffee?
The best evidence points to at least six hours for a substantial dose. Drake and colleagues gave 400 mg of caffeine in pill form at 0, 3 and 6 hours before habitual bedtime, and total sleep time fell by 1.1 to 1.2 hours compared with placebo at every one of those times. If your half-life is long, six hours will not be enough; set the half-life and read your own crossing time.
Why is the peak lower than the caffeine in my cup?
Because the liver starts clearing caffeine as soon as the first of it reaches the blood, so some is gone before the rest has been absorbed. With the default half-lives the peak is 88.93% of the dose. A fast metaboliser with a 2-hour half-life peaks at about 79.78%; a slow one at 12 hours reaches about 94.15%.
What caffeine half-life should I use for myself?
Start with 5 hours, the approximate average-adult figure from StatPearls, then adjust. The reported human range is 2 to 12 hours. Pregnancy and oral contraceptives lengthen it substantially, as does liver disease, while smoking shortens it because tobacco smoke speeds up CYP1A2. If an afternoon coffee routinely keeps you awake past midnight, a value of 8 or 9 hours will probably match your experience better.
Why is some of yesterday's coffee still in my body today?
Exponential decay never quite reaches zero. A 180 mg sitting leaves 6.68 mg after 24 hours at a 5-hour half-life, and 34.68 mg at a 10-hour half-life. A daily drinker therefore starts each morning with a little caffeine already on board, and a slow metaboliser starts with noticeably more.
Can I model three coffees drunk across a morning?
Yes, one at a time. Every serving entered in a single run is treated as finished at the same moment, so for cups hours apart run the calculator once per cup, each with its own hours until bedtime, and add the bedtime amounts. Because the model is proportional to the dose, the sum is exactly what a combined model would give.
Does this tell me whether I drink too much caffeine?
No, it deals with timing rather than daily totals. The FDA cites 400 mg a day as an amount not generally associated with negative effects in most healthy adults, but says that tolerance varies with body weight, medications, medical conditions and sensitivity. If caffeine may be interacting with a medicine or a heart, sleep or anxiety condition, ask a doctor.

References& sources.

  1. [1]Evans J, Richards JR, Battisti AS. "Caffeine." In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; last update 29 May 2024 — "the half-life of caffeine in the average adult is approximately 5 hours", volume of distribution about 0.6 L/kg in adults, and "daily doses of up to 400 mg are considered safe".
  2. [2]Cappelletti S, Piacentino D, Sani G, Aromatario M (2015). "Caffeine: Cognitive and Physical Performance Enhancer or Psychoactive Drug?" Current Neuropharmacology 13(1):71–88, doi:10.2174/1570159X13666141210215655 — "The maximum plasma concentration is reached after 30-60 minutes from consumption", with "maximum plasma concentrations reached between 15 and 120 min" reported, and "Caffeine's half-life in humans ranges from a minimum of 2 to a maximum of 12 hours".
  3. [3]Drake C, Roehrs T, Shambroom J, Roth T (2013). "Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed." Journal of Clinical Sleep Medicine 9(11):1195–1200, doi:10.5664/jcsm.3170 — 400 mg of caffeine in pill form at 0, 3 and 6 hours before habitual bedtime; "reducing TST between 1.1 to 1.2 hours" at every administration time; "provides empirical support for sleep hygiene recommendations to refrain from substantial caffeine use for a minimum of 6 hours prior to bedtime".
  4. [4]U.S. Food and Drug Administration (Consumer Updates). "Spilling the Beans: How Much Caffeine is Too Much?" — an 8-ounce cup of coffee is "closer to 80 to 100 milligrams", 8 oz green or black tea 30–50 mg, a 12-ounce caffeinated soft drink 30–40 mg, energy drinks 40–250 mg per 8 fl oz; 400 mg a day cited as an amount not generally associated with negative effects for most healthy adults, with "too much" varying by body weight, medications, medical conditions and individual sensitivity.
  5. [5]Grogan S, Preuss CV. "Pharmacokinetics." In: StatPearls [Internet]. StatPearls Publishing; last update 30 July 2023 — first-order kinetics is "the major elimination model of most medications", and half-life is "the amount of time for serum drug concentrations to decrease by 50%". The basis for deriving both rate constants as ln 2 divided by a half-life.

How this page was produced

Published by
Quanta Calculator
Primary sources
5 cited below
Method
A(t) = D · ka⁄(ka−ke) · (e^(−ke·t) − e^(−ka·t)) · t_max = ln(ka⁄ke)⁄(ka−ke)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon