โ How long does caffeine stay in your system?
Caffeine doesn't disappear when you finish your drink. Choose what you had, how much you drank and when you plan to sleep to see an estimated caffeine timeline โ from the first peak through to bedtime.
Your caffeine timeline
Hour by hour
| Time | Estimated caffeine left | Share of the dose |
|---|
If you had it at another time
| Time | When | Estimated left at bedtime |
|---|
This is a simplified estimate: caffeine amounts, absorption times and individual half-lives vary. The chart shows estimated caffeine remaining, not a prediction of sleep quality.
Why your afternoon coffee can follow you to bed
Caffeine fades gradually rather than switching off at a certain hour. The amount remaining falls by roughly half over each half-life, so some caffeine can still be around long after you stop noticing the lift.
That's why the time on the clock matters alongside the size of the drink. The hour-by-hour table shows the estimated amount remaining at different times, including the bedtime you choose. It can't predict exactly how alert or sleepy you'll feel.
Caffeine facts that might surprise you
โ The coffee that came to midnight
Take 100 mg of caffeine at 2 pm. With a five-hour half-life and a 45-minute peak, about 50 mg remains at 7:45 pm and 25 mg at 12:45 am. Your afternoon cup has a surprisingly late encore.
๐ Decaf has a secret
Decaf is not always caffeine-free. Better Health Channel lists roughly 2โ6 mg in a 250 mL serve. That is far below regular coffee, but it means the word "decaf" is not quite the same as "zero".
๐ด Six hours was not enough
In one sleep study, a 400 mg caffeine dose taken six hours before bed still disrupted sleep compared with placebo. That is a fairly big dose, but it shows why a cup's clock time can matter.
๐ Your coffee order changes the maths
A 250 mL instant coffee may have 80โ120 mg of caffeine, while drip coffee can have 150โ240 mg. The brewing method can change the starting number before your body even starts clearing it.
๐ซ Dessert has joined the caffeine club
Chocolate sneaks into the caffeine club. A 50 g milk chocolate bar has about 10 mg, while a 55 g dark chocolate bar can have 40โ50 mg. Dessert can quietly join your drink's caffeine total.
How this caffeine estimate works
- Starting amount: the caffeine in one drink in milligrams, multiplied by the number of drinks. Two 145 mg espressos is 290 mg, not 145.
- Modelled peak: the starting amount is treated as being in the body 45 minutes after the drink time you entered. That is a model convenience โ absorption is not an on/off switch, and a real peak can arrive earlier or later.
- After the modelled peak: what is left falls by half for every half-life you chose โ five hours after the peak at the default, half of the starting amount has gone, and half of that again five hours later.
remaining mg = starting mg ร 0.5 ^ (hours since the peak รท half-life hours)
Worked example: enter 100 mg at 2:00 pm, a five-hour half-life and a bedtime of 11:00 pm. The model places the peak at 2:45 pm, so bedtime comes 8 hours 15 minutes after the peak: 100 ร 0.5^(8.25 รท 5) โ 31.8 mg, shown as about 32 mg. The formula describes the fall after the peak only; the rise before it is drawn as a straight line up to the peak.
Times and bedtime: both entries are clock times on the day of the drink, and the bedtime is read as the next time that clock time comes round. An 11:00 pm coffee and a 7:00 am bedtime are eight hours apart; a 2:30 pm coffee and an 11:00 pm bedtime are eight and a half. If the two times are identical, they are treated as the same moment. A bedtime more than a day later is not modelled.
The 10 mg illustration threshold: the hour-by-hour table runs down to 10 mg โ about a bar of milk chocolate โ rather than pretending the estimate reaches zero. A drink of 10 mg or less is already at that threshold at its modelled peak, so there is no later crossing to show.
How much caffeine is in your drink?
These are examples, not fixed amounts. The caffeine in coffee varies with its size and preparation, and energy drinks vary by brand. Use the label or your own measured estimate when you know it.
| Drink | Serving | Example caffeine |
|---|---|---|
| Espresso | 50 mL cup | 145 mg |
| Energy drink | 250 mL can | 80 mg |
| Instant coffee | 1 teaspoon in 250 mL | 80 mg |
| Black tea | 220 mL cup | 50 mg |
| Cola | 375 mL can | 36 mg |
| Milk chocolate | 50 g bar | 10 mg |
Why caffeine lasts longer for some people
Five hours is the middle of the range for a healthy adult, and the selector is there to compare three scenarios rather than to measure your own metabolism. Most of the difference comes from how quickly the liver enzyme CYP1A2 clears caffeine, which is partly genetic and can be pushed either way.
| What changes it | What happens |
|---|---|
| Your own metabolism, partly genetic | Sets your baseline; the three-to-seven-hour range is where most healthy adults sit |
| Smoking | Clears caffeine faster |
| The combined contraceptive pill | Slows clearance, roughly doubling the half-life |
| Pregnancy, especially the third trimester | Slows clearance further |
| Some medicines | Block CYP1A2, so caffeine stays around longer |
The gap between the ends of the selector is not a rounding error. A 145 mg espresso falls to the 10 mg illustration threshold in about twelve hours at a three-hour half-life, and in about twenty-eight hours at seven โ the difference between a coffee that is effectively gone overnight and one still measurable at breakfast the next day.
Frequently asked questions
How accurate is the result?
It's an estimate. Drink caffeine amounts vary, and people clear caffeine at different speeds. The calculator uses a fixed 45-minute peak and your selected half-life, so focus on the trend rather than an exact milligram reading.
Which half-life should I choose?
Five hours is a simple middle-of-the-road example. Three hours shows a faster decline and seven hours a slower one. These are scenarios to compare, not a test of how quickly your own body processes caffeine.
Does caffeine disappear after one half-life?
No. After one half-life, half of the modelled starting amount remains. After two half-lives, a quarter remains. There isn't a single moment when a half-life calculation suddenly switches to zero.
Why does the calculator ask for bedtime?
It gives the estimate a useful point of comparison. A drink taken earlier in the day has more time to decline before the bedtime you enter, while a later drink leaves less time.
What if I had two coffees or know the exact caffeine amount?
Use How many for identical drinks, or type your own caffeine amount for one drink in milligrams. The starting amount is the per-drink amount multiplied by the quantity. Check the serving size, especially for cafรฉ drinks.
Does decaf, tea or chocolate count?
Yes. All can contain caffeine, though the amounts differ. Use a matching preset when it is listed, or enter the milligrams yourself. A product label is more useful than a generic average when you have one.
More calculators
๐ก Cozy's pick
Not sure where to go next? Let Cozy pick one of his favourites for you to try โ the lighter end of the site, picked at random, and never the one you are reading.
Sources
- Better Health Channel โ Caffeine โ example drink and food caffeine amounts, decaf and variation by preparation.
- healthdirect โ Caffeine โ Australian health information on caffeine, individual variation and pregnancy.
- NCBI Bookshelf โ Caffeine (StatPearls) โ typical adult half-life and factors affecting metabolism.
- US FDA โ Spilling the Beans: How Much Caffeine Is Too Much? โ adult consumption reference and variation across products.
- Drake et al. (2013) โ Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed โ the six-hours-before-bed sleep experiment cited in fun fact 3.
