Free tool · no sign-up

Caffeine half‑life calculator

Add your drinks and your bedtime. See how much caffeine is still in you when you lie down, and the last time for a coffee.

Your bedtime

Your drinks today

  • 8:00 AM Brewed coffee, 12 oz 180 mg
  • 2:30 PM Black tea, 8 oz 47 mg

How fast your body clears it

Half-life, the time to clear half. Smoking speeds it up. The pill and pregnancy slow it down.

Still in you at 11:00 PM

37mg

Left of the 227 mg you had before bed. The FDA cites 400 mg a day for most adults.

Last coffee for an 11:00 PM bedtime

5:00 PM At least 6 hours before bedThe NHS's rule for tea and coffee
2:10 PM 8.8 hours for a cup of coffeeFrom a 2023 review of 24 studies
About 5 hours to clear half
Caffeine's average half-life in healthy adults, anywhere from 1.5 to 9.5 hours between people. NCBI
You may not feel it
In a 2025 trial, a late 400 mg dose cut people's sleep without them noticing. Sleep, 2025
An estimate, not a test
Drinks vary a lot: a 12 oz coffee can hold 113 to 247 mg. FDA

Caffeine cut-off

Sleep on time, then get up at the first alarm.

Bed Quitter is an alarm that keeps ringing until you get out of bed and move. You pick one of seven moves, your phone's camera counts a few reps, and no photo or video from the camera leaves your phone.

Out December 1 on Android and iPhone. One email at launch, nothing else. Privacy

Or try it now: let your camera count 5 squats

A woman stretching her arms overhead beside a sunny window, up and out of bed.

How the calculator works

Your body clears caffeine at a steady rate: every half-life, half of what's left is gone. The calculator takes each drink, counts the hours from it to your bedtime, and halves its caffeine once for every half-life in between.

With the average 5-hour half-life, the 180 mg coffee at 8:00 AM is 15 hours before bed, three half-lives, so 22.5 mg is left. The 47 mg tea at 2:30 PM is 8.5 hours before bed, leaving 14.5 mg. Together that's about 37 mg when you lie down.

It counts each drink as all in you the moment you have it. Caffeine really takes up to an hour to peak, so the numbers lean slightly high, which is the safer side for sleep.

What the studies found

In a 2013 study, 400 mg of caffeine taken at bedtime, 3 hours before or 6 hours before each disturbed sleep at home. Even at 6 hours, people lost enough sleep that the authors backed the advice to stop at least 6 hours before bed (Drake 2013).

A 2023 review of 24 studies found caffeine cut sleep by 45 minutes on average and left less deep sleep. To keep the full night, it put a cup of coffee at least 8.8 hours before bed, and a pre-workout drink at least 13.2 hours (Gardiner 2023).

The same team's 2025 trial found 100 mg, less than a 12 oz coffee, made no clear difference up to 4 hours before bed. 400 mg within 12 hours of bed did, and people often didn't feel it (Gardiner 2025).

Caffeine in common drinks

DrinkSizeCaffeine
Brewed coffee12 fl oz113 to 247 mg
Black tea12 fl oz71 mg
Green tea12 fl oz37 mg
Cola or soda12 fl oz23 to 83 mg
Energy drink12 fl oz41 to 246 mg
Decaf coffee8 fl oz2 to 15 mg

From the FDA. Where it gives a range, the calculator takes the middle, so a 12 oz brewed coffee counts as 180 mg.

Questions people ask

How long does caffeine stay in your system?

Half of it is gone in about 5 hours on average, but that ranges from 1.5 to 9.5 hours between people. After two half-lives a quarter is left, after three an eighth. So a coffee at 8 AM still leaves about an eighth of its caffeine at 11 PM.

When should I stop drinking coffee?

The NHS says no tea or coffee for at least 6 hours before bed. A 2023 review of 24 studies put it later for a cup of coffee: at least 8.8 hours before bed, and 13.2 hours for a pre-workout drink. For an 11 PM bedtime, that's 5 PM or about 2 PM.

Caffeine doesn't keep me up. Does it still matter?

It can. In a 2025 trial, 400 mg within 12 hours of bed disturbed people's sleep on the monitors, yet they often didn't rate their sleep any worse. Falling asleep fine doesn't mean the sleep was as deep or as long.

How much caffeine is too much in a day?

The FDA cites 400 mg a day as an amount not generally linked to harmful effects in most adults. Europe's food safety agency says the same, and adds 200 mg at a time. Both say it's different in pregnancy, so ask your doctor or midwife.

Does decaf have caffeine?

A little. The FDA puts an 8 oz cup of decaf at 2 to 15 mg, against 113 to 247 mg for a 12 oz brewed coffee.

Why are the drink amounts only estimates?

Coffee varies with the beans, the brew and the cup, and energy drinks and sodas with the brand. The calculator takes the middle of the FDA's range. If the can or the coffee shop gives a number, pick Something else and type it.

Sources

Facts checked on . An estimate from averages, not medical advice.

For your website

Put this calculator on your site

Free for blogs, schools and sleep clinics. Paste the code into any page that takes HTML. It fits phones, shows no ads and sets no cookies.

Colours

The code

<iframe src="https://bedquitter.app/embed/caffeine-cutoff-calculator/" title="Caffeine half-life calculator" width="100%" height="1110" style="border:0;max-width:560px" loading="lazy"></iframe>
<p><a href="https://bedquitter.app/tools/caffeine-cutoff-calculator/">Caffeine half-life calculator</a> by Bed Quitter</p>

Keep the line under the frame: it tells your readers where the calculator comes from.

How it looks