How to Use This Calculator
Using this tool takes less than 30 seconds:
- Search and select your caffeinated drink from the list
- Enter the time you consumed it
- Add all drinks you had today
- Set your bedtime
- See exactly how much caffeine will be in your system when you go to sleep
You can add multiple drinks throughout the day. The calculator updates instantly every time you make a change.
What Is Caffeine Half-Life?
Caffeine half-life is the time it takes for your body to eliminate half the caffeine from your bloodstream.
For most people this is 5 hours. This means if you drink a large coffee with 200mg of caffeine at 2pm, here is what happens inside your body:
| Time | Hours Since Coffee | Caffeine Remaining |
|---|---|---|
| 2:00 PM | 0 hours | 200mg |
| 7:00 PM | 5 hours | 100mg |
| 12:00 AM | 10 hours | 50mg |
| 5:00 AM | 15 hours | 25mg |
This is why a single afternoon coffee can still be disrupting your sleep at midnight — even if you feel completely fine.
How Long Does Caffeine Stay in Your System?
For most healthy adults caffeine takes between 10 to 12 hours to mostly clear your system. But this varies significantly from person to person.
Your caffeine metabolism speed is determined by the CYP1A2 enzyme in your liver. People with different genetic variants of this enzyme process caffeine at very different speeds.
| Metabolism Type | Half-Life | Who This Affects |
|---|---|---|
| Fast | 3 hours | Genetic fast metabolizers |
| Average | 5 hours | Most healthy adults |
| Slow | 8 hours | Certain medications, hormonal contraceptives, pregnancy |
Factors that slow caffeine metabolism:
- Pregnancy — half-life increases to 10–15 hours
- Oral contraceptives — can double half-life
- Liver conditions
- Some antibiotics and medications
- Older age
Factors that speed up caffeine metabolism:
- Smoking
- Certain genetic variants
- Regular exercise
Learn more about caffeine metabolism and why everyone is different →
Caffeine Content in Popular Drinks
Not all caffeinated drinks are equal. Here is exactly how much caffeine is in the most common drinks:
| Drink | Serving Size | Caffeine |
|---|---|---|
| Brewed Coffee | 8oz | 96mg |
| Starbucks Coffee | 8oz | 155mg |
| Cold Brew Coffee | 8oz | 103mg |
| Espresso | 1 shot | 64mg |
| Double Espresso | 2 shots | 128mg |
| Latte | 8oz | 64mg |
| Cappuccino | 8oz | 64mg |
| Americano | 8oz | 64mg |
| Black Tea | 8oz | 48mg |
| Green Tea | 8oz | 28mg |
| Matcha | 8oz | 70mg |
| Chai Tea Latte | 8oz | 50mg |
| Iced Tea | 8oz | 25mg |
| Monster Energy | 16oz | 160mg |
| Red Bull | 8.4oz | 80mg |
| 5-Hour Energy | 2oz | 230mg |
| Celsius | 12oz | 200mg |
| Bang Energy | 16oz | 300mg |
| Coca-Cola | 12oz | 34mg |
| Diet Coke | 12oz | 46mg |
| Mountain Dew | 12oz | 54mg |
| Dr Pepper | 12oz | 41mg |
| Dark Chocolate | 1oz | 12mg |
| Pre-Workout | 1 scoop | 150mg |
See our complete caffeine in coffee guide for more details →
How Caffeine Affects Your Sleep
Most people assume that if they fall asleep easily caffeine is not affecting them. This is one of the most common and damaging sleep myths.
Research tells a very different story.
A landmark 2013 study by Drake et al. published in the Journal of Clinical Sleep Medicine found that caffeine consumed even 6 hours before bedtime reduced total sleep time by more than 1 hour. The participants did not realize their sleep was being disrupted — but the measurements showed it clearly.
Sleep scientist Matthew Walker at UC Berkeley explains that caffeine blocks adenosine receptors in your brain. Adenosine is the chemical that builds up throughout the day and makes you feel sleepy. Caffeine does not remove this sleepiness — it just hides it. When caffeine clears your system the adenosine floods back all at once.
What happens to your sleep with caffeine at bedtime:
- Deep sleep (slow wave sleep) is reduced
- You wake up more frequently during the night
- Total sleep time decreases
- Sleep quality drops even if you fall asleep quickly
- You feel less rested in the morning
The key takeaway: you do not need to feel wired for caffeine to be ruining your sleep.
Learn more about how caffeine affects your sleep in our complete guide →
How We Calculate Your Caffeine Level
Our calculator uses the standard pharmacokinetic formula used in sleep and caffeine research:
Example:
You drink a Brewed Coffee (96mg) at 8:00 AM with average metabolism (5hr half-life):
- At 1:00 PM (5hrs): 96 × 0.5¹ = 48mg
- At 6:00 PM (10hrs): 96 × 0.5² = 24mg
- At 11:00 PM (15hrs): 96 × 0.5³ = 12mg
When you add multiple drinks the calculator adds the remaining caffeine from each drink together at any given time to show your total caffeine level throughout the day.
All caffeine values are sourced from published nutritional databases and manufacturer data. Half-life values are based on peer reviewed pharmacokinetic research.
What Time Should You Stop Drinking Coffee?
A simple rule: stop caffeine at least 10 hours before your bedtime.
| Bedtime | Stop Caffeine By |
|---|---|
| 9:00 PM | 11:00 AM |
| 10:00 PM | 12:00 PM noon |
| 11:00 PM | 1:00 PM |
| 12:00 AM | 2:00 PM |
If you are a slow metabolizer or pregnant you should stop even earlier — at least 14 hours before bed.
Use the calculator above to find your exact personal cutoff time based on your metabolism speed and bedtime.
Frequently Asked Questions
How long does caffeine stay in your system?▼
For most people caffeine has a half-life of 5 hours meaning half is eliminated every 5 hours. It takes around 10 to 12 hours for most caffeine to clear your system. However this varies based on your metabolism, age, medications and whether you are pregnant.
What is the half-life of caffeine?▼
The average caffeine half-life is 5 hours for healthy adults. This can range from 3 hours for fast metabolizers to 8 hours for slow metabolizers. During pregnancy caffeine half-life increases to 10–15 hours.
Does caffeine affect sleep even if I feel fine?▼
Yes. Research using EEG sleep studies shows that caffeine reduces deep sleep and total sleep time even in people who feel completely unaffected. Tolerance to caffeine masks how you feel but does not protect your brain from the sleep disruption.
What time should I stop drinking coffee?▼
With a 5 hour half-life you should stop caffeine at least 10 hours before bed. For a 10pm bedtime that means stopping by noon. Slow metabolizers should stop by 10am or earlier.
How much caffeine is safe per day?▼
Health authorities including the FDA recommend a maximum of 400mg of caffeine per day for healthy adults. For pregnant women the limit drops to 200mg per day. Our calculator tracks your daily total and warns you when you approach these limits.
Does caffeine half-life change during pregnancy?▼
Yes significantly. During pregnancy caffeine half-life increases to between 10 and 15 hours. This means caffeine stays in both the mother and baby's system much longer. Our calculator includes a pregnancy mode that adjusts all calculations accordingly.
Why do some people process caffeine faster than others?▼
Caffeine is metabolized primarily by the CYP1A2 enzyme in the liver. Genetic variations in this enzyme mean some people break down caffeine 2 to 3 times faster than others. Smoking, certain medications and hormonal contraceptives also affect how quickly your body processes caffeine.
Can I build tolerance to caffeine's sleep effects?▼
You can build tolerance to how caffeine makes you feel. But research shows this tolerance does not extend to sleep quality. EEG studies show that even regular coffee drinkers experience measurable reductions in deep sleep from evening caffeine.
Does exercise help clear caffeine faster?▼
Regular exercise can increase CYP1A2 enzyme activity over time which may slightly speed up caffeine metabolism. However there is no quick fix — you cannot exercise caffeine out of your system in a few hours.
Is decaf coffee really caffeine free?▼
No. Decaf coffee still contains a small amount of caffeine — typically 5 to 15mg per 8oz cup. For most people this is negligible but sensitive individuals or pregnant women should be aware.
Sources & Research
- - Drake, C. et al. (2013). Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed. Journal of Clinical Sleep Medicine
- - Walker, M. (2017). Why We Sleep. Scribner. UC Berkeley
- - U.S. Food and Drug Administration — Spilling the Beans: How Much Caffeine is Too Much
- - National Institutes of Health — Caffeine and the CYP1A2 enzyme
- - Harvard Medical School — Healthy Sleep — Caffeine and Sleep
Written by the CaffeineMath.com Team
CaffeineMath.com was built to help people understand the real relationship between caffeine and sleep. Our calculator is based on peer reviewed pharmacokinetic research and is updated regularly to reflect the latest science. We are not medical professionals — always consult your doctor for personalized health advice.
Last updated: March 2026
This tool is for informational purposes only and does not constitute medical advice. Individual caffeine metabolism varies. Consult your healthcare provider for personalized guidance especially if you are pregnant, taking medications or have a medical condition.