Free sleep tool
Caffeine Cutoff Calculator
Enter your bedtime and see when to switch to decaf, based on how long caffeine actually lingers in the body.
Last caffeine between
Why a window instead of a time
The six-hour end is the one figure that comes from a direct measurement. In a controlled trial, 400 mg of caffeine disrupted sleep when taken at bedtime, three hours before bed, and six hours before bed. Every timing tested caused measurable disruption, which makes six hours the latest defensible cutoff rather than a safe one — the study never found a timing that came back clean.
The other end of the window exists because people clear caffeine at very different rates. The half-life in an average adult is about five hours, but smoking roughly halves it, and liver conditions, CYP1A2 inhibitors and pregnancy stretch it well past the average. Oral contraceptives are one of the larger measured effects: one study found a half-life of 10.7 hours in women taking them against 6.2 hours in those who were not.
Ten hours is where this tool puts the cautious end, and it is worth being clear that no trial has tested that cutoff. It is the measured six-hour floor carried out across the slow end of the half-life spread: an extrapolation, not a finding. If you know you are slow to clear caffeine, it is the end to work from.
Caffeine content varies as much as people do, which is why every drink here is a range rather than a number. Brew strength, cup size and roast move the figures well beyond even those ranges, so treat them as a rough guide rather than a dose.
Where these numbers come from
- The six-hour floor: Drake et al. 2013, Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed — 400 mg at all three timings significantly disrupted sleep against placebo.
- Half-life (about five hours in an average adult), halved in smokers and prolonged by pregnancy, liver disease and CYP450 inhibitors: Caffeine (StatPearls, NCBI Bookshelf).
- The oral-contraceptive effect (10.7 hours against 6.2): Patwardhan et al. 1980, Impaired elimination of caffeine by oral contraceptive steroids. StatPearls does not cover this one, so it is cited separately.
- Caffeine per serving for coffee, tea, cola and energy drinks, stated as ranges because that is how the source states them: the FDA's Spilling the Beans: How Much Caffeine is Too Much?
- Espresso is not on that FDA page; its 63 mg per fluid ounce comes from USDA FoodData Central.
- The ten-hour cautious cutoff is derived, not measured. See the explanation above.
This is general information, not medical advice. Sleep that stays bad for weeks is worth taking to a doctor.

