Caffeine Half-Life Calculator
Calculate how much caffeine remains in your system at bedtime and when to stop drinking coffee.
About this calculator
This is exponential decay with a personal half-life. The gap between your cup and your pillow is measured in hours, wrapping past midnight where needed, and the dose is halved once for every half-life inside that gap. The metabolism selector supplies the half-life outright — seven hours if you describe yourself as sensitive, five for typical, three if caffeine barely touches you — and because it sits in the exponent rather than alongside it, that dropdown moves the bedtime figure further than anything else on the page. Two hundred milligrams taken at two in the afternoon before an eleven o'clock bedtime leaves about 57 mg on the normal setting, 82 mg on the sensitive one and only 25 mg on the fast one, the difference between a night flagged as disrupted and one that is not.
That flag is a single fixed cutoff of 40 mg; there is no gradual scale and no body-weight adjustment. The latest safe time works the same relationship backwards, solving for how many half-lives are needed to bring your dose down to that 40 mg line and stepping that many hours back from bedtime. One consequence catches people out: a dose already at or under 40 mg needs no decay time, so the hours-to-safe figure collapses to zero and the latest safe time is simply reported as your bedtime. Tolerance, pregnancy, medication that slows clearance, and the stimulating effect of caffeine taken hours earlier are all outside the model.
Medical Disclaimer
This calculator is for informational and educational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider before making decisions about your health. Never disregard professional medical advice or delay seeking it because of results from this tool.
Inputs
Results
Caffeine at Bedtime
57 mg
How to Use This Calculator
- Enter the milligrams of caffeine in the drink you had — roughly 95 for brewed coffee, 63 for espresso, 47 for tea.
- Set Consumption Time to the 24-hour hour you drank it, in half-hour steps.
- Set Bedtime to your planned sleep hour, using values above 24 for an after-midnight bedtime.
- Choose the metabolism speed that describes you; it selects a 7, 5, or 3 hour half-life and drives every other result.
- Read Caffeine at Bedtime against the 40 mg cutoff used by the Sleep Disruption Risk row, then use Latest Safe Coffee Time as your cut-off for tomorrow.
How the result changes with Bedtime (24h)
| Bedtime (24h) | Caffeine at Bedtime |
|---|---|
| 21 | 76 mg |
| 22 | 66 mg |
| 24 | 50 mg |
| 25 | 44 mg |
What each input means
- Caffeine Amount
- Caffeine consumed (coffee ~95mg, espresso ~63mg, tea ~47mg)
- Consumption Time (24h)
- Hour you consumed caffeine (24-hour)
- Bedtime (24h)
- Hour you plan to sleep (24-hour)
- Caffeine Metabolism
- How quickly your body processes caffeine
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersCaffeine Amount = 200, Consumption Time (24h) = 14, Bedtime (24h) = 23, Caffeine Metabolism = 2 = 4 input(s) provided
- Calculate Caffeine at BedtimeCaffeine at Bedtime57 = 57
- Calculate Sleep Disruption RiskYes — Above threshold = Yes — Above threshold
- Calculate Latest Safe Coffee TimeLatest Safe Coffee Time = formatTime(safeHour11:23 = 11:23
Engine last updated . Checked against 3 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why does the metabolism dropdown change the answer more than the dose does?
Because it sets the exponent, not a multiplier. Halving your cup only halves the bedtime figure once, while moving from the three-hour to the seven-hour half-life more than triples what is left after a nine-hour wait — 25 mg becomes 82 mg on the default two hundred milligram dose.
What counts as enough caffeine to disrupt sleep?
A single fixed line at 40 mg remaining at bedtime. Anything above it returns the above-threshold warning and anything at or below returns the safe message, with no weighting for body mass, tolerance or sensitivity beyond the half-life you selected in the metabolism field.
Why is Hours to Safe Level zero and the latest safe time the same as my bedtime?
That happens whenever the dose you entered is already at or below the 40 mg cutoff. With nothing to decay away, no waiting period is calculated, so the page reports zero hours and hands back your bedtime unchanged rather than suggesting an earlier cut-off.
How should I enter a bedtime after midnight?
Keep counting past twenty-four, up to the limit of twenty-six. Entering 26 for a two in the morning bedtime gives a twelve-hour gap from a two in the afternoon coffee, and the displayed clock times are wrapped back into a normal twenty-four hour reading for you.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Sleep Cycle Calculator
Calculate optimal bedtime and wake time based on 90-minute sleep cycles to wake between cycles.
Sleep ScienceCircadian Rhythm Planner
Create a chronotype-based daily schedule for optimal sleep, focus, meals, and exercise.
Coffee & TeaCaffeine Content Estimator
Estimate total caffeine intake from coffee, tea, espresso, and energy drinks. See how your intake compares to the FDA daily maximum and how long it takes to metabolize.
Cooking & NutritionCaffeine Intake Calculator
Track your daily caffeine intake from coffee, tea, soda, and energy drinks. Compare against FDA recommendations.
Sleep ScienceJet Lag Recovery Calculator
Calculate days to adjust from timezone change with light therapy and melatonin timing recommendations.
More in Health & Fitness.