A 2023 meta-analysis of 24 controlled studies on caffeine and sleep estimated that a standard cup of coffee (250 mL, about 107 mg of caffeine) should be finished at least 8.8 hours before bed, and a typical pre-workout serving (about 217.5 mg) at least 13.2 hours before1. Across the doses tested, caffeine cut total sleep by about 45 minutes on average and reduced deep sleep1. The researchers call their cut-off times a starting point, because people clear caffeine at very different speeds1.
Key takeaways
- Evidence strength: Strong. Controlled studies consistently show caffeine shortens and lightens sleep; the exact cut-off times are estimates from one statistical model1.
- Average effect: across doses mostly between 100 and 600 mg, caffeine meant about 45 minutes less sleep, 7% lower sleep efficiency, 9 minutes longer to fall asleep and less deep sleep1.
- Cut-off times: a cup of coffee at least 8.8 hours before bed; a pre-workout serving at least 13.2 hours; one cup of black tea (about 47 mg) showed no cut-off1.
- Measured vs. felt: in a small study, 400 mg taken 6 hours before bed cut device-measured sleep by more than an hour; the drop in sleep diaries was smaller and not statistically significant2.
- Half-life varies: typically 3 to 6 hours, but from about 2 to 10 hours between healthy adults1.
Cut-off times for coffee and pre-workout come from a 2023 meta-analysis of 24 studies (Gardiner et al., Sleep Medicine Reviews). The curve is an estimate using a constant half-life. Not medical advice.
How caffeine keeps you awake
Caffeine blocks adenosine, a brain chemical involved in the “sleep pressure” that builds the longer you’re awake. That is thought to ease sleep pressure for a while and make you feel less tired and sleepy1. The problem is that caffeine lingers: its half-life, the time it takes your body to clear half of it, is typically 3 to 6 hours but ranges from about 2 to 10 hours in healthy adults1. A coffee at 3 pm can still be partly active at bedtime.

