Caffeine can make it harder to sleep. That much is not controversial. The harder question is when, how much, and for whom.
Sleep-hygiene lists often name a single cut-off—“no coffee after 2 p.m.,” or “stop six hours before bed.” Those slogans travel farther than the studies behind them. This article looks at two sources we opened in full or in official summary: a 2013 randomized home trial that gave people 400 milligrams of caffeine at different times, and EFSA’s statement that a 100 milligram dose may affect sleep in some adults, especially close to bedtime.
Neither source produces a universal last-call time for every drinker. This page cannot diagnose insomnia and is not medical advice. See our medical disclaimer.
EFSA’s 2015 caffeine assessment, as summarized on its topic page and in the booklet EFSA explains risk assessment: Caffeine, separates daily intake from single doses.
For sleep specifically, EFSA concluded that single doses of 100 milligrams may affect sleep duration and patterns in some adults, particularly close to bedtime. That statement is about some adults and may affect. It is not a claim that 99 milligrams is always harmless or that 100 milligrams always ruins the night.
On how the body handles caffeine, the explainer says caffeine is absorbed rapidly and completely after oral intake. Stimulatory effects may begin 15 to 30 minutes after ingestion and last a number of hours. The half-life—the time needed to eliminate about half of the caffeine—averages about four hours in healthy adults and ranges from two to eight hours. Pregnancy, medicines, liver health, age, and body weight are listed among the reasons people differ.

The bar chart in this article is an illustration of that average four-hour figure. If half of a dose is gone in four hours, about a quarter remains at eight hours and about an eighth at twelve hours. Real bodies do not follow the cartoon. EFSA’s own range (two to eight hours) is already wide enough to make a personal countdown unreliable—and the Drake trial used a much larger dose than 100 milligrams.
The FDA’s consumer page does not give a half-life or a last-cup clock. It does list insomnia or sleep disruptions among signs of consuming too much caffeine, and it notes that people vary in sensitivity and in how fast they eliminate caffeine.
Christopher Drake, Timothy Roehrs, John Shambroom, and Thomas Roth published “Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed” in the Journal of Clinical Sleep Medicine. We opened the PubMed Central full text (PMC3805807) on 8 November 2026 (HKT).
Design. Randomized, double-blind, double-dummy, placebo-controlled, balanced Latin-square study in the home. Each participant completed four conditions: 400 mg of caffeine at 6 hours, 3 hours, or 0 hours before scheduled bedtime, with matching placebos at the other times, plus a night when all three pills were placebo.
Who took part. Twelve healthy adults completed the protocol (6 women, 6 men; ages 19–48; mean age 29.3). They were screened as normal sleepers. Four additional people enrolled but were excluded for protocol violations before the blind was broken. Baseline self-reported caffeine intake for completers averaged 115 ± 169 mg/day. People who habitually drank more than five caffeinated beverages a day were excluded. Participants could use caffeine earlier in the study days but were told to avoid caffeine and alcohol after 16:00 on those days.
What was measured. A morning sleep diary and a validated portable sleep monitor. The paper is explicit that this was not laboratory polysomnography.

Objective (portable monitor). The authors reported that each caffeine time point reduced total sleep time by 1.1 to 1.2 hours compared with placebo. The three caffeine conditions did not differ significantly from one another on that point. Sleep efficiency fell in each caffeine condition. Wake time during sleep increased, reaching statistical significance at 6 hours (+8 minutes) and at 3 hours (+27.6 minutes) versus placebo. Latency to persistent sleep was longer in all three caffeine conditions; the +17.2 minute change at 3 hours was statistically significant, while +22.4 minutes at bedtime and +24.1 minutes at 6 hours were not.
The discussion states the result in everyday language: 400 mg taken 0, 3, or even 6 hours before bedtime “significantly disrupts sleep,” and even at 6 hours caffeine “reduced sleep by more than 1 hour” on the objective measure.
Diary (what people felt). Shorter total sleep time was the most consistent diary finding, significant when caffeine was taken at bedtime or 3 hours before bed. At 6 hours, people reported 41 minutes less sleep, which “approached significance” (p = 0.08). Reported time to fall asleep more than doubled when caffeine was taken 6 hours before bed, but that comparison also missed the conventional significance threshold (p = 0.06). Diary measures of wake time, sleep efficiency, and sleep quality were not significantly different. There were no significant diary differences among the three caffeine times.
The authors argue that this gap—objective disruption at 6 hours without a matching subjective hit—may help explain why people keep drinking caffeine in the afternoon. They also note that sleep fragmentation can be easy to miss when you are the person sleeping.
Sleep stages (exploratory). Caffeine reduced combined stage 1 and 2 sleep at each time point (from −40.6 minutes at bedtime to −44.1 minutes at 6 hours). Slow-wave sleep fell in all three conditions and significantly when caffeine was taken at bedtime or 6 hours before bed. REM sleep did not change significantly.
It is easy to over-copy the conclusion into a lifestyle rule. Several limits sit in the paper itself:
Taken together with EFSA, a fair summary is: smaller doses close to bed may affect some adults (EFSA’s 100 mg note), and a large dose still showed objective sleep loss six hours later in this small trial. It is not fair to say that science has picked 6 hours or 5 p.m. as a universal cutoff.
If sleep is the reason you are thinking about caffeine, a few cautious uses of the evidence follow—and several do not.
Useful:
Not supported here:
The FDA notes that people who consume caffeine daily and want to cut back should usually do so gradually, because withdrawal can be unpleasant even though it is not considered dangerous on that page. Changing evening coffee is one form of cutting back; it does not require a medical-sounding protocol from a coffee website.
Does a 2 p.m. coffee always ruin sleep?
Not always, and not for every dose. In Drake et al., a 400 mg dose still reduced objective sleep even when taken six hours before bed. EFSA’s sleep comment is attached to 100 mg taken close to bedtime. Your own timing, dose, and sensitivity sit between those findings.
Why do I feel fine after evening coffee when a study says I slept less?
That discrepancy is one of the paper’s own points: at six hours, the monitor showed disruption that the diary did not clearly confirm.
Is half-life longer in pregnancy?
EFSA lists pregnancy status among the factors that change half-life. Pregnancy intake figures are discussed in our guidance article. Pregnant readers should follow their own clinician’s advice.
What we know: EFSA links some adults’ sleep to 100 mg doses near bedtime and describes a 2–8 hour half-life range around a 4-hour average. A small randomized trial found that 400 mg disrupted objective sleep at 0, 3, and 6 hours before bed.
What remains uncertain: How those findings scale to typical single cups, to older adults, to people with insomnia, and to habitual evening drinkers.
Who should seek individual advice: Anyone with ongoing sleep problems, anyone whose medicines interact with caffeine, and anyone advised to limit stimulants.