What caffeine actually is
Caffeine (1,3,7-trimethylxanthine) is a naturally occurring methylxanthine alkaloid found in coffee, tea, cocoa, and many other plants. It is the most widely consumed psychoactive substance in the world, with an estimated 80% of adults consuming it daily.
Its primary mechanism of action is adenosine receptor antagonism. Adenosine is a neuromodulator that accumulates in the brain during waking hours and promotes sleepiness. Caffeine's molecular structure is similar enough to adenosine that it occupies the same receptors without activating them — effectively blocking the sleepiness signal and keeping you alert.[1,2]
Absorption: from cup to bloodstream
Once swallowed, caffeine is rapidly absorbed through the gastrointestinal tract. Unlike many other compounds, it does not require active transport — it crosses cell membranes freely due to its lipophilic nature.
Caffeine reaches peak plasma concentration within 30 to 45 minutes of consumption in most people, though this can range from 15 minutes to over an hour depending on stomach contents, individual metabolism, and formulation (e.g. capsule vs. liquid).[3]
Bioavailability is very high — nearly 100% of ingested caffeine enters systemic circulation, making dose estimation from drink volumes relatively reliable compared to many other substances.
Distribution: across the body and blood-brain barrier
Caffeine distributes rapidly throughout all body tissues, including across the blood-brain barrier — the selective filter protecting the brain. This is why effects are felt so quickly after absorption peaks. It also crosses the placental barrier and is excreted in breast milk, which is why intake guidelines differ for pregnant and nursing individuals.
The volume of distribution (Vd) is approximately 0.6 L/kg, meaning caffeine is fairly uniformly distributed rather than concentrated in any single tissue.[4]
Metabolism: the liver and CYP1A2
Caffeine is metabolised almost entirely in the liver by the cytochrome P450 enzyme CYP1A2. This enzyme converts caffeine primarily into three dimethylxanthines:
- Paraxanthine (~84%) — the primary metabolite; increases fatty acid mobilisation and has independent stimulant effects
- Theobromine (~12%) — a milder stimulant also found in chocolate; vasodilatory effects
- Theophylline (~4%) — used clinically as a bronchodilator; stimulates the heart and CNS
These metabolites are further broken down and excreted in urine, with only about 2–3% of caffeine excreted unchanged.[3,4]
Why metabolism speed varies so much
CYP1A2 activity varies significantly between individuals due to genetic polymorphisms in the CYP1A2 gene. Some people carry "fast metaboliser" variants and process caffeine in as little as 3 hours (half-life); others with "slow metaboliser" variants may have a half-life of 8 hours or more.[5]
Other factors that affect caffeine half-life include:
- Smoking — induces CYP1A2, shortening half-life by up to 50%
- Oral contraceptives and some medications — inhibit CYP1A2, slowing metabolism
- Pregnancy — CYP1A2 activity falls during the second and third trimester; half-life can extend to 15+ hours
- Liver disease — reduced CYP1A2 capacity lengthens half-life
- Age — neonates metabolise caffeine very slowly; metabolism normalises by age 6 months
Elimination: exponential decay
Once absorbed, caffeine follows first-order pharmacokinetics — meaning a constant fraction of the remaining caffeine is eliminated per unit time, regardless of the absolute amount present. This produces the characteristic exponential decay curve.
The mathematics of first-order elimination are straightforward:
In practical terms: if you have 200 mg of caffeine in your system and your half-life is 5.5 hours, you will have ~100 mg after 5.5 hours, ~50 mg after 11 hours, ~25 mg after 16.5 hours, and so on.
Caffeine and sleep
Research consistently shows that caffeine consumed even 6 hours before bedtime can significantly disrupt sleep — reducing total sleep time by more than 1 hour — even when people do not perceive themselves as feeling alert.[6]
This is because sleep quality, particularly slow-wave (deep) sleep, is sensitive to caffeine levels that are still sub-threshold for perceived alertness. You might feel fine, but your sleep architecture is being disrupted.
Individual sensitivity to caffeine's sleep-disrupting effects varies and is partly independent of metabolism speed. Some slow metabolisers habituate to caffeine's alerting effects but still experience the sleep disruption; conversely, some fast metabolisers remain sleep-sensitive even with low circulating levels.[7]
Key insight: The question isn't "do I feel alert?" — it's "how much caffeine is actually in my system right now?" kof answers that question with real-time pharmacokinetic modelling.
Tolerance and dependence
Regular caffeine consumption leads to pharmacological tolerance — the adenosine receptors upregulate in response to chronic blockade, requiring more caffeine to achieve the same effect.[2] This is why habitual coffee drinkers often feel they need their first cup just to feel normal: they are, in part, reversing overnight adenosine accumulation on top of a raised receptor baseline.
Physical dependence also develops with regular use. Withdrawal symptoms — headache, fatigue, irritability, difficulty concentrating — typically begin 12–24 hours after last use, peak at 20–51 hours, and resolve within a week.[8]
How kof uses this science
kof implements a two-phase pharmacokinetic model based on the absorption and elimination dynamics described above:
- Absorption phase (0–30 minutes): caffeine level ramps linearly from zero to the full drink dose, approximating the rapid GI absorption curve and typical time to peak plasma concentration.
- Elimination phase (30 min onwards): caffeine decays exponentially from peak using first-order kinetics with your configured half-life (default 5.5 h).
All drinks logged across the day are superimposed — kof sums the contribution of each drink at every point in time to give you a composite caffeine curve. This lets you see not just your current level but how today's drinking pattern will play out through the evening and into the night.
The sleep cutoff warning works by finding the latest time you could add another drink of your chosen type and still drop below your sleep threshold (default 50 mg) by your configured bedtime. It accounts for your current caffeine load, the absorption ramp, and your personal half-life.
You can adjust your half-life in Preferences (kof Pro) to better match your individual metabolism — a key variable that makes a significant real-world difference to when caffeine actually clears your system.
References
- Fredholm BB, Bättig K, Holmén J, Nehlig A, Zvartau EE. Actions of caffeine in the brain with special reference to factors that contribute to its widespread use. Pharmacol Rev. 1999;51(1):83–133.
- Nehlig A, Daval JL, Debry G. Caffeine and the central nervous system: mechanisms of action, biochemical, metabolic and psychostimulant effects. Brain Res Brain Res Rev. 1992;17(2):139–170.
- Blanchard J, Sawers SJ. The absolute bioavailability of caffeine in man. Eur J Clin Pharmacol. 1983;24(1):93–98.
- Arnaud MJ. The pharmacology of caffeine. Prog Drug Res. 1987;31:273–313.
- Sachse C, Brockmöller J, Bauer S, Roots I. Functional significance of a C→A polymorphism in intron 1 of the cytochrome P450 CYP1A2 gene tested with caffeine. Br J Clin Pharmacol. 1999;47(4):445–449.
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013;9(11):1195–1200.
- Rétey JV, et al. A genetic variation in the adenosine A2A receptor gene (ADORA2A) contributes to individual sensitivity to caffeine effects on sleep. Clin Pharmacol Ther. 2007;81(5):692–698.
- Juliano LM, Griffiths RR. A critical review of caffeine withdrawal: empirical validation of symptoms and signs, incidence, severity, and associated features. Psychopharmacology. 2004;176(1):1–29.