I used to think coffee wore off after a couple of hours. Then I started tracking my sleep and realized a 3 p.m. latte was still messing with me at 11 p.m. The honest answer to how long coffee keeps you awake is not one number. It depends on how much you drink, how fast your body clears caffeine, and how sensitive you are to it. For most people, half the caffeine from a cup is still in the bloodstream about 5 to 6 hours later. That is the part that matters for sleep.
What caffeine actually does in your brain
Caffeine does not give you energy. It blocks adenosine, the molecule that builds up while you are awake and makes you feel sleepy. When caffeine sits on those receptors, adenosine cannot do its job. You feel alert because your brain cannot read the tired signal. Once caffeine clears, all that adenosine is still waiting. That is why the crash can feel sudden.
The speed of that clearing is called caffeine half-life. A half-life of 5 hours means 200 mg becomes 100 mg after 5 hours, 50 mg after 10 hours, and about 25 mg after 15 hours. That last bit is small but not zero. If you are sensitive, 25 mg at bedtime can still cost you deep sleep.
How long does coffee keep you awake by the numbers
A standard 8 oz drip coffee has around 95 mg of caffeine. A 16 oz Starbucks grande is closer to 330 mg. Cold brew can hit 200 mg or more in a small cup. Here is a rough timeline for a 200 mg dose with a 5 hour half-life:
- 1 hour after drinking: about 174 mg left, peak alertness
- 5 hours: about 100 mg left, still noticeable
- 10 hours: about 50 mg left, can delay sleep
- 15 hours: about 25 mg left, mild effect for sensitive people
So if you finish a 200 mg coffee at 2 p.m., you still have roughly 50 mg circulating at midnight. That is about half a can of Coke. For some people that is nothing. For others it is the difference between falling asleep in 10 minutes and lying there for 40.
Why your personal timeline is different
Genetics control a liver enzyme called CYP1A2. Fast metabolizers clear caffeine in 3 to 4 hours. Slow metabolizers can take 8 to 10. I found out I am on the slow side after months of wondering why an afternoon cup wrecked me. Other things that slow clearance down:
- Pregnancy, which can double the half-life
- Certain medications, including some antidepressants and antibiotics
- Liver conditions
- Age, since clearance tends to slow as we get older
Smoking speeds it up. Oral contraceptives slow it down. If you take a daily pill and wonder why coffee hits harder than it used to, that is often the reason.
How to find your own cutoff time
I use a simple rule now. I take my target bedtime, count back 8 hours, and that is my last call for caffeine. Bedtime at 11 p.m. means no coffee after 3 p.m. On days I really want an afternoon cup, I switch to half-caf or decaf. The taste ritual matters more to me than the drug at that point.
If you want to get more precise, a sleep cycle calculator can help you set a bedtime based on when you need to wake up. Pair that with a caffeine cutoff and you have a plan that actually holds up. I also like using a nap calculator on days when I cut caffeine too late and need a short reset instead of another cup.
What about tolerance and withdrawal
Regular drinkers build tolerance to the alerting effects, but tolerance to the sleep disruption is weaker. That means you can feel like coffee does nothing for you anymore, yet it still pushes your sleep later. I went through this. I thought my 4 p.m. cup was harmless because I did not feel a buzz. My sleep tracker said otherwise.
Cutting back too fast causes headaches, fatigue, and brain fog. I taper by mixing regular and decaf over about a week. It is boring but it works.
The bottom line on coffee and sleep
Coffee keeps most people awake for 5 to 6 hours at a meaningful level, and smaller amounts linger for 10 hours or more. The exact number depends on your dose, your liver, your meds, and your genes. If sleep is your priority, set a cutoff 8 hours before bed and treat it as a real deadline. You can still enjoy coffee. You just have to stop treating it like it disappears the moment you finish the cup. For me, that meant moving my last cup to 1 p.m. and sleeping through the night for the first time in months. Try the same shift for a week and see what your mornings feel like. If you want to run the numbers for your own schedule, the free sleep tools on our site take about a minute to use.