Bodyvault

Research explained

How long does caffeine last? Caffeine and sleep, explained

Caffeine lingers: its half-life averages about 5 hours, and can be nearly twice that. In a 2023 meta-analysis of 24 studies, caffeine cut sleep by 45 minutes on average, and the cut-off for a cup of coffee was 8.8 hours before bed.

By the Bodyvault team · · 10 min read

Cover: how long caffeine lasts, with a curve of caffeine leaving the body over a day.

The short answer

  • −45min

    average loss of total sleep with caffeine, across 24 studies

  • 8.8h

    cut-off before bed for a cup of coffee (107 mg)

  • 13.2h

    cut-off before bed for a pre-workout supplement (217.5 mg)

  • ≈5h

    average half-life of caffeine, ranging from about 1.5 to 9.5 hours

Key findingDose and timing both matter. A cup of black tea made no measurable difference at any time, a cup of coffee is best kept to before about 1 p.m. for a 10 p.m. bedtime, and a single 400 mg dose disturbed sleep even 12 hours before bed.

What caffeine does to a night’s sleep

A 2023 meta-analysis pooled controlled studies of healthy adults who took caffeine up to 18 hours before bed. Caffeine shortened sleep, made it take longer to fall asleep, added time awake during the night and reduced deep sleep.

Change in sleep with caffeine, in minutes

  • Total sleep time−45.3 (−61.5 to −29.0)
  • Deep sleep (N3)−11.4 (−18.5 to −4.3)
  • Time to fall asleep+9.1 (3.8 to 14.4)
  • Awake after falling asleep+11.8 (2.5 to 21.0)
  • Light sleep (N1)+6.1 (2.3 to 9.9)
Caffeine compared with no caffeine, with 95% confidence intervals (Gardiner et al., 2023). Sleep efficiency fell by 7.0 percentage points (4.0 to 10.0). REM sleep didn’t change significantly.

How long before bed should you stop?

The meta-analysis used dose and timing to estimate a cut-off for common drinks: the earliest time before bed at which the loss of sleep was no longer statistically significant.

Caffeine cut-off before bed, by drink

Hours before bedtime

  • Black tea, 250 ml47 mg of caffeineno cut-off
  • Coffee, 250 ml107 mg8.8 h
  • Pre-workout, one serve217.5 mg13.2 h
Source: Gardiner et al. (2023). Black tea caused no significant loss of sleep at any time. The model still predicts a small loss at each cut-off, so treat them as a minimum gap, not a guarantee.
Caffeine cut-offs from the 2023 meta-analysis (Gardiner et al.)
Drink (typical caffeine)Cut-off before bedLatest time for a 10 p.m. bedtime
Black tea, 250 ml (47 mg)None foundAny time
Coffee, 250 ml (107 mg)8.8 hours1:12 p.m.
Pre-workout supplement, one serve (217.5 mg)13.2 hours8:48 a.m.

The same model puts numbers on smaller choices (our calculation from its coefficients). A cup of coffee is predicted to cost about 10 minutes more sleep than a cup of black tea, and for a 10 p.m. bedtime a dose at 3 p.m. costs about 17 minutes more than the same dose at 9 a.m.

What a 2025 trial added

The same research group then tested two doses directly. Twenty-three healthy men took 100 mg or 400 mg of caffeine 12, 8 or 4 hours before bed, or a placebo, with their sleep measured at home.

100 mg, about a cup of coffee

  • No significant change in any sleep measure
  • Even when taken 4 hours before bed
  • The authors: 100 mg can be taken up to 4 hours before bed

400 mg, a large single dose

  • 4 hours before bed: 50.6 minutes less sleep
  • 8 hours before: 29.1 more minutes awake in the night
  • 12 hours before: 20.6 minutes less deep sleep

Deep sleep after 400 mg of caffeine, by timing

Change in deep (N3) sleep compared with placebo, minutes

  • 12 hours before bed−20.6 min
  • 8 hours before bed−15.3 min
  • 4 hours before bed−29.7 min
Source: Gardiner et al. (2025). 100 mg caused no significant change at any of these times. People mostly didn’t notice the disruption from the 8- and 12-hour doses.