What the research shows
The 2023 meta-analysis
Researchers pooled 24 controlled crossover studies in healthy adults aged 18 to 651. Doses were mostly between 100 and 600 mg, and many studies gave caffeine within three hours of bedtime1. On average across these doses and timings, compared with no caffeine, caffeine:
- reduced total sleep time by about 45 minutes (20 studies measured this)1;
- reduced sleep efficiency by 7%1;
- increased time to fall asleep by 9 minutes1;
- increased time awake after first falling asleep by 12 minutes1;
- increased the lightest stage of sleep (N1) by about 6 minutes and reduced deep sleep by about 11 minutes1.
Most participants were low to moderate habitual caffeine users, so the results may not apply to teenagers, adults over 65 or heavy users1. Five of the 24 studies were judged to be at high risk of bias1.
Cut-off times from the model
Both the dose and the timing of the last caffeine affected total sleep time. From this, the researchers’ model estimated the latest time each drink could be taken without a statistically significant drop in total sleep1:
| Drink in the model | Caffeine | Stop at least… |
|---|---|---|
| Cup of black tea (250 mL) | ~47 mg | No cut-off found |
| Cup of coffee (250 mL) | ~107 mg | 8.8 hours before bed |
| Standard pre-workout serving | ~217.5 mg | 13.2 hours before bed |
If you go to bed at 11 pm, that means your last cup of coffee by about 2 pm and a pre-workout serving by about 9:45 am. These are estimates, not exact rules: the model used only the final dose of the day, and slow metabolizers may need longer1.
The “six hours before bed” experiment
In a small 2013 study, 12 healthy adults took 400 mg of caffeine in pill form at bedtime, three hours before bed or six hours before bed, or a placebo, on different nights2. That dose is about the caffeine in two to three 12-oz cups of brewed coffee3. All three timings significantly disrupted sleep measured with a portable home sleep monitor, and even at six hours, measured total sleep fell by more than an hour2. Participants’ sleep diaries showed a smaller drop of about 40 minutes that wasn’t statistically significant, so the effects of afternoon caffeine may be larger than they feel2.
How much caffeine is in common drinks?
Amounts vary a lot with the brand, bean, leaf and brewing method. The U.S. Food and Drug Administration lists these typical amounts for a 12-fluid-ounce (355 mL) drink, a bigger serving than the 250 mL cup in the meta-analysis3:
| Drink, 12 fl oz (355 mL) | Typical caffeine |
|---|---|
| Brewed coffee, regular | 113–247 mg |
| Black tea | 71 mg |
| Green tea | 37 mg |
| Caffeinated soft drink | 23–83 mg |
| Energy drink | 41–246 mg |
| Decaf coffee, 8 fl oz (240 mL) | 2–15 mg |
Chocolate also contains caffeine, and it can be added to products such as energy bars, chewing gum, dietary supplements and over-the-counter medicines3.
How much caffeine is too much?
For most adults, the FDA has cited 400 mg a day, about two to three 12-oz cups of coffee, as an amount not generally associated with negative effects3. People vary widely in how sensitive they are to caffeine and how fast they clear it3. A daily total that’s fine for your health can still hurt your sleep if it comes late in the day.
In pregnancy, the American College of Obstetricians and Gynecologists says moderate intake, under 200 mg a day, does not appear to be a major factor in miscarriage or preterm birth4. The FDA advises anyone who is pregnant, trying to become pregnant or breastfeeding to ask their health care provider whether they need to limit caffeine3.
How to work out your own cut-off
- Start with your bedtime and count back: 8.8 hours for a cup of coffee (call it 9) and 13.2 hours for a standard pre-workout serving (call it 13½)1.
- Check energy drinks. They weren’t modelled in the study, and the FDA says most hold 54 to 328 mg per 16 oz, with a few brands at 41 to 246 mg per 12 oz3. A can near the top of that range has more caffeine than the pre-workout serving in the model.
- Adjust for sensitivity. If caffeine makes you jittery or you suspect you clear it slowly, give yourself more time. Our caffeine cutoff calculator lets you test slower half-lives.
- Count the hidden sources: soft drinks, chocolate, energy or protein bars, ice cream, chewing gum, and some supplements and over-the-counter medicines3.
- Adjust from there. The researchers suggest treating their cut-off times as a starting point and changing the amount and timing based on how you sleep1. If you cut back, do it gradually: withdrawal isn’t considered dangerous but can be unpleasant3.
Who should be careful
Who should be careful
- Pregnancy, trying to conceive and breastfeeding: ACOG puts moderate intake in pregnancy at under 200 mg a day4; the FDA advises asking your health care provider whether to limit caffeine3.
- Heart rhythm problems, high blood pressure or anxiety: too much caffeine can raise heart rate and blood pressure and cause palpitations, jitters and anxiety3; ask your doctor what’s right for you.
- Medications: some medicines, including certain antidepressants and oral contraceptives, can change how long caffeine stays in your body1; ask a pharmacist.
- Children and teens: medical experts advise against energy drinks for children and teens, and caffeinated drinks should be avoided for children under 23.
The bottom line
The evidence that caffeine disrupts sleep is strong and consistent. For most people that points to a last coffee in the early afternoon, any pre-workout before mid-morning, and an eye on hidden sources. The exact cut-off times are model estimates, so treat them as a starting point. Use the calculator above to model your own timing, see our bedtime snack ideas for the evening, and read our guide to foods that help you sleep.
Frequently asked questions
How long does caffeine stay in your system?
Caffeine’s half-life is typically 3 to 6 hours, but it ranges from about 2 to 10 hours between healthy adults1. With a 5-hour half-life, about a quarter of a dose is still in your body 10 hours later.
Is tea OK in the evening?
In the 2023 meta-analysis, the model found no cut-off time for one 250 mL cup of black tea (about 47 mg)1. Bigger or stronger servings add up: the FDA lists 71 mg for a 12-oz black tea3. Caffeine-free herbal teas avoid the question altogether.
Why can I drink coffee at night and still fall asleep?
You may fall asleep but sleep less and more lightly. On average, caffeine reduced deep sleep by about 11 minutes and added about 12 minutes awake during the night1. In a small study using a high 400 mg dose, measured sleep fell by more than an hour even when caffeine was taken six hours before bed, while participants’ diaries showed a smaller drop2.
Does decaf affect sleep?
Decaf coffee typically has 2 to 15 mg of caffeine in an 8-oz cup, far less than regular coffee3. For most people that’s unlikely to matter, but the FDA notes that people who react strongly to caffeine may want to avoid decaf too3.
Sources (4)
- Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Med Rev. 2023;69:101764 (authors declare no conflicts of interest). https://pubmed.ncbi.nlm.nih.gov/36870101/ · Open-access full text: https://eprints.leedsbeckett.ac.uk/id/eprint/9625/
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. 2013;9(11):1195–1200 (funded by an investigator-initiated grant from Zeo Inc.). https://pmc.ncbi.nlm.nih.gov/articles/PMC3805807/
- U.S. Food and Drug Administration. Spilling the beans: how much caffeine is too much? Consumer Update, content current as of August 28, 2024. https://www.fda.gov/consumers/consumer-updates/spilling-beans-how-much-caffeine-too-much
- American College of Obstetricians and Gynecologists. Committee Opinion No. 462: Moderate caffeine consumption during pregnancy. 2010, reaffirmed 2026. https://www.acog.org/clinical/clinical-guidance/committee-opinion/articles/2010/08/moderate-caffeine-consumption-during-pregnancy



