Bodyvault

Caffeine calculator

Caffeine calculator: how much caffeine is left at bedtime

Caffeine leaves the body slowly: about half of it is still there 5 hours after a drink, on average. Add your drinks to see how much is left at bedtime and the latest cut-off times from sleep research.

Your caffeine at bedtime

Pick up to three drinks. The caffeine figures are typical values; your label may differ.

Pregnancy and hormonal contraceptives make it slower; smoking makes it faster.

Example: coffee at 8:00 and 15:00, bed at 23:00

Caffeine at bedtime

43 mg

Share of what you had

23%

Latest coffee (8.8 h rule)

14:12

Latest pre-workout (13.2 h rule)

09:48

How long caffeine lasts

Caffeine is absorbed within about an hour and then cleared by the liver at a steady rate. The time it takes for half to go is the half-life: 4 to 6 hours on average in adults, but anywhere from about 1.5 to 10 hours between people. Hormonal contraceptives can roughly double it, it is longer in pregnancy, and smoking speeds clearance up. After two half-lives a quarter is left, after three an eighth.

Caffeine left from a 100 mg coffee

  • Fast (3 h half-life)
  • Typical (5 h)
  • Slow (8 h)
Caffeine left from a 100 mg coffeeThree falling curves from 100 mg. With a 3-hour half-life about 6 mg is left after 12 hours; with 5 hours, about 19 mg; with 8 hours, about 35 mg. 0255075100 04812162024 Hours after the drink Caffeine left (mg) 19 mg at 12 h Caffeine left from a 100 mg coffeeThree falling curves from 100 mg. With a 3-hour half-life about 6 mg is left after 12 hours; with 5 hours, about 19 mg; with 8 hours, about 35 mg. 0255075100 04812162024 Hours after the drink mg left 19 mg at 12 h
Calculated by halving every half-life. Real curves rise over the first hour while caffeine is absorbed.
Caffeine left from 100 mg, by half-life
Hours after 100 mgFast (3 h)Typical (5 h)Slow (8 h)
2 h63 mg76 mg84 mg
4 h40 mg57 mg71 mg
6 h25 mg44 mg59 mg
8 h16 mg33 mg50 mg
10 h10 mg25 mg42 mg
12 h6 mg19 mg35 mg

When to stop caffeine before bed

A 2023 meta-analysis pooled 24 studies of caffeine and sleep. On average, caffeine cut total sleep by about 45 minutes and sleep efficiency by about 7 percentage points, and made it take longer to fall asleep. From the pattern across studies, the authors suggested having a typical cup of coffee (about 107 mg) at least 8.8 hours before bed, and a typical pre-workout dose (about 217.5 mg) at least 13.2 hours before. The full research is explained in caffeine and sleep.

An earlier trial gave people 400 mg, the amount in two or three strong coffees, at bedtime, 3 hours before or 6 hours before. Even at 6 hours, sleep measured at home was more than an hour shorter, although people didn’t feel that their sleep was much worse.

  • −45min

    total sleep, on average, after caffeine

  • 8.8h

    suggested gap between a coffee and bed

  • 13.2h

    suggested gap for a pre-workout dose

Caffeine in common drinks

Typical caffeine per serving (USDA FoodData Central)
DrinkTypical caffeine
Brewed coffee, 240 ml (8 fl oz)95 mg
Espresso, one shot (30 ml)63 mg
Instant coffee, 240 ml62 mg
Black tea, 240 ml47 mg
Green tea, 240 ml28 mg
Cola, 355 ml can33 mg
Energy drink, 250 ml can75 mg

Brewing strength, bean and serving size change these a lot: a large café coffee can hold more than 300 mg. Pre-workout powders range from under 100 to over 300 mg per scoop, so read the label.

How much caffeine is safe?

Europe’s food safety authority (EFSA) and the US FDA put the safe amount for most healthy adults at up to 400 mg a day, with single doses up to about 200 mg not raising safety concerns. During pregnancy, EFSA’s limit is 200 mg a day. Sleep is affected at much lower amounts than those limits, which is why timing matters more than the daily total for sleep.

Why caffeine affects people differently

  • Genes. Variants in the liver enzyme that breaks caffeine down make some people fast and others slow clearers.
  • Smoking speeds clearance; pregnancy and oral contraceptives slow it, as can some medicines and liver disease.
  • Habit. Regular drinkers grow somewhat tolerant to caffeine’s alertness effect, but its effect on sleep doesn’t go away entirely.

The full research picture is in caffeine and sleep: what the studies show.

Caffeine in Bodyvault

When you log coffee or tea, Bodyvault can send a gentle caffeine cut-off reminder about 8 hours before your usual bedtime, and its sleep and Readiness views show the night beside what you drank.

Privacy

The calculation runs in this page. Nothing you type is sent to a server, saved in your browser or put into the address bar; reloading the page restores the example. The site’s usual behaviour is in the privacy policy.

Questions

How long does caffeine last?

Its half-life averages 4 to 6 hours in adults, so with a 5-hour half-life a quarter of a morning coffee is still in your body 10 hours later. Some people clear it much faster, others take twice as long or more.

When should I stop drinking coffee before bed?

A 2023 meta-analysis suggests at least 8.8 hours before bed for a typical coffee and 13.2 hours for a strong pre-workout dose. For a 23:00 bedtime, that is about 14:00 for coffee.

How much caffeine is too much in a day?

EFSA and the FDA put up to 400 mg a day as safe for most healthy adults, and 200 mg a day during pregnancy (EFSA). Sleep can be affected by much less.

Is my data saved?

No. The calculation runs in the page and nothing is sent anywhere.

Sources

  1. Gardiner C et al. (2023). The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Med Rev 69:101764.
  2. Drake C et al. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med 9(11):1195–1200.
  3. Guest NS et al. (2021). International Society of Sports Nutrition position stand: caffeine and exercise performance. J Int Soc Sports Nutr 18(1):1.
  4. Temple JL et al. (2017). The safety of ingested caffeine: a comprehensive review. Front Psychiatry 8:80.
  5. Nehlig A (2018). Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev 70(2):384–411.
  6. EFSA Panel on Dietetic Products, Nutrition and Allergies (2015). Scientific opinion on the safety of caffeine. EFSA Journal 13(5):4102.
  7. U.S. Food and Drug Administration: Spilling the beans, how much caffeine is too much?
  8. U.S. Department of Agriculture, FoodData Central (SR Legacy).