Caffeine Cutoff Calculator: When to Stop Coffee Before Bed
Quick answer: for a typical adult, a cup of brewed coffee should be finished about 9 to 10 hours before bed to leave roughly 25 mg, and a pre-workout scoop about 15 hours (a 2023 review advised at least 13.2 hours). Your own number depends on how fast you clear caffeine, so enter your bedtime and drinks below and see it for your day.
Your caffeine at bedtime
Above your target, but not by a lot
about 31 mgstill in your body at 11:00 pm
Your target is 25 mg. Half-life used: 5 h.
| Drink | Time | Caffeine | Hours before bed | Left at bedtime | Latest time for this drink |
|---|---|---|---|---|---|
| Brewed coffee (8 oz / 240 ml) | 3:00 pm | 95 mg | 8 h | 31.3 mg | 1:22 pm(9 h 38 min before bed) |
How long before bed should each drink be finished?
The table shows the hours before bedtime a single serving needs to fall to 25 mg, for four common clearance speeds. Slower clearance moves the cutoff much earlier, which is why the same coffee can be fine for one person and ruin another’s night.
| Drink (approx. caffeine) | Fast (smoker) (3.5 h) | Typical adult (5 h) | Oral contraceptive (8 h) | Late pregnancy (10.5 h) |
|---|---|---|---|---|
| Espresso shot (63 mg) | 4 h 40 min | 6 h 40 min | 10 h 40 min | 14 h |
| Brewed coffee (95 mg) | 6 h 44 min | 9 h 38 min | 15 h 24 min | 20 h 13 min |
| Large brewed coffee (190 mg) | 10 h 14 min | 14 h 38 min | 23 h 24 min | 30 h 43 min |
| Black tea (47 mg) | 3 h 11 min | 4 h 33 min | 7 h 17 min | 9 h 34 min |
| Green tea (28 mg) | 34 min | 49 min | 1 h 18 min | 1 h 43 min |
| Cola (34 mg) | 1 h 33 min | 2 h 13 min | 3 h 33 min | 4 h 39 min |
| Energy drink (80 mg) | 5 h 52 min | 8 h 23 min | 13 h 25 min | 17 h 37 min |
| Pre-workout scoop (217 mg) | 10 h 55 min | 15 h 35 min | 24 h 56 min | 32 h 44 min |
Caffeine amounts are approximate. They vary with brand, bean, brewing time and cup size, so check a label where there is one.
How the estimate works
Caffeine is removed from the body at a rate roughly proportional to how much is there, so the amount left follows a simple halving rule: remaining = dose × 0.5(hours ÷ half-life). Several drinks are calculated separately and added together. The calculator treats each drink as fully absorbed at the time you enter, even though blood levels usually peak 30 to 60 minutes later, which makes the first hour slightly conservative.
Where the default 25 mg target comes from
In 2023, a systematic review and meta-analysis of 24 studies found that caffeine cut total sleep time by about 45 minutes and sleep efficiency by about 7%. It advised finishing coffee (107 mg per 250 mL) at least 8.8 hours before bed and a standard pre-workout serve (217.5 mg) at least 13.2 hours before (Gardiner et al., Sleep Medicine Reviews, 2023).
Those two pairs of numbers fit the halving rule. Solving for the two unknowns gives a half-life of about 4.3 hours and a leftover of about 26 mg at bedtime. This is our own back-calculation, not something the authors state, and real dose–response is gradual rather than a sharp threshold. We use 25 mg as a sensible planning default and let you change it.
What the research shows about half-life
- Smoking: mean half-life was 3.5 hours in 13 smokers and 6.0 hours in 13 non-smokers (Parsons & Neims, 1978).
- Oral contraceptives: 7.88 hours in users against 5.37 hours in matched controls (Abernethy & Todd, 1985).
- Late pregnancy: the average rose to 10.5 hours in the last four weeks (Knutti et al., 1982). If you are pregnant, follow your clinician’s advice on how much caffeine is appropriate.
- Individual variation: clearance differs widely between people because of liver enzyme activity, lifestyle and other factors (Nehlig, Pharmacological Reviews, 2018; data pooled from 141 studies in Grzegorzewski et al., 2021).
In a home study of 400 mg caffeine taken 0, 3 or 6 hours before habitual bedtime, all three timings disturbed sleep compared with placebo, which supports staying well clear of bedtime (Drake et al., Journal of Clinical Sleep Medicine, 2013).
What this calculator cannot do
- It does not know your genes, your liver health or your medicines. Some medicines slow caffeine clearance, so ask a pharmacist if you take regular medication.
- It assumes complete absorption at the time you enter and one steady half-life for the whole day.
- It does not measure sleep quality. Some people sleep fine with caffeine in the evening and others do not.
Frequently asked questions
How many hours before bed should I stop drinking coffee?
A 2023 systematic review and meta-analysis advised finishing coffee (about 107 mg) at least 8.8 hours before bedtime and a standard pre-workout serve (about 217 mg) at least 13.2 hours before. For a typical adult and one 8 oz cup of brewed coffee, this calculator gives about 9.6 hours to reach 25 mg. People who clear caffeine slowly need longer.
What does caffeine half-life mean?
It is the time your body takes to remove half of the caffeine in it. With a 5 hour half-life, 200 mg becomes 100 mg after 5 hours, 50 mg after 10 hours and 25 mg after 15 hours. Studies in healthy adults report half-lives of roughly 3 to 7 hours, and individual values vary a lot.
Why does caffeine stay longer for some people?
Caffeine is cleared mostly by one liver enzyme, CYP1A2, and its activity differs between people. Smoking speeds clearance (3.5 hours vs 6.0 hours in one study of 13 smokers and 13 non-smokers). Oral contraceptives slowed it (7.9 hours vs 5.4 hours in matched controls) and late pregnancy lengthened it to about 10.5 hours on average.
Is 25 mg at bedtime a safe or unsafe limit?
Neither. There is no validated safe threshold. 25 mg is the value implied by the 2023 meta-analysis guidance under a simple decay model, so it is a reasonable planning target. Individual sensitivity differs, so if you sleep badly at a certain remaining amount, choose a lower target.
Does decaf matter for sleep?
Decaf contains a small amount of caffeine, usually a few milligrams per cup, so a cup or two rarely changes the total much. If you are very sensitive, add it as a custom drink and see what the calculator shows.
Keep reading
For the full explanation of caffeine, anxiety and cutting back without headaches, read Caffeine half-life: the 3 pm coffee math.
This tool gives general estimates for information only. It is not medical advice. Talk to your doctor if caffeine affects your sleep, heart rhythm or anxiety, or if you are pregnant or taking medicines.