Open the app

The FoodGPT caffeine calculator: how it works and where it gets it wrong

A white cup of black coffee on a saucer, coffee beans, a metal spoon and a glass of water on a light wooden table

The caffeine calculator adds up milligrams from a table of average values per drink and compares the total with the EFSA level: up to 400 mg a day for an adult, up to 200 mg in pregnancy and breastfeeding, and 3 mg per kilogram of body weight for a child or teenager. The average hides the spread: in a study of 97 espresso servings from cafes, one serving held anywhere from 25 to 214 mg.

What you enter and what you get

The form has five rows of "drink and number of servings". The list holds 20 items: espresso, filter coffee, Americano, cappuccino, latte, instant coffee, decaf, Turkish coffee, black and green tea, matcha, mate, cola, sugar-free cola, an energy drink, guarana, dark and milk chocolate, cocoa made with milk and cocoa powder. Servings go in half steps, up to 20. Then you choose who the calculation is for: an adult, pregnancy or breastfeeding, or a child or teenager. For a teenager the form also asks for weight.

The result is the day's total in milligrams, the limit for the chosen group and the share of the limit in percent. If the total is above the limit, a warning appears. Weight matters only in the teenager mode, where the limit is 3 mg per kilogram: 135 mg for 45 kg.

An example for an adult: two cups of filter coffee at 200 ml (2 × 80 mg), a cup of black tea (40 mg) and a 330 ml can of cola (33 mg) add up to 233 mg, which is 58% of 400 mg.

Where the limits come from

The limits come from the EFSA summary of its 2015 scientific opinion on the safety of caffeine. The European agency says that for healthy adults habitual intake up to 400 mg a day (about 5.7 mg per kilogram of body weight) raises no safety concern, and so does a single dose up to 200 mg (about 3 mg per kilogram). For pregnant women the safe level is up to 200 mg a day, spread through the day. For breastfeeding women EFSA gives the same 200 mg in the opinion. For children and teenagers it proposes a reference of 3 mg per kilogram a day.

EFSA also notes that a single dose of 100 mg may affect sleep duration and pattern in some adults, especially close to bedtime. The calculator has no place for that caveat.

For the caffeine in a serving the calculator uses the site's table of caffeine in drinks and foods. It is based on the USDA FoodData Central database, cross-checked against the EFSA portion table. The arithmetic is simple: milligrams per 100 ml times the serving volume. For filter coffee that is 40 mg per 100 ml and 200 ml, so 80 mg.

Drink in the calculatorServingAverage, mgRange in the table, mg
Espresso30 ml6430-105
Filter coffee200 ml8060-120
Americano250 ml8050-150
Cappuccino, latte250 ml9038-125
Turkish coffee70 ml11249-196
Black tea200 ml4030-70
Cola330 ml can3326-50
Energy drink450 ml can14490-180
Dark chocolate 70-85%25 g2013-23

The ranges in the last column are wider than the calculator itself: it does not use them and works from the average.

Where the calculator gets it wrong

An average hides the spread. In the study by Desbrow and colleagues on the Gold Coast, Australia, 97 espresso servings were analysed from cafes: a mean of 106 mg per serving, a range of 25-214 mg, and a concentration range of 580 to 7,000 mg per litre. Twenty-four servings (24.7%) held 120 mg or more. In the study by Crozier and colleagues, 20 commercial espressos differed six-fold in caffeine, and the strongest held 322 mg, more than the 200 mg single dose in EFSA's assessment. The authors put the spread down mainly to how much coffee the barista uses. Choose "espresso" in the calculator and you get 64 mg. A real cup may hold 30 or 300.

Sources disagree even on the average. A 30 ml shot of espresso is 64 mg in the calculator. EFSA's table gives 80 mg for 60 ml of espresso, which scales to about 40 mg for 30 ml. From the concentration in the Desbrow study (a mean of 2,473 mg per litre) comes about 74 mg per 30 ml, while the average serving in a cafe there was 106 mg. A cafe's "serving of espresso" is often larger than 30 ml, and the calculator does not know that.

