Calculators / What time should I stop drinking coffee?
Work backward from bedtime. See the latest time you can finish a caffeinated drink and still have only a small amount left when you go to bed.
Last updated Based on 2 official sources
What you enter
Caffeine is cleared at a roughly fixed proportion per hour. The amount left after a given time is:
remaining = dose × 0.5(hours ÷ half-life)
To find the latest time, solve that equation for hours when the remaining amount equals your target:
hours = half-life × log2(dose ÷ target)
Then subtract those hours from bedtime. For example, 200 mg with a 5-hour half-life leaves 25 mg after about 15 hours (5 × log₂(200 ÷ 25) = 15), so the last cup would need to finish 15 hours before bed.
This is an average model. Your own half-life depends on liver enzymes, smoking, pregnancy, medicines, and genes.
Your inputs never leave this page. Nothing is sent to a server, saved to an account, or written to a cookie.
Official sources — every figure used above.
Last checked: .
This is a general estimate, not medical advice. If caffeine is affecting your sleep, or you have a heart condition or are pregnant, talk to a doctor.