Mindful Coffee on two iPhones showing the caffeine curve with ready for sleep time and the caffeine and sleep analysis

When to Stop Drinking Coffee Before Bed: Caffeine Half-Life Explained

You had a coffee at 3 PM, you feel fine, and you go to bed at 11. Then you lie awake, or you sleep but wake up tired. The reason is often caffeine that is still in your system long after the buzz is gone. This guide explains what caffeine half-life means, what speeds it up or slows it down, what sleep studies actually measured, and how to work out a personal cut-off time for your last cup.

If you are looking for the best time for your first coffee of the day, read my guide on how your cortisol rhythm affects your coffee timing. This article is about the other end of the day.

What caffeine half-life means

The half-life is the time your body needs to clear half of the caffeine you consumed. After one half-life, 50 percent is left. After two half-lives, 25 percent. After three, 12.5 percent. The curve never drops off a cliff; it flattens out slowly, which is why an afternoon coffee can still matter at midnight.

According to the StatPearls reference on caffeine from the U.S. National Library of Medicine, the half-life in the average adult is about 5 hours. Caffeine is broken down mainly in the liver by the enzyme CYP1A2. A 2018 review in Pharmacological Reviews describes CYP1A2 as responsible for about 95 percent of caffeine metabolism and notes that genetic variants of this enzyme are a main reason why caffeine levels differ so much from person to person.

What changes your half-life

“About 5 hours” is an average. Your own number can be much shorter or much longer:

  • Smoking speeds up caffeine clearance. StatPearls reports that the half-life in smokers is reduced by up to 50 percent compared to nonsmokers.
  • Oral contraceptives slow it down. In a small pharmacokinetic study, women taking oral contraceptives had an average half-life of 10.7 hours, compared to 6.2 hours in women who did not.
  • Pregnancy slows it down considerably. StatPearls notes a half-life of up to 15 hours, especially in the last trimester.
  • Liver disease matters because the liver does most of the work. People with advanced cirrhosis may clear caffeine much more slowly.
  • Genetics, age, hormones, diet and medications are all listed in the Nehlig review as factors that change how quickly caffeine is cleared.

The practical takeaway: two people can drink the same coffee at the same time and have very different amounts of caffeine left at bedtime.

What sleep studies found

The most cited study on this question is Drake et al. (2013) in the Journal of Clinical Sleep Medicine. Twelve healthy sleepers took 400 mg of caffeine (roughly two large coffees) either at bedtime, 3 hours before bedtime or 6 hours before bedtime, and a placebo on another night. Sleep was measured at home with a portable sleep monitor and with a sleep diary.

The full paper reports that all three caffeine conditions reduced objectively measured total sleep time by about 1.1 to 1.2 hours compared to placebo. Even at 6 hours before bed, caffeine cut sleep by more than an hour. The interesting part: in the sleep diaries, the 6 hour condition did not show a significant effect. People lost sleep without clearly noticing it. The authors concluded that substantial caffeine should be avoided for at least 6 hours before bedtime.

A larger picture comes from a 2023 systematic review and meta-analysis in Sleep Medicine Reviews that pooled 24 studies. On average, caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7 percent, and it reduced deep sleep. Based on their analysis, the authors suggest that a regular coffee (107 mg per 250 mL) should be consumed at least 8.8 hours before bedtime to avoid a reduction in total sleep time, and a typical pre-workout supplement (217.5 mg) at least 13.2 hours before.

A worked example

Line chart of caffeine decay: 200 mg at 2 PM leaves about 28, 62 or 96 mg at a 10:30 PM bedtime for a half-life of 3, 5 or 8 hours

Say you drink a large coffee with 200 mg of caffeine at 2 PM and go to bed at 10:30 PM. That is 8.5 hours later. Using the simple half-life formula (amount left = dose x 0.5 to the power of hours divided by half-life):

  • With a 3 hour half-life, about 28 mg are left at bedtime.
  • With a 5 hour half-life, about 62 mg are left, roughly the caffeine of a small coffee.
  • With an 8 hour half-life, about 96 mg are left, close to a full cup of coffee.

