How the numbers are worked out
Every number on this site comes from one small model and a table of drinks. This page says what the model is, which of its figures come from published research, and which are working assumptions.
The model
Caffeine is treated as a single dose that is absorbed, peaks, and then leaves the body at a steady rate. Three constants drive everything:
- Peak at 45 minutes. Blood levels are highest roughly 45 minutes after a drink. Published values run from 15 minutes to two hours, faster on an empty stomach.
- Half-life of 5.7 hours. After the peak, the amount still active halves every 5.7 hours.
- A sleep line at 40 mg. Once less than 40 mg is still active, the model treats the drink as low enough to sleep on.
The Cira app uses the same three constants, so the app and this site always agree.
What is established and what is assumed
The half-life is a typical value, not a fixed one. Studies in healthy adults put the average near 5 hours, with individual values anywhere from 1.5 to 9.5 hours. The 5.7 hours used here sits inside that range. Smoking shortens the half-life. Pregnancy and the contraceptive pill lengthen it, as do some medicines. That is why every calculator on this site lets you choose a fast, average or slow metabolism.
The 40 mg line is a working threshold of the model, not a clinical standard. No study names 40 mg as the point where caffeine stops affecting sleep. It is the value at which the model lands close to the research described below.
The daily limit is established. The European Food Safety Authority and the US Food and Drug Administration both use 400 mg a day for healthy adults. The European Food Safety Authority adds two more figures: up to 200 mg in a single dose, and up to 200 mg a day in pregnancy.
How the model compares with research
A 2023 review of 24 studies worked out how long before bed caffeine should stop if it is not to shorten sleep. The model gives similar answers:
| Dose | Review of 24 studies | This model |
|---|---|---|
| A cup of coffee, 107 mg | 8.8 hours | 8.3 hours |
| A pre-workout serving, 217.5 mg | 13.2 hours | 14.1 hours |
In one respect the model is stricter than the evidence. A 2025 clinical trial found that 100 mg taken four hours before bed had no significant effect on sleep, while the model still counts 63 mg as active at that point. If the model errs, it errs toward stopping earlier.
The same trial found that 400 mg disturbed sleep when taken within twelve hours of bedtime. An earlier study found that 400 mg taken six hours before bed cut total sleep time by more than an hour. The model agrees with both: twelve hours after 400 mg it still counts 95 mg as active.
Where the caffeine figures come from
The amount in each drink is a typical published value for the serving shown. It is not a measurement of your cup. Coffee varies with the bean, the dose and the brew time, and a cafe serving can hold half as much again as the figure here. For canned and bottled drinks the label is the better source, and recipes differ between countries.
What the model leaves out
- Tolerance. Regular drinkers feel the same dose less. The model tracks how much caffeine is present, not how strongly you feel it.
- Body weight. The same dose gives a higher concentration in a smaller person.
- Other caffeine. Each page describes one drink on its own. Caffeine from earlier in the day adds to it. The app adds them up. The pages here do not.
- Everything else that affects sleep. Light, stress, alcohol and the hour you got up matter as much as caffeine does.
Cira is a tracker, not a medical device. If caffeine affects your heart, your anxiety or a pregnancy, talk to a doctor.
Sources
- EFSA Panel on Dietetic Products, Nutrition and Allergies. Scientific Opinion on the safety of caffeine. EFSA Journal, 2015. doi:10.2903/j.efsa.2015.4102
- US Food and Drug Administration. Spilling the Beans: How Much Caffeine Is Too Much? fda.gov
- Institute of Medicine. Caffeine for the Sustainment of Mental Task Performance, chapter 2, Pharmacology of Caffeine. National Academies Press, 2001. doi:10.17226/10219
- Gardiner C, Weakley J, Burke LM, and others. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews, 2023. doi:10.1016/j.smrv.2023.101764
- Gardiner CL, Weakley J, Burke LM, and others. Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. SLEEP, 2025. doi:10.1093/sleep/zsae230
- 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. doi:10.5664/jcsm.3170