The reason you cannot sleep may be an evening coffee. How long caffeine actually stays in your body.
📚 Health & Wellbeing · 4/15·⏱ About 4min read·Information updated 2026-10-01
📋 Key facts4
Key
Timing affects sleep more than total amount
Half-life
Roughly five hours in adults, with wide individual variation
Upper limit
Around 400mg a day is the usual ceiling for healthy adults
Note
Energy drinks are easy to miss when counting your intake
Caffeine does not remove tiredness
Caffeine does not restore energy. It occupies the place where the sleepiness signal would normally land, so you stop noticing the signal. The signal itself keeps building up and returns all at once as the caffeine clears. That is why an afternoon coffee can be followed by a sudden collapse in the evening.
The hour you drink it matters
Caffeine takes roughly five hours to fall by half. A cup at three in the afternoon is still half present at eight in the evening and about a quarter at midnight. If you fall asleep but wake repeatedly or sleep lightly, moving your last cup earlier usually helps faster than cutting the amount. Even for the same person, the clearance rate can change with pregnancy, some medications or smoking, so treat this figure as a rough guide only.
Set a cut-off six to eight hours before bed
If you wake at night, adjust timing before quantity
Clearance speed varies a lot, so test it on yourself
It is in more places than you think
Counting only coffee misses your real intake. Green tea, black tea, cola, energy drinks, chocolate, and some headache and cold medicines all contain caffeine. Small amounts through the day often add up to two or three cups of coffee. On days you take cold or pain medicine, check the label for caffeine and cut back on coffee accordingly.
Drip coffee, one cup: roughly 80 to 140mg
Espresso, one shot: roughly 60 to 80mg
Green or black tea, one cup: roughly 20 to 50mg
Energy drink, one can: roughly 60 to 160mg
Tolerance and withdrawal
Daily use reduces the alertness you feel from the same amount. Stopping abruptly from there can bring a headache and sluggishness for a day or two. That is not damage, it is the adapted state unwinding. If you plan to cut down, reducing over several days is more comfortable than stopping at once. When a headache hits, before reaching for a painkiller, check whether you skipped your usual coffee time; it often explains the cause.
Setting a daily reference
Guidance from several public health bodies for healthy adults generally puts the upper limit at around 400 mg a day. That is a level known to cause no problems for most people, not a target, and the figure can differ between agencies and over time. The caffeine in one cup varies greatly by shop and size, so counting 'cups a day' easily misses the real amount. Check the stated content of the drinks you have most often and you will get a feel for it. If smaller amounts still affect your sleep or heart rate, that is your own limit.
When to use it
The same dose feels different depending on timing. A few principles make it easier to get the effect you want from less.
An hour or two after you are up, rather than right on waking
A little before drowsiness hits beats a lot after
Last cup at least six to eight hours before bed
Strong coffee on an empty stomach can cause heartburn
For drowsiness while driving, stopping to rest is the answer, not caffeine
Common mistakes
The most common mistake is the loop of covering lost sleep with caffeine and then losing sleep because of caffeine: an afternoon coffee leads to shallow sleep, a more tired morning, and more coffee. To break it, moving the time earlier is usually easier than cutting the amount. Decaf still contains a small amount of caffeine, and treating green tea or cola as fine because 'it is not coffee' is a frequent misconception. Mixing energy drinks with alcohol can make you feel less drunk than you are, which can be dangerous.
Signs to cut back
A racing heart, shaky hands, anxiety, or trouble falling asleep mean the current amount is past your own limit. During pregnancy, or with heart or stomach conditions, the sensible ceiling is far below the general one, so check with whoever is treating you rather than deciding alone.