Caffeine and Bedtime Calculator
Estimate how much caffeine from your drinks is left at bedtime and when it falls to a level you choose, using an adjustable half-life.
Result
Fill in the fields above, then press Calculate.
The caffeine calculator estimates how much caffeine from your drinks is still in your body at bedtime, and when it will fall to a level you choose. Enter up to four drinks with the time you had each one, set your bedtime and, if you want, your own caffeine half-life. It works as a caffeine half-life calculator too: change the half-life and watch the amount left change.
Examples
A typical day: coffee at 8:00 AM, espresso at 1:00 PM, cola at 4:00 PM
Bedtime 11:00 PM, half-life 5 hours. The three drinks add up to 200 mg, and about 43.3 mg is still in the body at bedtime. The level falls to 25 mg at 2:58 AM (next day).
One afternoon coffee at 2:00 PM, bedtime 10:00 PM
A 95 mg coffee taken 8 hours before bed leaves 31.3 mg at a 5-hour half-life, about 33% of the dose. It falls to 25 mg at 11:38 PM.
The same coffee with a longer half-life of 8 hours
With a slower 8-hour half-life the same coffee leaves 47.5 mg at 10:00 PM, one full half-life of decay. It falls to 25 mg at 5:24 AM (next day).
Caffeine left from a 100 mg drink by hours since drinking (5-hour half-life)
| Hours since the drink | Caffeine left | Share left |
|---|---|---|
| 0 h | 100 mg | 100% |
| 1 h | 87.1 mg | 87% |
| 2 h | 75.8 mg | 76% |
| 3 h | 66 mg | 66% |
| 4 h | 57.4 mg | 57% |
| 5 h | 50 mg | 50% |
| 6 h | 43.5 mg | 44% |
| 8 h | 33 mg | 33% |
| 10 h | 25 mg | 25% |
| 12 h | 19 mg | 19% |
| 15 h | 12.5 mg | 13% |
| 20 h | 6.3 mg | 6% |
| 24 h | 3.6 mg | 4% |
Caffeine half-life calculator: mg left from a 100 mg drink by half-life
| Half-life | After 4 hours | After 8 hours | After 12 hours |
|---|---|---|---|
| 3 h | 39.7 mg | 15.8 mg | 6.3 mg |
| 4 h | 50 mg | 25 mg | 12.5 mg |
| 5 h | 57.4 mg | 33 mg | 19 mg |
| 6 h | 63 mg | 39.7 mg | 25 mg |
| 8 h | 70.7 mg | 50 mg | 35.4 mg |
Typical caffeine in the drink presets (approximate)
| Drink | Serving | Typical caffeine |
|---|---|---|
| Brewed coffee | 8 fl oz cup | about 95 mg |
| Espresso | 1 shot (1.5 fl oz) | about 65 mg |
| Black tea | 1 cup | about 47 mg |
| Cola | 12 fl oz can | about 40 mg |
| Energy drink | 8 fl oz | about 85 mg |
Frequently Asked Questions
How long does caffeine stay in your body?
It depends on the person. The Sleep Foundation says caffeine has a half-life of anywhere between 2 and 12 hours. This calculator defaults to 5 hours and lets you change it. With a 5-hour half-life, half of a dose is left after 5 hours, a quarter after 10 hours and an eighth after 15 hours.
What is a caffeine half-life calculator?
It works out how much caffeine remains after a given time, using the half-life: the time the body takes to clear half of it. Set the half-life field to the figure you want to test, for example 3 hours for faster clearance or 8 hours for slower, and the amount left at bedtime updates. The second table above shows the amounts for a 100 mg drink at several half-lives.
How do I find my own caffeine half-life?
There is no simple home test, and the calculator cannot measure it. A practical approach is to try a few values and see which timing matches how caffeine affects your sleep. The Sleep Foundation says the half-life differs with factors such as pregnancy, smoking and genetics. A clinician or pharmacist can talk through your own situation, including any medicines you take.
When should I stop drinking caffeine before bed?
The Sleep Foundation suggests a minimum of eight hours before bedtime. This calculator takes a different, personal approach: it shows how much is left at your bedtime and when the level reaches a target you set. Both are planning aids, and people differ in how much caffeine affects their sleep.
Why does the half-life differ between people?
The Sleep Foundation lists pregnancy (a half-life about twice as long in later stages), frequent smoking (up to 50% shorter) and genetics among the factors, and medications can change it as well. That is why the half-life is an input here. If any of these apply to you, adjust the field and speak to a clinician for personal guidance.
What does the FDA say about daily caffeine?
For most adults, the FDA has cited 400 milligrams a day, about two to three 12-fluid-ounce cups of coffee, as an amount not generally associated with negative effects. It also gives ranges for common drinks, for example 113 to 247 mg in a 12-ounce brewed coffee and 41 to 246 mg in a 12-ounce energy drink. This calculator is about timing before bed, not about daily totals, and individual needs differ.
Where do the drink amounts come from?
The presets use typical figures from the Harvard T.H. Chan School of Public Health Nutrition Source: about 95 mg in an 8-ounce cup of brewed coffee, 65 mg in an espresso shot, 47 mg in a cup of black tea, 40 mg in a 12-ounce cola and 85 mg in 8 ounces of energy drink. Real products vary, so use the custom amount when you know the number.
Does the calculator count a drink I had yesterday?
No. All drinks are taken as one day, so caffeine from the day before is not counted. Late-evening caffeine the night before can still matter for the next day, which is one reason the half-life is worth testing.
Related Information
Related sleep tools
- Sleep calculators and guides - every sleep calculator and bedtime guide in one place.
- Sleep Cycle Calculator - Bedtimes and wake-up times from 90-minute sleep cycles.
- Nap Calculator - When to set the alarm for a 20-minute or 90-minute nap.
- Sleep Debt Calculator - How many hours short of your target the last week left you.
Key Terms
- Half-life
- The time the body takes to clear half of the caffeine in it. After two half-lives a quarter is left.
- Exponential decay
- A steady proportional fall: the same share is cleared in each equal period of time.
- Milligram (mg)
- The unit used for caffeine amounts. A thousandth of a gram.
Sources
- Sleep Foundation: Caffeine and Sleep — Sleep Foundation
- Harvard T.H. Chan School of Public Health: Caffeine, The Nutrition Source — Harvard T.H. Chan School of Public Health
- FDA consumer update: Spilling the Beans — U.S. Food and Drug Administration
Result
Your result appears here and follows you as you scroll.
Related Calculators
Quick Tips
- •The Sleep Foundation suggests stopping caffeine a minimum of eight hours before bedtime; for a 10 PM bedtime that means nothing after 2 PM. Use the calculator to see what your own drinks leave behind.
- •Moving a drink earlier in the day lowers the amount left at bedtime more than shrinking the drink does.
- •If caffeine seems to affect you for longer than the calculator suggests, try a longer half-life and see how the timing changes.
- •Check labels for products with caffeine, such as pre-workout drinks, tea, chocolate and some medicines, and add them with the custom amount.