Caffeine and sleep guide
Caffeine and sleep: a useful guide to dose, timing, and half-life
The cup is gone in ten minutes. The caffeine is not. This guide separates what can be calculated from what has to be learned from your own sleep.
Checked against authoritative sources
Evidence reviewed 6 August 2026 · 12 minute read
General education, not individual medical advice.
The short answer
Caffeine can still matter hours after you drink it. EFSA describes an adult average half-life near four hours and a typical range of roughly two to eight hours, and even 100 mg close to bedtime can alter sleep in some adults.
Explore this guide
Caffeine half-life, without the misleading countdown
Learn what caffeine half-life means, why four hours is only a population average, and how to read a decay estimate without treating it as a measurement.
Read the guideHow long does caffeine last? A practical timeline
Follow a practical caffeine timeline from absorption to the long tail, with examples for common doses and guidance on interpreting lingering effects.
Read the guideCaffeine before bed: how to choose a cutoff
Use dose, half-life, and repeated sleep observations to choose a caffeine cutoff instead of copying a universal rule.
Read the guideCaffeine during pregnancy: understanding the 200 mg guidance
Understand the widely used 200 mg pregnancy guidance, how to count all caffeine sources, and why your clinician's advice takes priority.
Read the guideHow much caffeine is in coffee, tea, and energy drinks?
Compare caffeine sources, account for serving size, and learn how to record uncertain amounts when a measured value is unavailable.
Read the guideFree tool
Caffeine half-life calculator
Estimate how much caffeine may remain by bedtime, compare faster and slower clearance, and see every assumption behind the curve.
Open the toolDose and timing are two different questions
Daily caffeine guidance and bedtime timing are often collapsed into one number. They answer different questions. A daily limit describes intake across a day for a broad population. Sleep timing asks how much of a particular dose may remain when you want to sleep.
For most healthy adults, the FDA cites 400 mg a day as an amount not generally associated with negative effects. That is not a promise that 400 mg will leave your sleep untouched. EFSA notes that a single 100 mg dose may affect sleep duration and patterns in some adults when consumed close to bedtime.
- Count caffeine from every source, not only coffee.
- Treat package or menu values as estimates unless the manufacturer gives a measured amount.
- Keep daily-intake guidance separate from your personal last-call time.
Sources for this section: U.S. Food and Drug Administration, European Food Safety Authority.
Half-life is a curve, not an expiry time
A four-hour half-life means an estimated half of a dose remains after four hours, one quarter after eight hours, and one eighth after twelve. The amount approaches zero gradually; it does not suddenly disappear at the eight-hour mark.
EFSA describes an average plasma half-life in healthy adults of about four hours, with a typical range from roughly two to eight hours. An older National Academies review reports a broader range. Genetics, pregnancy, smoking, medicines, liver health, and other factors can shift clearance. A calculator can show a range. It cannot identify your personal metabolism from a bedtime and a cup size.
Sources for this section: European Food Safety Authority, National Academies Press via NCBI Bookshelf.
What the sleep studies actually tell us
A frequently cited laboratory-and-home study tested a substantial 400 mg dose at bedtime and three or six hours before bedtime. Sleep was disrupted at all three timings. The result shows that a large late dose can reach farther into the night than people expect. It does not establish an identical six-hour rule for everyone.
A later systematic review and meta-analysis found caffeine reduced total sleep time, reduced deep sleep, and increased the time it took to fall asleep. Studies differed in dose, timing, participants, and measurement. That variation is exactly why a single universal cutoff is too neat.
Do not turn the six-hour finding into a guarantee. The study used 400 mg, far more than many ordinary servings, and individual responses vary.
Sources for this section: Journal of Clinical Sleep Medicine via PubMed, Sleep Medicine Reviews via PubMed.
Build a cutoff from observation, not bravado
Start with the sleep time you want to protect. Work backwards using a cautious half-life range, then run the same routine for a week: similar bedtime, similar caffeine dose, and no large weekend swing. Note how long it takes to fall asleep, night waking, and how you feel the next morning.
If sleep is poor, move the last dose earlier or make it smaller. Change one thing at a time. A 30-minute move is easier to learn from than a complete reset that also changes exercise, alcohol, screen use, and bedtime.
- Write down the actual milligrams when you can.
- Include chocolate, pre-workout products, energy drinks, tea, and medicines that contain caffeine.
- Keep the experiment boring enough that the result is interpretable.
Pregnancy and medical context need different rules
Pregnancy changes both the recommended daily amount and how long caffeine may remain in the body. ACOG describes moderate consumption as less than 200 mg per day; EFSA says intake up to 200 mg per day from all sources does not raise safety concerns for the fetus. Your own clinician may advise a different limit for your circumstances.
Medicines and health conditions can also change sensitivity or clearance. If caffeine causes palpitations, marked anxiety, tremor, persistent insomnia, or other symptoms, a decay estimate is not the right tool for deciding what to do next. Speak with a qualified clinician.
Sources for this section: American College of Obstetricians and Gynecologists, European Food Safety Authority, U.S. Food and Drug Administration.
Use the calculation as a planning aid
The useful output is not a green or red verdict. It is a comparison: what changes if the drink is smaller, the bedtime is later, or your half-life sits at the slower end of a plausible range? Seeing those curves together makes timing less abstract.
Pair the estimate with your own sleep notes. The equation supplies consistency; your observations supply the missing personal context. If they disagree, trust the repeated real-world pattern rather than forcing your body to match the model.
Sources for this section: National Academies Press via NCBI Bookshelf.
Common questions
How many hours before bed should I stop caffeine?
There is no universal cutoff. A 400 mg dose disrupted sleep even six hours before bed in one study, while dose and individual clearance vary widely. Start earlier than you think, then adjust from repeated sleep observations.
Does caffeine leave the body after eight hours?
Not completely. With a four-hour half-life, about one quarter of the original dose remains after eight hours. Faster and slower metabolism change that estimate.
Is 400 mg a sleep-safe amount?
No. The FDA figure is general daily guidance for most healthy adults, not a sleep guarantee. Smaller doses may disturb sleep in some people, especially near bedtime.
Can I calculate my exact caffeine level?
Not from drink size and time alone. A calculator estimates a curve using an assumed half-life; it cannot measure blood levels or account for every personal factor.
Sources and review notes
We favour public-health guidance, clinical bodies, official statistics, and original research. Source links are provided so you can inspect the wording and boundaries yourself.
- 01Spilling the Beans: How Much Caffeine is Too Much?U.S. Food and Drug Administration
- 02Caffeine: safety guidance for adults and pregnancyEuropean Food Safety Authority
- 03Pharmacology of CaffeineNational Academies Press via NCBI Bookshelf · 2001
- 04Caffeine effects on sleep taken 0, 3, or 6 hours before going to bedJournal of Clinical Sleep Medicine via PubMed · 2013
- 05The effect of caffeine on subsequent sleep: a systematic review and meta-analysisSleep Medicine Reviews via PubMed · 2023
- 06Moderate Caffeine Consumption During PregnancyAmerican College of Obstetricians and Gynecologists · 2010; reaffirmed 2026