It checks only the daily total. EFSA sets two limits, a daily one and a single-dose one, while the calculator shows one. If your serving of espresso holds 322 mg, as the strongest in the Crozier study did, the 200 mg single dose in EFSA's assessment is already exceeded. The calculator, working from the average, will show 64 mg, which is 16% of 400 mg, and no warning.

It does not know when you drank it. 300 mg before lunch and the same 300 mg after six in the evening are not the same for sleep. EFSA links 100 mg to disturbed sleep when taken close to bedtime. How long caffeine stays in the blood and why it stops working is covered in Caffeine and adenosine.

It ignores sensitivity and clearance. The FDA describes wide variation both in how sensitive people are to caffeine and in how fast they eliminate it, with body weight, medication and medical conditions playing a part. The review by Nehlig in Pharmacological Reviews (2018) lists age, sex and hormones, liver disease, obesity, smoking and diet, as well as polymorphism of the enzyme CYP1A2, which metabolises 95% of ingested caffeine, and of the adenosine A2A receptor. Two people with the same 300 mg can feel very different, and the calculator has no field that would show it.

The adult limit does not depend on weight. EFSA writes 400 mg as "about 5.7 mg per kilogram", which assumes a person of roughly 70 kg. The calculator uses a fixed 400 mg for every adult and asks for weight only for teenagers. For a 50 kg person the same 400 mg is 8 mg per kilogram. That is arithmetic, not an EFSA conclusion, but it shows that for a lighter person the limit is better read as an upper boundary than as a norm.

Some sources are not on the list. The FDA points out that caffeine turns up in unexpected products: energy bars, ice cream, chewing gum, dietary supplements and over-the-counter medicines. The calculator has 20 items and five rows. Sports supplements, tablets and powders have to be added by hand from the label.

One limit for pregnancy and breastfeeding. The calculator shows 200 mg for the whole group. How much caffeine is acceptable for you personally is for your doctor to decide, and energy drinks and drinks with guarana are all the more a question for a doctor in that situation.

How to use the result

Calories in coffee drinks are covered in the article on coffee shop drinks, guidelines and additions in Coffee: how much you can drink, and drinks high in caffeine in Energy drinks. If you count water too, see the article on the water calculator.

When to see a doctor

The calculator is on the page Caffeine calculator. It gives a rough estimate of the day from average values, and for a healthy adult that is enough to see where most of the caffeine comes from.

Count it from a photo

Frequently asked questions

How much caffeine is safe a day according to EFSA?
For healthy adults, habitual intake up to 400 mg a day and a single dose up to 200 mg raise no concern. In pregnancy and breastfeeding up to 200 mg a day is considered safe, and for children and teenagers a reference of 3 mg per kilogram of body weight a day is proposed.
How many cups of coffee is 400 mg?
In the calculator a 200 ml cup of filter coffee gives 80 mg, so 400 mg takes five cups. In the EFSA table such a cup holds 90 mg, about four and a half. The FDA puts 400 mg at roughly two to three 12-ounce (355 ml) cups. The real number depends on strength.
How accurate is the caffeine calculator?
It works from average values. In a study of 97 espresso servings from cafes, caffeine ranged from 25 to 214 mg per serving, and in another study 20 commercial espressos differed six-fold. For a single cup the error can be a multiple.
Does the calculator account for timing and sensitivity?
No. It adds up the day's caffeine and does not know when you drank it, how fast you clear it or whether you take medication. EFSA notes that 100 mg close to bedtime may affect sleep in some adults.
What if the total is above the safe level?
Start with the strongest serving: espresso and energy drinks deliver the most in one go. If you are pregnant, breastfeeding or on medication, discuss the amount of caffeine with a doctor rather than a calculator.

Read next

Topics: Coffee and tea

This article is for general information. It is not medical advice, a diagnosis, or a prescription for treatment or a diet, and it does not replace a consultation with your doctor. If you have a health condition, are pregnant, take medication, or follow a diet prescribed to you, decisions about food belong with your doctor.

Figures from regulations, guidelines and studies are given as they stood when this article was prepared and may since have changed; check them against the primary sources. This article is not advertising, an offer, or individual advice, and neither the author nor the site owner is responsible for decisions taken on the basis of it.