Caffeine Half-Life Calculator
Model your caffeine decay throughout the day. See how much caffeine remains in your system at bedtime and when to stop drinking coffee for optimal sleep.
Caffeine Half-Life at a glance
Rather than repeating a single reference figure, the Caffeine Half-Life below personalizes it: your own measurements feed the same published equation the reference ranges are built from.
Model your caffeine decay throughout the day. See how much caffeine remains in your system at bedtime and when to stop drinking coffee for optimal sleep.
How caffeine metabolism works
Caffeine is metabolized primarily by the CYP1A2 enzyme in the liver. The average half-life of caffeine is about 5 hours, meaning that 5 hours after consuming 200mg, about 100mg remains in your system. After 10 hours, 50mg remains. After 15 hours, 25mg remains. This is why a 2pm coffee (100mg) still has ~25mg in your system at midnight, enough to disrupt sleep in sensitive individuals. But the 5-hour average masks enormous individual variation driven by genetics, medications, and lifestyle factors.
CYP1A2 genetics, fast vs. slow metabolizers
The CYP1A2 gene has a common variant (rs762551) that determines whether you are a "fast" or "slow" caffeine metabolizer. About 50% of the population are slow metabolizers (A/C or C/C genotype) with a half-life of 7-8 hours. The other 50% are fast metabolizers (A/A genotype) with a half-life of 2-3 hours. Slow metabolizers are much more likely to experience caffeine-related sleep disruption, anxiety, and palpitations. They also have higher risk of caffeine-related heart attacks (per a 2006 study). If you find that a 2pm coffee disrupts your sleep, you are likely a slow metabolizer.
Factors that change caffeine half-life
Oral contraceptives: Estrogen inhibits CYP1A2, doubling caffeine half-life from ~5 hours to ~10 hours. Women on birth control pills are effectively all slow metabolizers.
Pregnancy: Caffeine half-life increases progressively through pregnancy, reaching 11-15 hours in the third trimester. This is why ACOG recommends limiting caffeine to <200mg/day during pregnancy.
Smoking: Smoking induces CYP1A2, halving caffeine half-life to ~2-3 hours. Smokers can often drink coffee later in the day without sleep disruption. (But smoking has far worse health effects than caffeine, so this is not a benefit.)
Age: Newborns have very long caffeine half-lives (80+ hours). Children have shorter half-lives than adults. Elderly adults have slightly longer half-lives.
Liver disease: Cirrhosis and hepatitis impair caffeine metabolism, extending half-life.
Medications: Fluvoxamine, ciprofloxacin, and mexiletine inhibit CYP1A2. Carbamazepine and rifampin induce it.
How much caffeine disrupts sleep?
Research suggests that caffeine doses as low as 50mg (half a cup of coffee) consumed 3 hours before bed can delay sleep onset by 10-20 minutes and reduce deep (slow-wave) sleep by 10-20%. Doses of 200mg (one strong coffee) consumed 6 hours before bed still significantly disrupt sleep, this is why the general rule is to stop caffeine 8+ hours before bedtime. If your half-life is 8 hours (slow metabolizer), you need to stop even earlier, 10-12 hours before bed.
Using this calculator
Enter each caffeine dose (coffee, tea, energy drink, pre-workout, chocolate, etc.) with the time consumed. The calculator models caffeine decay using your personalized half-life and shows the total caffeine remaining at your bedtime. If the result is >30mg, consider adjusting your caffeine timing. The calculator assumes single-dose pharmacokinetics, in reality, there are small second-order effects from accumulation, but the single-dose model is accurate enough for practical use.
How to reduce caffeine if it's disrupting sleep
If you're a slow metabolizer or your bedtime caffeine is >50mg: (1) Shift your last coffee earlier, try 10am instead of 2pm. (2) Switch to half-caf or decaf for afternoon coffee. (3) Replace afternoon coffee with green tea (lower caffeine, L-theanine for calm focus). (4) Try a caffeine cutoff experiment, no caffeine after noon for 2 weeks and see if sleep improves. (5) Get a genetic test (23andMe, Nutrition Genome) if you want to confirm your CYP1A2 status. (6) Be especially careful on oral contraceptives or during pregnancy, your half-life is doubled.
Formula sources, population limits, and references for this lifestyle calculator are documented in our public methodology. Read the methodology · Medical disclaimer