The trial and the meta-analysis don’t fully agree: the trial found no effect of 100 mg even 4 hours before bed, while the meta-analysis predicts some loss for a 107 mg coffee within 8.8 hours. Both rest on small groups of young, healthy people, so treat the 8.8-hour cut-off as a cautious starting point and adjust it from your own sleep.

How long does caffeine last?

Caffeine is almost completely absorbed, 99% within 45 minutes, and peaks in the blood 15 to 120 minutes after you drink it. The body then clears it slowly. The average half-life, the time it takes to clear half, is about 5 hours in healthy adults, but it can range from 1.5 to 9.5 hours. In one small study of 10 healthy young men, it varied from 2.7 to 9.9 hours.

Estimated caffeine left after one dose, by half-life

  • 5-hour half-life (average)
  • 3-hour half-life
  • 7-hour half-life
Estimated caffeine left after one dose, by half-lifeWith a 5-hour half-life, 57% of a dose is left after 4 hours, 33% after 8, 25% after 10 and 19% after 12. With a 3-hour half-life, 25% is left after 6 hours; with a 7-hour half-life, 30% is still left after 12 hours. 0%25%50%75%100% 04812162024 Hours after drinking Share of the dose still in the body half 25% Estimated caffeine left after one dose, by half-lifeWith a 5-hour half-life, 57% of a dose is left after 4 hours, 33% after 8, 25% after 10 and 19% after 12. With a 3-hour half-life, 25% is left after 6 hours; with a 7-hour half-life, 30% is still left after 12 hours. 0%25%50%75%100% 06121824 Hours after drinking Share left half 25%
Our calculation from simple first-order elimination: remaining = dose × 0.5^(hours ÷ half-life). It ignores absorption and assumes the whole dose is absorbed. Your own half-life may be shorter or longer.
Estimated caffeine left with a 5-hour half-life, and the range for 3–7 hours (our calculation)
Hours after drinking100 mg (about one coffee)200 mg
4 hours57 mg (40–67)115 mg (79–135)
8 hours33 mg (16–45)66 mg (31–91)
12 hours19 mg (6–31)38 mg (12–61)

Several things change your half-life. Oral contraceptives tend to double it, smoking roughly doubles how fast caffeine is cleared, and in pregnancy it is on average 8.3 hours longer. Genes matter too: one liver enzyme, CYP1A2, handles 95% of caffeine, and common variations in it make clearance very different from person to person. If you’re pregnant, take regular medicines or have a liver condition, ask your doctor about caffeine. The caffeine calculator lets you try different doses, times and half-lives.

You may not notice it

In a classic 2013 study, 12 healthy sleepers took 400 mg of caffeine at bedtime, 3 hours before or 6 hours before. All three disturbed sleep. Even at 6 hours, measured sleep fell by more than an hour, according to the journal’s summary, yet the participants seemed largely unaware of it. The 2025 trial found the same: most of the disruption from doses taken 8 or 12 hours before bed wasn’t perceived. That is a reason to look at measured sleep, not only at how rested you feel, when you test your caffeine habits.

Safety limits are not sleep limits

Europe’s food safety authority says habitual intakes up to 400 mg a day, spread through the day, raise no safety concerns for healthy adults, nor do single doses up to 200 mg; in pregnancy and breastfeeding the level is 200 mg a day. It also notes that single doses of 100 mg may affect sleep in some adults, particularly close to bedtime. So 400 mg a day is a ceiling for safety, not a dose that leaves your sleep alone.

Claims and evidence

  • ClaimIf I can fall asleep after coffee, it isn’t affecting my sleep.

    EvidenceCaffeine also added time awake in the night and cut deep sleep, and people often didn’t notice.

  • ClaimCaffeine wears off in a few hours, so a mid-afternoon coffee is fine.

    EvidenceThe average half-life is about 5 hours and can reach 9.5. The meta-analysis cut-off for one coffee was 8.8 hours before bed.

  • ClaimA strong morning dose can’t affect tonight’s sleep.

    Evidence400 mg taken 12 hours before bed still cut deep sleep by 20.6 minutes, and the cut-off for a 217.5 mg pre-workout was 13.2 hours.

  • ClaimAny caffeine at night is a problem, even tea.

    EvidenceDose matters: a cup of black tea (47 mg) showed no cut-off, and 100 mg 4 hours before bed showed no significant effect in the trial.

  • ClaimEveryone clears caffeine at the same rate.

    EvidenceHalf-lives ranged from 2.7 to 9.9 hours among 10 healthy young men; genes, hormones and smoking all play a part.

