Caffeine & Sleep
Cutoff & timing

Is It Bad to Drink Coffee at Night? What Sleep Science Says

Coffee at night usually hurts sleep — it can stay above the ~50 mg sleep line for hours. See the science, who's most affected, and the best decaf swap.

By Vadim Semenko
Built the caffeine half-life engine · 6 min read · Updated 2026-06-03

For most people, drinking regular coffee at night is bad for sleep. A normal cup an hour or two before bed leaves far more than the ~50 mg of caffeine that disrupts sleep, so you fall asleep slower and lose deep sleep — often without realizing it. The exact toll depends on the dose, the timing, and how fast you clear caffeine, but evening coffee almost always works against you. A decaf swap keeps the ritual without the cost.

What "at night" does to your sleep

Caffeine works by blocking adenosine, the molecule that builds up through the day to make you sleepy. Drink coffee at night and you're actively jamming the signal your body uses to wind down — right when you need it most.

Sleep researchers find most people sleep best with under about 50 mg of caffeine on board at bedtime. The problem with night coffee is timing: there simply aren't enough hours left to clear it. Caffeine's half-life averages about 5 hours, so a cup drunk at 9 PM is barely past one half-life by midnight.

The evidence is blunt. Drake et al. (2013), published in the Journal of Clinical Sleep Medicine, gave healthy sleepers 400 mg of caffeine and found that even 6 hours before bed it reduced total sleep by more than an hour — and most people didn't notice the disruption. Drink that same caffeine at night and the effect is larger still.

How much is left at bedtime from a night coffee

Using a 5-hour half-life and the formula dose × 0.5^(hours ÷ 5), here's what a single 95 mg coffee leaves at an 11 PM bedtime depending on when you drink it:

Coffee timeHours before bedCaffeine at bedtimeSleep impact
6 PM5h~48 mgBorderline
8 PM3h~60 mgDisruptive
9 PM2h~76 mgClearly disruptive
10 PM1h~83 mgVery disruptive

Every evening time except the earliest sits above the ~50 mg line — and a large or second cup pushes all of these higher. Night coffee is bad precisely because it can't clear in time.

👉 See exactly how much caffeine your night coffee leaves at your bedtime — try the calculator.

Who it hurts most

Slow metabolizers

The single biggest factor. How fast people clear caffeine varies several-fold — a slow metabolizer who drinks coffee at 9 PM may still have most of it on board at 2 AM, while a fast one is nearly clear. If coffee lingers or "hits hard," night coffee is especially bad for you. The genetics behind that gap are covered in are you a fast or slow caffeine metabolizer.

People with light or fragile sleep

Even when caffeine doesn't stop you falling asleep, it flattens deep sleep and increases night-time wakeups. If you already sleep lightly, a night coffee compounds it. See how caffeine affects deep sleep for what happens stage by stage.

A note for shift workers

Night-shift workers are the one group who may need caffeine in the evening to stay alert and safe. The trick is the same threshold, applied to their sleep window: time your last dose so you're under ~50 mg by the time you'll actually sleep (often mid-morning). Caffeine right before daytime sleep backfires the same way an evening cup does for everyone else.

The smart swap: decaf and other low-caffeine options

If you love the night-time coffee ritual, you don't have to give it up — just drop the caffeine.

  • Decaf coffee — only ~2–5 mg per cup by USDA FoodData Central figures, far under the 50 mg line. Same taste and warmth, no sleep penalty. (See caffeine in decaf coffee.)
  • Herbal tea — caffeine-free; chamomile or rooibos make easy evening swaps.
  • Warm milk or a decaf latte — keeps the comforting routine intact.

Switching your last coffee of the day to decaf is one of the highest-impact changes you can make for sleep, because it removes the worst-timed dose entirely.

Practical rules for the evening

  • Set a cutoff. Stop regular coffee 8–10 hours before bed; see coffee cutoff time by bedtime.
  • Go decaf after dark. Make every post-cutoff cup decaf by default.
  • Watch hidden caffeine. Chocolate, some teas, and "energy" drinks count too.
  • Stay under the daily ceiling. The FDA cites 400 mg/day and ~200 mg in a single dose as the general limits for healthy adults — night cups eat into that fast.

The bottom line

Yes — regular coffee at night is bad for most people's sleep, because there aren't enough hours to clear it below the ~50 mg bedtime line. The closer to bed and the larger the cup, the worse it gets, and slow metabolizers feel it most. The fix is simple: cap your caffeine earlier in the day and make night coffee a decaf.


Take the guesswork out of your evenings. The Caffeine & Sleep app logs every cup in one tap, models your personal caffeine curve, and warns you when an evening coffee would push you over the ~50 mg bedtime line — then suggests a decaf swap. Get the app →

Try it for your bedtime
Drink
You drink it at
Bedtime
Coffee · 95 mg · assuming an average ~5 h half-life
At bedtime
31 mg
should be fine
Latest safe Coffee: 6:22 PM

Frequently asked

For most people, yes. A regular coffee drunk in the evening usually leaves well over the ~50 mg of caffeine that disrupts sleep at bedtime. Research found 400 mg even 6 hours before bed cut total sleep by over an hour — so a cup an hour or two before bed is worse.

About 8–10 hours before bed for a normal cup, so caffeine falls under ~50 mg at bedtime. Slow metabolizers should stop earlier; fast metabolizers can sometimes get away with later.

Caffeine can help shift workers stay alert, but it should be timed to stop several hours before your daytime sleep, not right before it. The same ~50 mg-at-sleep math applies whenever your 'bedtime' falls.

Barely. Decaf has only about 2–5 mg of caffeine per cup, far below the ~50 mg sleep-disrupting level, making it a good late-night swap when you want the ritual without the jolt.

Caffeine half-life ranges from about 3 to 9 hours between people, mostly due to the CYP1A2 gene. A slow metabolizer holds onto a night coffee for far longer, so it disrupts their sleep much more.

Sources

  1. FDA — Spilling the Beans: How Much Caffeine is Too Much? (400 mg/day, 200 mg single-dose guidance)
  2. Drake C. et al., 2013, J Clin Sleep Med — caffeine 0, 3, or 6 hours before bed reduced sleep
  3. USDA FoodData Central — caffeine content of coffee and decaf

Educational content, not medical advice. For concerns about caffeine, sleep, pregnancy or a health condition, talk to a qualified clinician.

Track your caffeine. Sleep better.

The app does this live all day — one-tap logging, widgets, and a 30-minute pre-cutoff reminder. Free, no ads.

Keep reading

Get the App — it’s free