Caffeine & Sleep

How Long Before Bed Should You Stop Drinking Coffee

By Nora Vale · May 7, 2026 · 7 min read

Sleep-themed photo for how long before bed should i stop drinking coffee

It’s 3:50 on a Tuesday, the afternoon has gone soft at the edges, and the coffee order feels less like a beverage than like rescue. You order it, you drink it, you feel like a person again in twenty minutes, and you fall asleep at 11:30 without any trouble. So what could possibly be wrong with it. Your caffeine cutoff time, it turns out, was passed about six hours ago. The honest answer takes two minutes of math, and the whole timing system behind it, dinner included, is in the caffeine and sleep guide, which is the piece I’d hand you before anything else on this site.

Key takeaways

  • Your caffeine cutoff time is bedtime minus eight hours, ten if your sleep is already thin.
  • Caffeine doesn’t give energy, it hides the receipt. The sleepiness was only postponed, and the bill clears after midnight.
  • Falling asleep fast proves nothing. Staying down in deep, unbroken sleep is the actual test.
  • The cutoff counts total milligrams, not sources. Tea, cola, chocolate, and decaf all land on the same tab.
  • Two weeks of a boring experiment will tell you more than any article, including this one.

Where the caffeine cutoff time comes from

The number is not a moral judgment. It’s arithmetic. Caffeine has a half-life, dinner has a deadline, and both of them are set by your bedtime rather than by the clock on the wall or by whatever the person ahead of you in line just ordered. For a typical adult the half-life runs five to six hours, which means a large coffee at 4 p.m. still has half of itself on board while you wind down at ten, and about a quarter, some fifty milligrams, still circulating at 2 a.m. Fifty milligrams is a respectable cup of tea arriving at the exact hours your sleep is supposed to be deepest and quietest.

Run it backward from your actual bedtime and the guideline writes itself. The Sleep Foundation advises no caffeine within eight hours of bedtime, and ten or more for anyone whose sleep is already poor. An 11 p.m. bedtime puts the line at 3 p.m. A 10:30 bedtime moves it to 2:30. The line follows your lights-out, not your optimism, and it moves earlier every time your schedule does. If you want the full clock, the piece on caffeine half-life explained walks through it hour by hour.

Why falling asleep fast proves nothing

This is the part that kept me drinking afternoon coffee for years, so let me spare you the decade. Caffeine can lighten and fragment your sleep even on nights you drop off without any trouble at all, so the person lying awake at 2 a.m. never once suspects the 3 p.m. espresso, because as far as they can tell, coffee has never interfered with their sleep. Falling asleep fast isn’t the test. Staying down in deep, unbroken sleep is the test, and it’s the one the afternoon cup keeps failing.

A tax manager I wrote about learned this the expensive way. He ordered a 4 p.m. latte through every stress season and every calm May, dropped off within minutes at 11:30, and spent three years blaming work for the sandpaper mornings and the surfacing at 2 or 3. The latte had a perfect alibi. When he finally moved it to 12:30, the first week gave him nothing and the second week the 2 a.m. surfacing stopped. His text to his wife was four words long. It was the latte.

Running the two-week experiment

Here’s the whole design, and it’s boring on purpose. Set your caffeine cutoff time at bedtime minus eight hours, hold it every single day for two weeks, write down the time of your last dose each day, and change nothing else. Not dinner, not the bedroom, not the phone. One variable at a time is slower and it’s true. If two weeks sounds long, remember you’re not quitting coffee. You’re moving it.

Three practical details decide whether the fortnight survives contact with real life. First, taper the last few days instead of going cold: shrink the afternoon cup by half on Tuesday and by half again on Wednesday, and the withdrawal headache often shrinks right along with the dose. Second, swap the ritual instead of deleting it, because the 4 p.m. slump arrives either way, and a decaf fills the cup and the ten-minute break without meaningfully touching your midnight, which is the whole subject of can decaf keep you awake. Third, count everything, because tea at 4, chocolate at 9, and decaf after dinner add up to an evening you’d call caffeine-free that isn’t. “The cutoff doesn’t count sources. It counts milligrams.” The tally of innocent-looking carriers is the piece on hidden sources of caffeine.

Fair warning about the first days, because you deserve it before day two. Withdrawal is a catalogued thing: a headache, some fatigue, a mood like wet cardboard, typically starting twelve to twenty-four hours after the last dose and lasting somewhere between two and nine days. Three rough days buys the rest of your nights. That’s a decent exchange rate, but nobody should sell it to you as painless.

What if the cutoff does nothing

Now the honest flaw, because every lever in this book only works on some people. Half-life is an average, and your liver isn’t. The enzyme that clears caffeine runs fast in some people and slow in others, pregnancy roughly doubles it, and smoking roughly halves it, so two colleagues splitting a 3 p.m. pot can be having completely different nights while each swears the other is exaggerating. Some people hold a noon cutoff for a week and feel no different anywhere they can detect.

Neither result means the experiment failed. A fast liver is one explanation. A different thief entirely, alcohol or light or the room, is another, and two weeks of your own logged data will tell you which, for free, without a genetic test. There’s also a quieter possibility: the cutoff worked, but the improvement landed in how often the night stayed unbroken rather than in how fast it started, and without the log a person can hold a genuine improvement and never once see it. If two honest weeks move nothing, close the notebook and spend your effort somewhere else. Sometimes the verdict reads: not your thief.

Frequently asked questions

How long before bed should I stop drinking coffee?

Eight hours is the standard line, ten if your sleep is already thin. For an 11 p.m. bedtime that puts your caffeine cutoff time around 3 p.m., and the line moves earlier as your bedtime does. It sounds fanatical right up until you do the subtraction yourself, then it sounds obvious.

I fall asleep fine after afternoon coffee. Do I still need a cutoff?

Maybe, and the only way to know is the log. Falling asleep fast isn’t the test, because caffeine lightens and fragments sleep even when it doesn’t delay it. The shallower night announces itself at 2 a.m., not at 11:15, and the afternoon cup never looks guilty from inside the evening.

What if I get a headache when I cut the afternoon coffee?

That’s withdrawal, and it’s temporary. Expect a headache, some fatigue, and a mood like wet cardboard for somewhere between two and nine days, worst in the first three. Taper the last few days instead of quitting cold and the headache often shrinks with the dose.

Does the cutoff apply to tea, cola, and chocolate too?

Yes, and this is where most cutoff experiments die quietly. The cutoff counts total milligrams, not sources, so brewed tea, cola, dark chocolate, energy drinks, decaf, and even some over-the-counter pain relievers all land on the same evening tab. Your memory will fudge the total in coffee’s favor. A written log won’t.

If you want the whole timing system, dinner and alcohol included, it’s in Sleep, Finally. Pick your bedtime, subtract eight hours, and move the coffee once. Then let the log argue with you for two weeks.


This guide is educational, not medical advice. If pregnancy, a heart condition, or regular medication is part of your caffeine picture, the right person to set your limits is a doctor.

Keep reading

Related guides

Sleep-themed photo for hidden caffeine 9 sources you forgot to count

Aug 30, 2026 · 6 min read

Hidden Caffeine: 9 Sources You Forgot to Count

Hidden caffeine sources like tea, dark chocolate, decaf, cola, and pain relievers add up after your cutoff. Here are 9 places it hides and what the milligrams cost.