The Caffeine GuideEnjoy it and sleep well
A half-drunk mug on a nightstand beside an analog alarm clock
Sleep and timing

Is caffeine 6 hours before bed bad?

By GyroscopeUpdated November 14, 20266 sources
On this page
  1. The study behind the 6 hours
  2. What 6 hours leaves, by drink
  3. What the 2025 trial added
  4. Find your time

For a big dose, yes. In a 2013 study, 400 mg of caffeine taken 6 hours before bed cut more than an hour of measured sleep. For a small dose, 6 hours is more than you need. In a 2025 trial, 100 mg taken 4 hours before bed did nothing measurable.

Six hours is the number most sleep advice gives, and it comes from that 2013 study. The study tested one dose, 400 mg, which is about four 8 oz coffees taken at once. The researchers didn’t test a single cup.

We’d use 6 hours as a rule for big drinks only. For a single espresso or a tea, 4 hours is enough. For a 16 oz coffee, a CELSIUS or a pre-workout scoop, 6 hours isn’t enough, and they belong before lunch.

The study behind the 6 hours

The researchers gave 12 healthy sleepers (6 women and 6 men, aged 19 to 48) 400 mg of caffeine at bedtime, 3 hours before or 6 hours before, and a placebo on other nights. A sleep monitor at home measured 1.1 to 1.2 hours less sleep at all three times, even at 6 hours.

Their own sleep diaries at 6 hours showed a loss of 41 minutes, a gap that fell just short of statistical significance. The people lost more sleep than they noticed. The study was small, it was funded by a grant from the company that made the monitor, and the authors noted the device may undercount time awake.

What 6 hours leaves, by drink

Drink 6 hours before bedCaffeineLeft at bedtime
Black tea, 8 oz47 mgabout 23 mg
Single espresso63 mgabout 30 mg
Coffee, 8 oz95 mgabout 46 mg
Coffee, 16 oz190 mgabout 92 mg
CELSIUS, 12 oz200 mgabout 97 mg
Pre-workout scoop, average254 mgabout 123 mg
The study’s dose400 mgabout 193 mg

These use the average half-life of 5 hours. An 8 oz coffee 6 hours out leaves a little over our lower bedtime line (40 mg). A 16 oz coffee leaves more than our upper line (80 mg).

What the 2025 trial added

A 2025 trial tested more than one dose. 23 healthy young men had 100 mg or 400 mg at 12, 8 or 4 hours before bed, or a placebo, on separate nights, and wore a sleep monitor at home. The 100 mg dose did nothing measurable at any of the three times. The 400 mg dose cut about 51 minutes of sleep at 4 hours, and it still cut about 21 minutes of deep sleep at 12 hours. The figure below lays out all six.

Find your time

The cutoff clock works out the latest time for your own drink and bedtime, and when should I stop drinking coffee before bed? has the table for every drink.

The cup beats the clock

Dose
12 hours before bed
8 hours before bed
4 hours before bed
100 mgabout a cup
21 mg leftNothing measurable
37 mg leftNothing measurable
64 mg leftNothing measurable
400 mgabout four cups
84 mg left21 minutes less deep sleep
146 mg left15 minutes less deep sleep, 29 more minutes awake
255 mg left51 minutes less sleep, 30 minutes less deep sleep
Left at bedtime on a 5 hour half-life, and what a 2025 trial of 23 healthy young men measured with a sleep monitor at home (Gardiner 2025). The dose row changes more than the hour column.
6 sources
  1. Drake C, Roehrs T, Shambroom J, Roth T, Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, Journal of Clinical Sleep Medicine, 2013pmc.ncbi.nlm.nih.gov
  2. Gardiner C and others, Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial, Sleep, 2025doi.org
  3. Antonio J and others, Common questions and misconceptions about caffeine supplementation: what does the scientific evidence really show? Journal of the International Society of Sports Nutrition, 2024doi.org
  4. USDA FoodData Central, SR Legacy: brewed coffee (171890), espresso (171891), brewed black tea (173227) and brewed green tea (171917)fdc.nal.usda.gov
  5. CELSIUS Sparkling Fantasy Vibe, 12 fl oz can, label photographed November 2025 (caffeine content 200 mg), Open Food Facts 0889392000597, checked 2026-11-14world.openfoodfacts.org
  6. Jagim AR, Harty PS, Camic CL, Common Ingredient Profiles of Multi-Ingredient Pre-Workout Supplements, Nutrients, 2019doi.org
With Gyroscope One, you see the milligrams and the time of your last cup, found in your drinks, next to your sleep. Open Gyroscope

Your personalized guide

Is my coffee keeping me up?

Eight taps. You get how much caffeine is still in you when you fall asleep, the latest time for the drink you actually have, and the one change for tonight.

  • What you fall asleep with, in milligrams
  • Your cutoff for your own drink
  • Free, under a minute
Start