Your caffeine curfew is the latest clock time you can take a dose and still be under your own bedtime target. It is one equation, not a rule of thumb: hours needed = half-life x log2(dose / target). At a 5 hour half-life, a 200mg dose takes 10 hours to fall to 50mg, so an 11pm bedtime puts the curfew at 1pm. Change the half-life to 3 hours and the same drink is fine until 5pm. Change it to 7 hours and you needed to stop at 9am. The adult half-life range is 3 to 7 hours per a 2017 review in Frontiers in Psychiatry, with about 5 hours as the average adult figure per StatPearls.
Get your own last call
Enter your bedtime, your usual drink and your sensitivity. The tool subtracts a sensitivity window from your bedtime (6 hours if caffeine rarely bothers you, 8 average, 10 if you are sensitive) and hands you a clock time, then shows how much of that drink is still in you at bedtime on a 5 hour half-life.
The math, in one line
Caffeine leaves by first-order elimination, so what is left after any stretch of time is:
remaining = dose x 0.5 ^ (hours / half_life)
Rearranged for the question you actually care about, which is how long you need before bed:
hours before bed = half_life x log2(dose / target)
Pick a target you are willing to go to sleep on, put your dose in, and the answer falls out. There is no published "correct" bedtime target, so the number you choose is a preference, not a fact.
What our calculator does, exactly
Two different numbers, so it is worth being precise about which is which. The curfew clock time comes from a fixed window: your bedtime minus 6, 8 or 10 hours depending on the sensitivity you pick. That window does not change with the size of the drink. The second number, how much caffeine is still in you at bedtime, is where your drink matters: it decays your dose across that window on a 5 hour half-life. The log formula below is the other way to run it, by hand, when you want the cutoff to depend on the dose itself.
Hours you need before bed, by dose
Everything below is that equation with a 50mg bedtime target, rounded to one decimal. The doses are round numbers so you can scale them, not published drink values.
| Dose | Half-life 3h (fast) | Half-life 5h (average) | Half-life 7h (slow) |
|---|---|---|---|
| 100mg | 3.0 hours | 5.0 hours | 7.0 hours |
| 200mg | 6.0 hours | 10.0 hours | 14.0 hours |
| 300mg | 7.8 hours | 12.9 hours | 18.1 hours |
| 400mg | 9.0 hours | 15.0 hours | 21.0 hours |
Arithmetic only, from hours = half_life x log2(dose / 50). The half-life columns are the ends and midpoint of the 3 to 7 hour adult range reported in the Frontiers in Psychiatry review.
Doubling the dose does not double the wait
This is the part the arithmetic gets right and intuition gets wrong. Going from 100mg to 200mg adds exactly one half-life, because one doubling is one halving in reverse. Going from 200mg to 400mg adds one more. So a big drink does not push your curfew back by hours and hours, it pushes it back by one half-life per doubling. At a 5 hour half-life that is 5 hours per doubling, which is still a lot, but it is a fixed step rather than a runaway.
The variable that actually swings your curfew is your own half-life, not the size of the drink. The 400mg row spans 9 hours to 21 hours across the same range that describes healthy adults. StatPearls lists the modifiers: smoking cuts the half-life by up to 50 percent, late pregnancy can stretch it to around 15 hours, and liver disease or drugs that inhibit the same liver enzymes stretch it further.
What the curfew number does not cover
Three honest limits. First, the model assumes the caffeine arrives the moment you drink it, while serum caffeine actually peaks about two hours after ingestion per the same Frontiers review, so early hours are overstated. Second, a single half-life is applied all evening, which ignores anything else you have eaten or taken. Third, the bedtime target is your call, and nobody publishes a threshold below which caffeine has no effect on sleep.
For context, the FDA cites 400mg of caffeine a day as an amount not generally associated with negative effects for most healthy adults, and notes wide variation in both sensitivity and clearance (FDA). This page is information, not advice.
Related reading
As an Amazon Associate, Barista Life earns from qualifying purchases.
Gear from this guide
FAQ
What is a caffeine curfew? It is the latest time you can have a given dose and still be under your own caffeine target at bedtime. Worked by hand the formula is hours before bed = half-life x log2(dose divided by target); our calculator uses the simpler sensitivity-window rule described above.
How many hours before bed should I stop drinking coffee? With a 50mg bedtime target and an average 5 hour half-life, 100mg needs 5 hours, 200mg needs 10 hours and 400mg needs 15 hours. At the fast end of the adult range those become 3, 6 and 9 hours.
Why does the answer change so much between people? Because the adult half-life range is 3 to 7 hours. Smoking shortens it by up to half, and late pregnancy, liver disease and some medications lengthen it.
Sources: the 3 to 7 hour adult half-life and the roughly 2 hour serum peak are stated in "The Safety of Ingested Caffeine: A Comprehensive Review", Frontiers in Psychiatry, 2017. The approximately 5 hour average adult half-life, the up to 50 percent reduction in smokers and the up to 15 hour figure in late pregnancy are from the StatPearls caffeine chapter. The 400mg daily context figure is from the FDA consumer update Spilling the Beans. All fetched and cached 2026-08-18. Every hour figure in the table is arithmetic from the stated equation.
Barista Life runs on coffee people. Browse the Barista Life shop to support the site.
Get the good coffee stuff
One email a week: what we verified, what is worth buying, and what is not. No spam, unsubscribe any time.