Why the Same Coffee Wrecks Your Sleep and Not Your Colleague's
Two people drink the same coffee at the same time. One sleeps normally; the other is still staring at the ceiling at one in the morning. This is usually put down to "sensitivity", as though it were a matter of temperament. Much of it is a single measurable parameter: how fast each of them clears caffeine.
The size of the difference
Take 200mg — a large coffee — eight hours before bed, and vary only the half-life. Everything else identical. From the caffeine timing calculator:
| Half-life | Left at bedtime | Cut-off before bed |
|---|---|---|
| 3 hours | 31.5mg | 6 hours |
| 4 hours | 50.0mg | 8 hours |
| 5 hours (typical) | 66.0mg | 10 hours |
| 6 hours | 79.4mg | 12 hours |
| 7 hours | 90.6mg | 14 hours |
The fast clearer finishes the evening with 31.5mg on board. The slow clearer, same drink, same hour, has 90.6mg — almost three times as much. And their cut-off times differ by eight hours: one can drink that coffee at four in the afternoon, the other needed to have it before eight in the morning.
That is not a difference in willpower or attitude. It is the same molecule leaving two bodies at different rates.
What moves someone's half-life
Caffeine is cleared mainly by one liver enzyme, and several ordinary things change how briskly it works:
- Genetics. Variation in the relevant enzyme is well documented, and it is the largest single reason two healthy adults differ.
- Smoking accelerates clearance substantially — which also means that quitting slows it, and a smoker who stops may find their usual coffee suddenly keeps them awake.
- Pregnancy slows clearance markedly, and progressively so across the later stages.
- Some medications — including certain oral contraceptives and some antibiotics — slow it; others speed it up.
- Liver function matters, since that is where the work happens.
- Age has some effect, though less than the factors above in healthy adults.
Any of these can shift someone a whole hour or two of half-life, which the table above shows is worth a great deal more than the fine detail of what time they had the drink.
Estimating your own, roughly
There is no home test, but there is a usable empirical approach: hold the dose and the timing constant for a week and pay attention to how you sleep, then change the timing and repeat.
If a mid-afternoon coffee reliably costs you sleep while colleagues drink the same thing and are fine, you are probably at the slow end and should assume a longer half-life in the calculator. If you can drink coffee at eight in the evening and sleep, set it shorter. Adjust the figure until the tool's predictions match what actually happens to you — at which point it becomes genuinely useful rather than generic.
Why this matters more than the usual advice
The standard guidance — "avoid caffeine six hours before bed" — is built on a population average, and the table shows what an average conceals. For the fast clearer it is over-cautious by hours; for the slow clearer it is wrong in the direction that costs them sleep.
Advice built on an average is most misleading for the people furthest from it, and those are exactly the people most likely to be searching for it.
The compounding problem
Slow clearance does not only cost one night. Caffeine still present at bedtime tends to reduce sleep quality, which produces tiredness the next day, which is met with more caffeine, earlier and larger — and that dose is also cleared slowly.
If that loop sounds familiar, the number worth looking at is not tonight's but the week's: the sleep debt calculator totals the accumulated shortfall, and it is usually larger than it feels, because a run of nights that are each an hour short does not feel like anything in particular until the total is in front of you.
None of this is medical advice, and half-life estimates are exactly that. If caffeine is affecting your sleep persistently, or you are pregnant or taking medication, that is a conversation for a clinician rather than a calculator.
Tolerance is a different thing from clearance
These get conflated constantly and they are not the same mechanism, which is why "I've built up a tolerance, it doesn't affect me" is a weaker argument than it sounds.
Tolerance is the reduced subjective effect of a familiar dose — the coffee stops feeling like much. Clearance is how fast the molecule leaves. Regular drinking changes the first considerably and the second very little.
So a habituated drinker can genuinely feel nothing from an evening coffee and still have a substantial amount of caffeine circulating while they sleep. Not noticing a stimulant is not evidence that it is gone; it is evidence that you are used to it. The calculator models clearance, which is the part that carries on happening whether or not you can feel it.
Where the average advice comes from, and why it misleads
The familiar "six hours before bed" guidance is a reasonable summary of population data. The trouble is that guidance built on a mean is least accurate for the people furthest from the mean — and those are precisely the people who go looking for advice, because they are the ones having a problem.
Someone with a three-hour half-life follows the six-hour rule and gives up afternoon coffee they could have had. Someone with a seven-hour half-life follows the same rule, still sleeps badly, and concludes caffeine is not the issue. Both are misled, in opposite directions, by the same sentence.
Calibrating the number you use
A workable procedure, and it takes about a fortnight:
- Pick one drink you have regularly and know the approximate dose of.
- Set the half-life in the calculator to five hours and note the cut-off it gives.
- Hold to that cut-off for a week and record roughly how you slept.
- If sleep is fine, try shortening the half-life to four hours, which moves the cut-off later, and test that for a week.
- If sleep is still disturbed, lengthen it instead, and keep going until the predictions match reality.
The number you converge on is not a measurement of your enzyme activity — it is a fitted parameter that makes a simple model useful for you. That is a perfectly respectable thing for it to be, and it beats a population average that was never about you.
One caution about self-experiments
Sleep is affected by a great many things at once, and a week is a short sample. If you change your caffeine timing during a stressful fortnight, or while travelling, or alongside a change in exercise or alcohol, you will not learn much from the result.
Change one variable, give it enough nights to see past the noise, and be willing to conclude that caffeine was not the problem. And if sleep is persistently poor regardless of what you do with it, that is a matter for a clinician — a half-life estimate cannot distinguish caffeine from the several medical causes of bad sleep, and should not be asked to.