Your last cup of coffee should be at least 8.2 hours before your target bedtime if you are an average metabolizer, 12.5 hours before if you are a slow CYP1A2 metabolizer, and 5.5 hours before if you are a fast metabolizer. These are not guesses. They are derived from pharmacokinetic modeling of caffeine's 5-hour population half-life, adjusted for individual genotype, and validated against sleep latency data from polysomnography studies. The "no coffee after 2 PM" rule is a crude approximation that works for almost no one precisely.
I spent three months in 2021 running a self-experiment on this. I went to bed at 11 PM every night. I consumed exactly 150 mg of caffeine at different times — 10 AM, 12 PM, 2 PM, 4 PM, and 6 PM — and measured my sleep onset latency with an Oura ring and a sleep diary. The results were not subtle. At 10 AM, my sleep latency was 12 minutes. At 2 PM, it was 18 minutes. At 4 PM, it was 34 minutes. At 6 PM, it was 52 minutes. My cutoff — the point where sleep latency exceeded 20 minutes — was 3:15 PM. For a target bedtime of 11 PM, that is 7 hours and 45 minutes. I am a slow metabolizer. The math checks out.
But here is the thing: if you are a fast metabolizer, that same 150 mg at 6 PM might clear below the sleep-disruption threshold by 10 PM. Sam proved this to me repeatedly. She drinks black tea at 8 PM, falls asleep by 10:30, and her sleep scores are fine. Her CYP1A2 genotype is AA. Her half-life is roughly 3 hours. My genotype is CC. My half-life is roughly 9 hours. The same beverage, the same time, two completely different biological outcomes. This is why generic cutoff advice is medically irresponsible. It treats a pharmacogenetic problem like a willpower problem.
The science behind sleep disruption is well-established. Caffeine is an adenosine receptor antagonist. Adenosine builds up in your brain throughout the day as a byproduct of neuronal activity. It binds to A1 and A2A receptors, slowing neural firing and promoting sleep pressure. Caffeine has a similar molecular structure and competitively blocks these receptors. When adenosine cannot bind, your brain does not receive the sleep signal. The subjective feeling is "not tired." The objective reality is that your brain is exhausted but chemically blind to its own fatigue.
The threshold for sleep disruption varies by individual, but polysomnography studies suggest that plasma caffeine concentrations above 5–10 mg/L at bedtime significantly reduce deep sleep and REM sleep. For a 200 mg dose, a fast metabolizer falls below this threshold in 6–8 hours. A slow metabolizer might stay above it for 18–24 hours. This means a slow metabolizer who drinks coffee at 8 AM can still have sleep-disrupting caffeine levels at midnight. The morning cup is the midnight problem.
Here is the modeled cutoff time by metabolizer type and target bedtime:
| Target Bedtime | Fast Metabolizer Cutoff | Average Metabolizer Cutoff | Slow Metabolizer Cutoff |
|---------------|------------------------|---------------------------|------------------------|
| 10:00 PM | 4:30 PM | 1:50 PM | 9:30 AM |
| 11:00 PM | 5:30 PM | 2:50 PM | 10:30 AM |
| 12:00 AM | 6:30 PM | 3:50 PM | 11:30 AM |
| 1:00 AM | 7:30 PM | 4:50 PM | 12:30 PM |
Look at the slow metabolizer column. If you want to sleep at 11 PM, your last caffeine should be at 10:30 AM. That is not "no coffee after lunch." That is "no coffee after breakfast." I have had this conversation with dozens of slow metabolizers who were drinking coffee at 3 PM and wondering why they could not fall asleep before 1 AM. They were not anxious. They were not stressed. They were pharmacologically wired.
The other factors that push your cutoff earlier: pregnancy (triples half-life), oral contraceptives (doubles half-life in most women), liver disease, age over 65, and medications like fluvoxamine or ciprofloxacin. I have a spreadsheet I use in consultations where I input a person's genotype, medications, age, and pregnancy status, and it spits out a personalized cutoff. The range is staggering. A 25-year-old fast metabolizer with no medications can drink espresso at 7 PM and sleep fine. A 35-year-old slow metabolizer on birth control might need to stop at 9 AM.
What most people miss is that the cutoff is not just about falling asleep. It is about sleep architecture. Even if caffeine does not prevent you from falling asleep, it can reduce deep sleep by 20–30% and suppress REM by 10–15%. You wake up feeling unrested without knowing why. Your sleep tracker shows 8 hours in bed but only 45 minutes of deep sleep. The culprit is not your mattress or your stress level. It is the 2 PM latte still circulating in your blood at 2 AM.
I track this with a simple rule: if my estimated plasma caffeine at 10 PM is above 15 mg, I expect sleep disruption. For me, that means no caffeine after 10 AM for a standard 150 mg dose. If I want an afternoon coffee — which I rarely do — I keep it under 50 mg and finish it by 2 PM. Sam, by contrast, can drink 100 mg at 6 PM and have no measurable sleep impact. We live in the same house. We go to bed at the same time. Our caffeine rules are completely different because our livers are completely different.
The practical solution is a caffeine cutoff calculator that models your personal pharmacokinetics. You input your bedtime, your typical dose, your estimated metabolizer status, and any medications or conditions that affect clearance. The calculator outputs a personalized cutoff time and shows you a plasma concentration curve over 24 hours. It is not a substitute for genetic testing, but it is far more accurate than "no coffee after 2 PM."
I built one after my self-experiment. I use it every morning. I look at my planned bedtime, I check my planned caffeine intake, and I know exactly when to stop. It has eliminated the guesswork. I no longer lie in bed wondering why I am not tired. I know why. I stopped drinking coffee at 10:15 AM, and by 11 PM my plasma caffeine is below 10 mg. The math works. The sleep follows.
🌙
Sleep Impact Estimator
Get your personalized caffeine cutoff time based on your bedtime and metabolism.
All data stays in your browser — we never see it.
⏱️
Caffeine Half-Life Tracker
Model your plasma caffeine curve and see exactly when you hit the sleep threshold.
All data stays in your browser — we never see it.
### Frequently Asked Questions
#### What time should I stop drinking coffee for sleep?
For a target bedtime of 11 PM, fast CYP1A2 metabolizers can stop at 5:30 PM, average metabolizers at 2:50 PM, and slow metabolizers at 10:30 AM. Pregnancy, oral contraceptives, and certain medications push the cutoff earlier by 3–6 hours.
#### Does caffeine affect deep sleep even if I fall asleep easily?
Yes. Caffeine at plasma concentrations above 5–10 mg/L reduces deep sleep by 20–30% and REM sleep by 10–15%, even in people who fall asleep without difficulty. The subjective feeling is waking up unrested despite adequate time in bed.
#### Can I drink decaf coffee before bed?
Decaf is not caffeine-free. A standard 8-ounce cup contains 2–15 mg. For fast metabolizers, this is negligible. For slow metabolizers or caffeine-sensitive individuals, even 10 mg at bedtime can measurably disrupt sleep architecture.
#### How does pregnancy change the caffeine cutoff time?
CYP1A2 activity drops by roughly 70% in the third trimester, tripling caffeine's half-life. A pregnant woman who could drink coffee until 2 PM in her first trimester may need to stop at 8 AM by her third trimester to maintain the same plasma clearance before bedtime.
#### Can I use melatonin to counteract evening caffeine?
Melatonin can help with sleep onset but does not restore caffeine-suppressed deep sleep or REM. The adenosine receptor blockade is independent of melatonin signaling. The only real solution is allowing adequate caffeine clearance time.
---
From the loft, where it is 9:47 PM and my plasma caffeine is at 8 mg. I will be asleep by 11.
Caffeine is a tool, not a lifestyle. Measure it.