When to stop drinking caffeine before bed

Updated

Have your last regular coffee about nine hours before you go to bed, and a big dose — a pre-workout, an energy drink, a second large coffee — about thirteen hours before. Those are the cut-offs from a 2023 meta-analysis of 24 studies in healthy adults. For an 11pm bedtime, nine hours lands at 2pm — which is where the popular “no coffee after 2” rule comes from. Move your bedtime and the rule moves with it.

It is the habit at the top of most sleep routines for a reason: it has some of the best evidence of anything on the list, and it costs nothing.

Your cut-off, by bedtime

Bedtime Last regular coffee (about 9 hours before) Last big dose (about 13 hours before)
9pm Noon 8am
10pm 1pm 9am
11pm 2pm 10am
Midnight 3pm 11am
1am 4pm Noon

The exact figures in the study are 8.8 hours for a coffee of 107 milligrams (about a 250 ml cup) and 13.2 hours for a 217.5-milligram pre-workout serving. Nine and thirteen are those numbers rounded to something you can remember.

If your bedtime moves around a lot, that is the first thing to fix — the caffeine cut-off is only as steady as the bedtime it counts back from.

What caffeine does to sleep, even when you fall asleep fine

The surprising part of the meta-analysis is not the cut-off. It is how small the effect on falling asleep is compared with everything else. On average, caffeine:

  • added about 9 minutes to falling asleep
  • cut total sleep by about 45 minutes
  • added about 12 minutes awake during the night
  • lowered sleep efficiency by about 7%
  • added about 6 minutes of light sleep and took away about 11 minutes of deep sleep

So “I can drink coffee at 6pm and still drop straight off” is very likely true, and it is not the reassurance it sounds like. You can fall asleep at 11 and still have lost three-quarters of an hour of sleep you never noticed losing.

How much caffeine is in what

The study’s “coffee” is a modest cup. Real drinks vary enormously. Per 12-ounce serving, the FDA gives:

Drink (12 oz unless noted) Caffeine
Brewed coffee 113–247 mg
Black tea About 71 mg
Green tea About 37 mg
Caffeinated soft drink 23–83 mg
Energy drink 41–246 mg
Decaf coffee (8 oz) 2–15 mg

A large café coffee can easily be twice the study’s 107 milligrams, which puts it closer to the thirteen-hour rule than the nine-hour one. If your afternoon coffee comes in a 16-ounce cup, treat it as a big dose.

The FDA’s daily figure — 400 milligrams for healthy adults, an amount it says is not generally associated with negative effects — is a ceiling for the whole day, not a timing rule. You can stay well under 400 and still lose sleep to one cup at 5pm.

Why your number may be different

The cut-offs above are averages. Caffeine’s half-life is commonly put anywhere from about two to ten hours depending on the person, and the FDA notes wide variation both in how sensitive people are and in how fast they clear it. Pregnancy and some medications slow it down considerably — if either applies to you, a pharmacist can tell you what that means for your cut-off.

The practical test is simple: move your cut-off an hour earlier for two weeks and see whether your mornings feel different. That is a fairer comparison than one night, because sleep varies by an hour or more from night to night anyway.

The 2pm rule, and when it is wrong

“No caffeine after 2pm” is good advice for exactly one person: someone who goes to bed around 11pm and drinks one regular coffee. For everyone else it is either too strict or not strict enough.

  • Night owl, bed at 1am: your cut-off is about 4pm. The 2pm rule costs you an afternoon coffee for no reason, which is how good rules get abandoned.
  • Early bird, bed at 9:30pm: your cut-off is about 12:30pm. The 2pm coffee is costing you sleep.
  • Pre-workout at 6pm, bed at 11pm: that is five hours, against a thirteen-hour rule. Train with a caffeine-free version in the evening.

Decaf, tea and the ritual

Most people do not want the caffeine at 4pm. They want the cup, the break, and the walk to the kitchen. Decaf keeps all three at 2 to 15 milligrams; herbal tea keeps them at none. Swapping the drink after your cut-off is much easier than dropping the ritual.

Alcohol has a cut-off too

The same research group looked at alcohol in 2025 and found REM sleep delayed and shortened from around two drinks, getting worse with more. The NHS advice is no alcohol, tea or coffee in the six hours before bed. A nightcap can make you drowsy; it is the second half of the night that pays for it.

Make it a step with a time on it

“Less coffee in the afternoon” is a wish. “My last coffee is at 2pm” is a plan — and plans with a time attached are kept far more often than intentions without one. Write the time down as the first line of your routine. It is the first line on the free sleep routine checklist, and the rest of the evening is in a bedtime routine for adults.

RestStack, coming to iPhone and Android, works the cut-off out from your bedtime and moves it when your bedtime moves — so the rule that fits you is the one on the checklist. You can run it in your browser tonight.

Questions

What time should I stop drinking coffee?

About nine hours before you go to bed for one regular cup, and about thirteen hours before for a big dose such as a pre-workout or an energy drink. Those come from a 2023 meta-analysis of 24 studies — 8.8 hours for a 107 mg coffee and 13.2 hours for a 217.5 mg pre-workout. For an 11pm bedtime, that means the last coffee around 2pm.

Is 2pm a good caffeine cut-off?

Only if you go to bed around 11pm and drink one regular coffee. The 2pm rule is the nine-hour rule worked out for an 11pm bedtime. Go to bed at 10pm and your cut-off is 1pm; go to bed at 1am and it is 4pm. A large café coffee or an energy drink moves it about four hours earlier again.

Does caffeine affect sleep even if I fall asleep fine?

Yes. In the 2023 meta-analysis, caffeine added about nine minutes to falling asleep but cut total sleep by about 45 minutes, added about twelve minutes awake during the night, and reduced deep sleep. Falling asleep easily is not evidence the coffee did nothing.

Does decaf keep you awake?

Unlikely. The FDA puts decaf coffee at about 2 to 15 milligrams in an 8-ounce cup, against 113 to 247 milligrams in a 12-ounce regular brewed coffee. A cup of decaf after your cut-off is a reasonable way to keep the ritual without the dose.

How long does caffeine stay in your system?

It varies a lot from person to person — the half-life is commonly put anywhere from about two to ten hours, and the FDA notes wide differences in both sensitivity and how fast people clear it. Pregnancy and some medications slow it down considerably, so if either applies to you, ask a pharmacist what that means for your cut-off.

Everything Nadril makes