How it works
Each drink adds its caffeine while you drink it. Your body then absorbs it and clears it at a steady rate: every half-life, half of what's left is gone. The curve adds up every drink from the last few days, so last night's late coffee still shows this morning. It's an estimate from what you log, not a measurement.
Absorption is modelled as a smooth curve fitted to one published figure: about 99% of caffeine is absorbed within 45 minutes (Institute of Medicine). That's an assumption about an average person; it puts the peak of a coffee roughly 40 minutes after you start drinking it, in line with the 30 to 60 minutes measured in studies.
The default half-life is 5 hours, the figure classic studies found in healthy adults (5.2 to 5.4 hours). A 2019 review puts it between 2.5 and 4.5 hours for most non-pregnant adults, and the Sleep Foundation describes a span of about 2 to 12 hours across people. Smoking shortens it, and the combined pill and late pregnancy lengthen it. Pick the preset that fits you in Settings, or enter your own.
The sleep line is 100 mg. EFSA, the European food safety authority, found that a single 100 mg dose close to bedtime may affect sleep in adults; the tool uses "100 mg still in you at bedtime" as a stand-in for that. It's a guide, not a guarantee: people differ, and this isn't medical advice.
Drink amounts are from USDA FoodData Central and the brands' own published figures. Coffee varies a lot by brew: Starbucks lists 315 to 390 mg for a Grande Pike Place, so the tool uses the middle and shows the range.
Questions people ask
- How long does caffeine stay in your system?
- Half of it is typically gone after about five hours, and roughly 97% after five half-lives, about a day. The Sleep Foundation describes half-lives from about 2 to 12 hours across people, depending on smoking, pregnancy, medicines and genes.
- How long before bed should I stop caffeine?
- Six hours is not enough for everyone: in one study, 400 mg taken six hours before bed still cut about an hour of sleep. A 2023 review of 24 studies suggests leaving about nine hours after a regular coffee.
- How much caffeine is too much in a day?
- Up to 400 mg a day is not generally linked to harm in healthy adults, according to the FDA and EFSA. During pregnancy the guidance is 200 mg a day (EFSA, ACOG).
- Why is the sleep line 100 mg?
- EFSA found that a single 100 mg dose close to bedtime may affect sleep in adults. The tool uses 100 mg still in your body at bedtime as a stand-in for that, and you can change it in settings.
- Do the pill or smoking change how long caffeine lasts?
- Yes. In one study the combined pill stretched the half-life from about 5.4 to 7.9 hours, and smoking roughly halves it (about 6 to 3.5 hours). Choose the matching preset in settings.
Sources
- FDA: Spilling the Beans, how much caffeine is too much?
- EFSA: Caffeine (scientific opinion, 2015)
- Drake et al. 2013: caffeine taken 0, 3 or 6 hours before going to bed
- Gardiner et al. 2023: the effect of caffeine on subsequent sleep (meta-analysis)
- Institute of Medicine 2001: caffeine pharmacology (absorption)
- Desmond et al. 1980: caffeine elimination in healthy adults
- Abernethy and Todd 1985: oral contraceptives and caffeine clearance
- Liu and Xu 2026: caffeine metabolism, genetics and smoking
- Qian et al. 2019: caffeine during pregnancy (half-life in adults and in pregnancy)
- Sleep Foundation: caffeine and sleep (half-life range across people)
- ACOG: moderate caffeine consumption during pregnancy
- USDA FoodData Central: brewed coffee
- USDA FoodData Central: espresso
- USDA FoodData Central: brewed black tea
- USDA FoodData Central: brewed green tea
- USDA FoodData Central: cola
- USDA FoodData Central: decaf brewed coffee
- Red Bull Energy Drink: ingredients and caffeine
- Monster Energy Original
- Starbucks: Pike Place Roast nutrition
- Mayo Clinic: caffeine content for coffee, tea, soda and more (energy shot)