Caffeine calculator

How much caffeine is still in you at bedtime?

Caffeine does not have to keep you awake to cost you sleep quality. Add what you drank and when, then see how much is still working when you get into bed.

What did you drink today?

Still active at bedtime

0MG

Where do these thresholds come from?

The 30 mg line comes from Gardiner et al. (2023), a meta-analysis of 24 studies in Sleep Medicine Reviews. To avoid reduced total sleep time it recommends leaving 8.8 hours after a 107 mg coffee and 13.2 hours after a 217 mg pre-workout serving. Both come out at roughly 30 mg still circulating at bedtime. The upper marker comes from Drake et al. (2013), where 400 mg taken 6 hours before bed, about 175 mg by bedtime, cut objectively measured sleep by more than an hour while participants reported noticing nothing.

Night Moves is a non-stimulant focus tool with no half-life to plan around. Try it instead of a coffee.

Sources and method

This uses first-order elimination, the standard model for caffeine clearance: the amount remaining halves once per half-life. Half-life varies between people, roughly 4 to 6 hours for most healthy adults, and runs longer during pregnancy or with oral contraceptives and shorter in smokers. The chart shows that range as a band rather than one line.

Caffeine figures are typical values for a standard serving and vary by brew, bean and brand. Edit the milligrams on any row if you know your own.

Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Med Rev. 2023. PMID: 36870101
Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013. PMID: 24235903
Institute of Medicine. Caffeine for the Sustainment of Mental Task Performance. National Academies Press, 2001.
Nehlig A. Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev. 2018. PMID: 29514871

What this number actually means

The figure above is how much caffeine is still circulating when you get into bed. Not how much you drank. Not how awake you feel. How much is still chemically active while you are trying to sleep.

That gap matters, because the two are not the same thing. You can fall asleep on time with a meaningful amount of caffeine in your system. The falling asleep is not the part caffeine takes from you. The depth is.

How long caffeine actually stays in your system

Caffeine clears on a half-life, which means a fixed proportion leaves every few hours rather than a fixed amount. For most healthy adults that half-life runs somewhere between four and six hours.

Take a 200 mg cold brew at 3pm, using a five hour half-life:

  • 8pm: 100 mg left
  • 1am: 50 mg left
  • 6am: 25 mg left

This is why the afternoon coffee is the one that costs you. It is not that it feels strong at bedtime. It is that a quarter of it is still there when your alarm goes off.

The chart above draws a band rather than a single line because that four to six hour range is real variation between people, not measurement noise. Your own clearance sits somewhere in it, and probably stays there.

How much caffeine is in what you drink

Typical amounts for a standard serving. Real values move a lot with brew strength, bean and brand, which is why every row in the calculator stays editable.

Drink Caffeine
Brewed coffee, 8 oz 95 mg
Espresso, 1 shot 64 mg
Latte or cappuccino, 2 shots 128 mg
Cold brew, 12 oz 200 mg
Instant coffee, 8 oz 62 mg
Black tea, 8 oz 47 mg
Green tea, 8 oz 28 mg
Matcha, 1 tsp 70 mg
Energy drink, 8.4 oz 80 mg
Large energy drink, 16 oz 160 mg
Cola, 12 oz 34 mg
Pre-workout, 1 scoop 200 mg
Decaf coffee, 8 oz 2 mg

Cold brew and pre-workout are the two that surprise people. A single cold brew can carry more caffeine than two brewed coffees, and it is usually drunk later in the day.

Does body weight or age change the answer?

Less than you would expect, which is why this calculator does not ask for either.

How fast you clear caffeine is mostly down to one liver enzyme, CYP1A2, and how active it is in you is largely genetic. Two people of the same weight and age can sit at opposite ends of the four to six hour range. Body weight shifts the concentration you start with a little, but it does not do much to the rate of clearance, and asking for it would imply a precision the underlying science does not support.

Four things do move it, and they move it more than weight:

  • Pregnancy. Clearance slows considerably, and in the third trimester the half-life can roughly double.
  • Oral contraceptives. Also roughly double the half-life.
  • Smoking. Speeds clearance up, roughly halving the half-life.
  • Some medications. Several interact with the same enzyme in both directions.

If one of those applies to you, read the slower or faster edge of the band rather than the middle line.

If your number came back high

The fix is timing, not willpower. Nothing speeds up caffeine clearance once it is in you. No amount of water, food, or exercise meaningfully changes the curve. The only lever is when you drink it.

  • Move the cutoff, do not cut the amount. Most people get more back from shifting the last coffee three hours earlier than from dropping a cup entirely.
  • Find your real last dose. The 4pm one people forget about is usually the one doing the damage, not the 7am one they think of as their caffeine habit.
  • Watch the late-day formats. Cold brew, pre-workout and large energy drinks carry two to three times what a standard coffee does, and tend to be consumed after lunch.
  • Give it a week before you judge it. Sleep quality changes are easier to feel across several nights than on any single one.

Frequently asked questions

Does caffeine stop working if I drink it every day?

No, and that is worth being clear about. Caffeine keeps working. What happens with daily use is that tolerance builds, so the amount needed to get the same effect creeps upward over time. The problem is not that it stops working. It is that the dose grows while the half-life stays the same, so there is more of it in you at bedtime each month.

I fall asleep fine after coffee. Does that mean it is not affecting me?

Not necessarily. Sleep onset and sleep depth are separate things, and caffeine affects the second more reliably than the first. In one controlled trial, participants given caffeine six hours before bed lost more than an hour of measured sleep and their own sleep diaries reported nothing unusual. Falling asleep on time is not evidence that the night went well.

Can I speed up how fast caffeine leaves my system?

Not meaningfully. Hydration, food and exercise do not change the clearance rate. The curve runs at whatever pace your liver sets, and the only real variable you control is the starting time.

How much caffeine is safe in a day?

The FDA describes up to 400 mg a day as not generally associated with negative effects for most healthy adults. That is a daily total, and it is a separate question from timing. You can stay comfortably under 400 mg and still have plenty in your system at bedtime if most of it lands after lunch.

Is decaf actually caffeine free?

No, but it is close enough not to matter here. A cup of decaf carries roughly 2 mg against 95 mg for regular. At that level it does not move the number above in any way you would notice.

What we make

Night Moves is a non-stimulant focus tool built for people who need to concentrate in the evening and would rather not spend the night paying for it. No caffeine, so there is no half-life to plan around and no curve like the one above.

It is a tool for doing the thing. If the number above is the reason you are here, that is the problem it was built for.