SnoozeMetrics · Caffeine Cut-off Calculator
Your last coffee,
timed by half-life.
Caffeine leaves your system gradually, one half-life at a time. Set your bedtime and how much caffeine you're having, and we'll estimate the latest time to have it so it's mostly cleared by lights-out.
Typical amounts, varies by brand and serving size.
General guidance based on an average half-life; individual metabolism varies with genetics, pregnancy, liver function, and medications. This isn't medical advice.
How caffeine affects your sleep
Why caffeine lingers longer than it feels like
Caffeine does not simply wear off once the initial jolt fades. It is cleared from the body gradually, on a curve described by its half-life: the time it takes for your body to eliminate half of the amount you consumed. According to a pharmacokinetics review published on the National Library of Medicine's PMC platform, caffeine's average half-life in healthy adults is around 5 hours, with a documented range of roughly 1.5 to 9.5 hours depending on the person.
That range is the reason the calculator above asks for both the amount of caffeine and the time you consumed it, rather than giving one fixed cutoff time for everyone.
Why 200 mg at 3 p.m. still matters at 11 p.m.
Half-life math means caffeine fades slowly, not all at once. Using a 5-hour average half-life, 200 mg consumed at 3 p.m. leaves roughly 100 mg still active by 8 p.m., and around 50 mg by 1 a.m. Harvard Health puts it plainly: it can take up to six hours to clear just half of the caffeine from your body, so a dose taken in the mid-afternoon can still be measurably present at 4 a.m. for some people.
Even a relatively small residual amount can be enough to affect sleep quality for people who are sensitive to caffeine, even if it is no longer enough to feel obviously "awake."
How much caffeine is actually in what you drink
Caffeine content varies by product, brand, and serving size, so the numbers below are general reference points rather than exact figures. According to Mayo Clinic's caffeine content chart:
- Brewed coffee (8 oz): commonly falls around 95-200 mg, depending on the beans and brew method.
- Espresso (1 oz shot): typically in the range of 47-75 mg per shot.
- Brewed tea (8 oz): generally lower than coffee, often in the 14-70 mg range depending on type and steep time.
- Energy drinks: Mayo Clinic notes most contain roughly 100-300 mg of caffeine per serving, though some products run higher.
- Cola (12 oz): typically a smaller dose, often in the range of 22-40 mg.
Mayo Clinic also notes that up to 400 mg a day is considered a reasonable upper limit for most healthy adults, roughly equivalent to four cups of brewed coffee, though that figure is a general population guideline rather than a personal recommendation.
The common "cut off 6-8 hours before bed" guidance
Several health sources converge on a similar rule of thumb. The Sleep Foundation recommends avoiding caffeine for at least eight hours before bedtime, while Harvard Health suggests caffeine-sensitive individuals stop by early-to-mid afternoon. None of these are exact deadlines that apply to everyone; they are practical starting points based on average half-life, meant to give most of a typical dose time to clear before sleep.
If your regular bedtime is later or earlier than average, the useful number is hours before bed, not a fixed clock time. The calculator above applies this logic to your own numbers rather than a generic time of day.
Individual factors that change the picture
Caffeine metabolism is not the same for everyone, and the National Library of Medicine highlights several documented sources of variation:
- Genetics: variation in the liver enzyme primarily responsible for breaking down caffeine means some people naturally clear it much faster or slower than average.
- Pregnancy: caffeine's half-life lengthens substantially during pregnancy, particularly in later stages, meaning the same dose stays active far longer.
- Smoking: nicotine use has been shown to shorten caffeine's half-life, so frequent smokers may clear caffeine faster than non-smokers.
- Certain medications: some drugs interact with the same liver pathway used to metabolize caffeine, slowing clearance.
Anyone who is pregnant, managing a health condition, or taking medication that might interact with caffeine should talk to a doctor or pharmacist about what amount and timing makes sense for them personally, rather than relying on general averages.
Body weight, regular caffeine intake, and even the amount of food in your stomach when you consume it can shift absorption speed and how strong the effects feel, though these factors influence intensity more than the underlying half-life itself. Someone who drinks coffee daily may also feel less of an obvious jolt than an occasional drinker consuming the same amount, since regular use builds a degree of tolerance to caffeine's alerting effects, even though the compound is still being metabolized on roughly the same timeline in the body.
Decaf is not zero
"Decaffeinated" does not mean caffeine-free. Decaf coffee typically still contains a small amount of caffeine per cup, generally a few milligrams rather than none. For most people this is negligible, but for someone who is highly caffeine-sensitive, or who drinks several cups of decaf in an evening, that residual amount can add up enough to be worth accounting for. Treat decaf as low-caffeine rather than no-caffeine when timing is tight against bedtime.
Using caffeine alongside naps and sleep timing
Caffeine and sleep timing interact in more than one direction. If you rely on an afternoon coffee to get through a slump, comparing that against a short nap can be useful, since a brief nap addresses the same afternoon dip without adding a substance that may still be active near bedtime. Once you know roughly how much caffeine is likely left in your system at your target bedtime, the sleep cycle calculator can help you choose a bedtime and wake time that still lines up with full 90-minute cycles.
When to see a professional
Occasional trouble sleeping after a late coffee is common and not usually cause for concern. It is worth talking to a doctor if you regularly struggle to fall asleep even when you have avoided caffeine for many hours, if you experience a racing heart, anxiety, or digestive issues after normal amounts of caffeine, or if you are pregnant, on medication, or managing a health condition and are unsure how caffeine fits into your routine. A healthcare professional can give guidance specific to your situation in a way general averages cannot. See the Medical Disclaimer for more detail.
Feeling the afternoon slump instead of reaching for another coffee?
Try the nap calculator