Caffeine Calculator
Last updated: 27 June 2026
Reviewed by Gavin Meiring, Lead research and primary author ยท Doctoral Candidate (Corporate Governance) ยท Research and drafting assisted by AI
- Caffeine is the world's most widely consumed psychoactive substance, found naturally in the beans, leaves, and fruits of more than 60 plant species, including coffee, tea, cacao, guarana, and yerba mate.
- Caffeine has a half-life of roughly 3โ5 hours in healthy adults, so a coffee drunk at 3 pm can still leave about a quarter of its caffeine circulating at bedtime โ and that half-life can stretch much longer during pregnancy.
- Decaf is not caffeine-free: an 8 oz (240 mL) cup of decaffeinated coffee still typically contains about 2โ15 mg of caffeine, compared with roughly 80โ100 mg in a regular cup.
Caffeine Calculator
Caffeine is the world's most widely consumed psychoactive substance, and most people have no idea how much they are taking in or how long it stays active in their body. This calculator tracks your total daily caffeine intake, estimates when it will clear your system, and flags if you are approaching unsafe limits.
How to Use the Caffeine Calculator
- Enter each caffeinated drink or food you have consumed today (coffee, tea, energy drinks, cola, chocolate, etc.).
- Select the type and size of each item from the dropdown, or enter a custom caffeine amount in milligrams.
- Enter the time you consumed each item.
- Click Calculate to see your total intake, the caffeine level still active in your system, and when your caffeine load will drop to a sleep-safe level.
- Use the results to decide whether to have another coffee or call it a day.
The Formula
Caffeine follows first-order elimination kinetics, meaning the body removes a fixed percentage of the remaining caffeine per unit of time.
Half-life of caffeine = approximately 5 to 6 hours in healthy adults (range: 3 to 10 hours depending on genetics, medications, and smoking status).
Amount remaining after time t = Initial dose x (0.5)^(t / half-life).
If you consumed 200mg of caffeine 6 hours ago with a half-life of 6 hours, you still have approximately 100mg active in your system. Total daily active caffeine is the sum of remaining caffeine from all doses consumed that day.
Real-World Example
You drink: a double espresso (140mg) at 8am, a flat white (120mg) at 10:30am, and a cola (40mg) at 2pm. It is now 4pm.
Using a 6-hour half-life:
- Espresso: 8 hours ago, 140 x 0.5^(8/6) = 140 x 0.397 = 55.6mg remaining
- Flat white: 5.5 hours ago, 120 x 0.5^(5.5/6) = 120 x 0.529 = 63.5mg remaining
- Cola: 2 hours ago, 40 x 0.5^(2/6) = 40 x 0.794 = 31.8mg remaining
Total active caffeine at 4pm = 55.6 + 63.5 + 31.8 = 150.9mg. You also consumed a total of 300mg today, well under the recommended daily maximum.
Safe Daily Caffeine Limits
Health regulators worldwide generally set the safe upper limit for healthy adults at 400mg of caffeine per day. Pregnant women are advised to limit intake to 200mg per day due to slower caffeine metabolism and potential risks to the developing baby. Adolescents should stay under 100mg per day. People with anxiety disorders, heart arrhythmias, high blood pressure, or insomnia may need to set lower personal limits. To avoid disrupting sleep, it is wise to avoid caffeine within 6 hours of your planned bedtime, since residual caffeine in the evening significantly reduces sleep quality even if you can fall asleep normally.
Frequently Asked Questions
Why do I feel caffeine some days more than others? Caffeine sensitivity varies with hydration, meal timing, stress levels, and how much sleep you had. On an empty stomach, caffeine is absorbed faster and feels stronger. Genetic variations in the CYP1A2 enzyme (which metabolises caffeine) make some people fast metabolisers and others slow, affecting both the peak effect and how long the effect lasts.
Does coffee strength vary significantly between types? Yes, considerably. A single shot of espresso contains roughly 63-70mg. A regular drip coffee (240ml) contains 95-165mg depending on the beans and brewing method. Instant coffee typically has 60-80mg per cup. Energy drinks range from 80mg to over 300mg per can. Cold brew concentrate can contain twice as much caffeine as hot-brewed coffee of the same volume.
Can I develop a tolerance to caffeine? Yes. Regular caffeine consumption causes the brain to upregulate adenosine receptors over time, reducing the stimulant effect. This is why regular coffee drinkers need more caffeine to achieve the same alertness boost. Taking a break of 1 to 2 weeks resets tolerance substantially, though withdrawal symptoms (headache, fatigue, irritability) are common in the first few days.
Is caffeine harmful in the long term? At moderate doses within the recommended 400mg/day limit, caffeine appears safe for most healthy adults and is associated with some health benefits in research, including reduced risk of type 2 diabetes and Parkinson's disease. Chronic high intake is associated with increased anxiety, insomnia, and cardiovascular stress in susceptible individuals. As with most substances, moderate and careful use is the sensible approach.
Also try these free tools:
The same three drinks at four assumed half-lives
The worked example above uses a 6 hour half-life and returns 150.9 mg active at 4pm. The half-life is the one input nobody can measure without a blood test, and the page's own range runs from 3 to 10 hours. Running the identical three drinks through four values of it shows how much the answer moves:
| Assumed half-life, hours | Espresso, 140 mg at 08:00 | Flat white, 120 mg at 10:30 | Cola, 40 mg at 14:00 | Total active at 16:00 |
|---|---|---|---|---|
| 3 | 22.0 | 33.7 | 25.2 | 80.9 |
| 5 | 46.2 | 56.0 | 30.3 | 132.5 |
| 6 | 55.6 | 63.6 | 31.7 | 150.9 |
| 10 | 80.4 | 82.0 | 34.8 | 197.2 |
The intake is the same 300 mg in every row. The active load at 4pm ranges from 80.9 mg to 197.2 mg, a factor of 2.4. Anyone comparing their own total against a limit should treat the half-life as a range and read the top of it as the cautious case.
Slow metabolisers sit at the long end. Smoking speeds clearance and shortens the half-life; medicines that inhibit the CYP1A2 enzyme slow it and lengthen it. Pregnancy slows caffeine clearance as well, which is one reason the pregnancy limit sits at half the adult figure.
When the load clears a sleep threshold
The calculator's useful output is a time, not a dose. Taking the same three drinks and asking when the total falls below 50 mg, then below 20 mg:
| Assumed half-life, hours | Below 50 mg | Below 20 mg |
|---|---|---|
| 5 | 23:02 the same day | 05:38 the next day |
| 6 | 01:34 the next day | 09:30 the next day |
On the 5 hour assumption a person who finishes their last drink at 2pm is under 50 mg by early evening. On the 6 hour assumption the same person is still over 50 mg after midnight. The bedtime decision sits in that gap, so the safer approach is to use the longer half-life when the question is whether to drink another coffee at 3pm.
Caffeine per drink and caffeine per millilitre
Two different measures get confused. A serving delivers a dose, and a drink delivers a concentration, and the two can point in opposite directions:
| Drink | Typical serving | Caffeine per serving | Caffeine per 100 ml |
|---|---|---|---|
| Single espresso | 30 ml | 63 to 70 mg | 210 to 233 mg |
| Filter or drip coffee | 240 ml | 95 to 165 mg | 40 to 69 mg |
| Instant coffee | 240 ml | 60 to 80 mg | 25 to 33 mg |
| Energy drink | 250 to 500 ml | 80 to 300 mg | 32 to 60 mg |
| Cola, as used in the worked example | 330 ml | 40 mg | 12.1 mg |
Espresso is the strongest drink by concentration at roughly 222 mg per 100 ml, around four times a filter coffee at 54 mg per 100 ml. A serving of filter coffee still delivers about twice the caffeine of one espresso shot, because the serving is eight times the volume. Ordering a long black instead of a filter coffee to save caffeine does the opposite of what intuition suggests.
What 400 mg looks like in servings
The daily figure on this page reads very differently depending on the drink:
| Drink | Servings inside a 400 mg daily total |
|---|---|
| Filter coffee at the 130 mg midpoint | 3.1 cups |
| Espresso at the 66.5 mg midpoint | 6.0 single shots |
| Energy drink at the top of the 80 to 300 mg range | 1.3 cans |
A limit that sounds generous at six espressos is a different instruction at one large energy drink, and the same 400 mg applies to both.
Where the 400 mg figure comes from
The 400 mg daily figure and the 200 mg single-dose figure come from the scientific opinion on the safety of caffeine published by the European Food Safety Authority's Panel on Dietetic Products, Nutrition and Allergies. The panel concluded that single doses up to 200 mg and habitual daily intake up to 400 mg raise no safety concern in healthy non-pregnant adults, that 200 mg a day is the figure for pregnant women, and that the evidence for children and adolescents is too thin to set a safe level at all. That last point is why the calculator is best used for comparison in younger age groups rather than as a threshold to spend.
Assumptions behind the half-life model
- First-order elimination with a single fixed half-life is an approximation. Real clearance varies with genetics, medicines, smoking, pregnancy and liver function, which is why the answer is a range rather than a figure.
- The calculation sums the remaining fraction of each dose and treats a drink as fully absorbed the moment it is logged. In reality, absorption takes 30 to 60 minutes, so a drink entered a few minutes ago is counted slightly high.
- Concentrations for drinks are typical published values, not measurements of the cup in front of you. Bean, grind, brew time and serving size move them by a wide margin, which is why the calculator accepts a custom milligram figure.
- The tool does not model tolerance. Regular intake reduces the subjective effect without changing the elimination maths, so the numbers stay useful for total load while the felt effect falls.
- Sleep guidance above is about residual caffeine, not about how easily you fall asleep. The two are different questions, and the second one is answered less well by arithmetic.