This is a simplified model. It ignores the time caffeine takes to be absorbed and assumes a constant half-life, but it shows why the same 2 PM coffee is harmless for one person and a problem for another.

A practical cut-off rule

The research gives two useful anchors: Drake et al. found effects even 6 hours before bed with a high dose, and the meta-analysis suggests about 9 hours for a regular cup of coffee. A simple rule that combines both:

  • Regular coffee: last cup about 9 hours before your planned sleep time. For an 11 PM bedtime, that means around 2 PM.
  • Large or strong drinks (big brewed coffees, energy drinks, pre-workout): plan for longer, since more caffeine needs more half-lives to fall to the same level.
  • Slow metabolizers (for example when taking oral contraceptives or during pregnancy): move the cut-off earlier.
  • If you sleep fine but wake up tired: remember the Drake result. Lost sleep is not always noticeable.

This article is general information and not medical advice; if you are pregnant, take medication or have a liver condition, talk to your doctor about caffeine.

How much caffeine is in common drinks

Your cut-off depends on the dose as much as on the clock. The U.S. Food and Drug Administration lists these typical amounts for a 12 fluid ounce serving (about 355 mL):

Drink (12 fl oz) Typical caffeine
Brewed coffee 113 to 247 mg
Energy drink 41 to 246 mg
Black tea 71 mg
Caffeinated soft drink 23 to 83 mg
Green tea 37 mg

The FDA also cites 400 mg per day as an amount not generally associated with negative effects for most adults, and points out that people differ widely in how sensitive they are and how fast they eliminate caffeine. Note how wide the coffee range is: the same “one cup” can mean twice the caffeine depending on beans, brew method and size.

How Mindful Coffee estimates your sleep-ready time

Mindful Coffee on iPhone: caffeine curve with current caffeine in body and the predicted ready for sleep time

Doing this math by hand for every drink gets old quickly, which is why I built it into Mindful Coffee. When you log a drink, the app updates your caffeine curve and calculates a sleep-ready time from four inputs: your current estimated caffeine level, your personal half-life setting, your sleep threshold (how much caffeine you can have left and still sleep well) and your preferred bedtime. Where the falling curve crosses your threshold is your sleep-ready time.

Before you drink, the What-If preview shows how a coffee right now would shift that time. The Personal Metabolism Assistant (Pro) helps you estimate your own half-life from a few everyday questions instead of using the average, and with Apple Health sleep data the app can show how your caffeine intake relates to your sleep. It is a model, not a measurement, and Mindful Coffee is not a medical device. Version 6.3 added editing and undo for logged drinks, see what is new in Mindful Coffee and Mindful Body 6.3. You can get Mindful Coffee on the App Store.

FAQ

How long before bed should I stop drinking caffeine?

Studies point to at least 6 hours, and a 2023 meta-analysis suggests about 9 hours for a regular cup of coffee. Larger doses and a slower metabolism call for an earlier cut-off.

What is the half-life of caffeine?

About 5 hours in the average adult, but it varies widely. Smoking shortens it; oral contraceptives, pregnancy and liver disease can lengthen it considerably.

Can I drink coffee at night if I fall asleep easily?

Falling asleep is only part of it. In Drake et al. (2013), caffeine 6 hours before bed reduced measured sleep by more than an hour, while the participants’ own sleep diaries did not show a significant effect.

Why does coffee affect me more than my friends?

Mostly because of how fast you clear it. Genetic variants of the liver enzyme CYP1A2, smoking, hormones and medications all change the half-life, so the same cup leaves different amounts in different people.

Find your own cut-off

The averages are a starting point. Your half-life, your drinks and your bedtime decide the rest. If you want to see your own curve instead of doing the math, download Mindful Coffee on the App Store.


Diesen Artikel gibt es auch auf Deutsch.