What this means for you

What this means for you

  • For a 10 p.m. bedtime, have your last regular coffee by about 1 p.m., and shift that with your own bedtime.
  • Keep strong doses, such as a pre-workout or 200 mg or more, for the morning: at least 13 hours before bed.
  • Tea and small doses later in the day appear to matter much less.
  • If your sleep seems worse, check your caffeine timing; measured sleep can show what you don’t feel.
  • Pregnant, taking medicines or managing a health condition? Ask your doctor what amount is right for you.

What these studies can’t tell you

  • Everyone’s response. Most participants were young, healthy men with low-to-moderate caffeine habits. Heavy daily users, older adults, teenagers and women on oral contraceptives may respond differently.
  • Several cups a day. The meta-analysis modelled only the last dose of the day, which may underestimate the effect of several cups.
  • Your own cut-off. The cut-offs mark where the loss stopped being statistically significant, not where it disappears, and your half-life may differ a lot from the average.

How Bodyvault uses this research

Bodyvault adds up the caffeine in the drinks and food you log, and in supplements such as pre-workouts. If you’ve logged caffeine recently, it can remind you to switch to caffeine-free drinks 8 hours before your bedtime; you can set that anywhere from 4 to 12 hours. Over time it also compares days with late caffeine (after 2 p.m., or within 8 hours of a planned bedtime) with days without, and tells you only when the difference in your Sleep score or Readiness is clear. See how a sleep score works, try the caffeine calculator, or plan a bedtime with the sleep calculator.

Share or cite this explainer

Bodyvault (2026). How long does caffeine last? Caffeine and sleep, explained. https://bodyvault.app/blog/caffeine-and-sleep

The charts on this page may be reused with a link back to it. The underlying data belong to the studies cited below.

Questions

How long does caffeine last?

Caffeine’s half-life averages about 5 hours in healthy adults, ranging from about 1.5 to 9.5 hours. With a 5-hour half-life, about a quarter of a dose is still in your body 10 hours later (our calculation).

When should I stop drinking caffeine before bed?

A 2023 meta-analysis put the cut-off at 8.8 hours before bed for a cup of coffee (107 mg) and 13.2 hours for a pre-workout supplement (217.5 mg). Black tea had no cut-off.

Does caffeine reduce deep sleep?

Yes. Caffeine cut deep sleep by 11.4 minutes on average in the meta-analysis, and 400 mg taken 12 hours before bed still reduced it by 20.6 minutes in a 2025 trial.

Is it OK to drink tea in the evening?

A cup of black tea (about 47 mg of caffeine) caused no significant loss of sleep at any time in the meta-analysis, though people vary in how quickly they clear caffeine.

How long does a pre-workout keep you awake?

For a typical serve with about 217 mg of caffeine, the meta-analysis cut-off was 13.2 hours before bed, so taking one before evening training is likely to cost some sleep.

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. Gardiner CL et al. (2025). Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep 48(4):zsae230.
  3. 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.
  4. EFSA Panel on Dietetic Products, Nutrition and Allergies (2015). Scientific opinion on the safety of caffeine. EFSA J 13(5):4102.
  5. Antonio J et al. (2024). Common questions and misconceptions about caffeine supplementation: what does the scientific evidence really show? J Int Soc Sports Nutr 21(1):2323919.
  6. Temple JL et al. (2017). The safety of ingested caffeine: a comprehensive review. Front Psychiatry 8:80.
  7. Blanchard J, Sawers SJ (1983). The absolute bioavailability of caffeine in man. Eur J Clin Pharmacol 24(1):93–98.
  8. Nehlig A (2018). Interindividual differences in caffeine metabolism and factors driving caffeine consumption. Pharmacol Rev 70(2):384–411.

General information about fitness and nutrition, not medical advice. If you have a health condition, are pregnant or take medication, talk to your doctor before changing your diet or training.