Caffeine Cutoff Time Calculator
Enter your bedtime and caffeine dose to see when to stop drinking coffee.
Result
How it is calculated
Caffeine is modelled as exponential decay, halving every half-life. The tool works out how many half-lives it takes for the dose to fall to the amount you accept at bedtime: hours = half-life × log2(dose ÷ threshold). The cutoff is bedtime minus those hours, rounded to the minute and shown as a 24-hour clock time. Bedtime is typed as HH:MM; dose and threshold are in mg and the half-life is in hours (above 0, at most 12). The dose must be above 0 and at most 1000 mg, and the threshold must be above 0 and below the dose, otherwise there is no result. If the wait is 24 hours or more, the clock wraps and the result adds how many days back it is, for example (−4 d). The threshold is your own choice, not a medical limit, and only one dose is modelled.
Worked example
Bedtime is 23:00, the drink holds 95 mg of caffeine, the half-life is 5 hours and you want less than 30 mg left. Ratio: 95 ÷ 30 = 3.17. Half-lives needed: log2(3.17) = 1.66. Hours: 5 × 1.66 = 8.3, about 8 hours 19 minutes. Subtract from bedtime: 23:00 − 8 h 19 min = 14:41. The tool also reports 8.3 h before bedtime and the 30 mg threshold used.
Common mistakes
- Entering the volume of the drink instead of its caffeine in mg. A 250 ml cup is not 250 mg; the field wants the milligrams of caffeine in it.
- Setting the threshold equal to or above the dose. The threshold is what is left at bedtime and must be lower than what you drank, or there is no result.
- Entering a half-life above 12 hours, or a dose above 1000 mg. These are rejected and show no result rather than a cutoff.
- Typing bedtime in a 12-hour style such as 11pm. The format is 24-hour HH:MM, for example 23:00, and 11pm shows no result.
- Choosing a tiny threshold and being surprised by the answer. A threshold of 0.0001 mg gives 99.3 hours, which the tool shows as a time of day plus the number of days back, here 19:43 (−4 d).
About this calculator
Caffeine leaves the bloodstream on a predictable decay curve, with a half-life commonly cited around 5 hours in healthy adults — meaning roughly half of what you drank is still active in your system 5 hours later, a quarter remains after 10 hours, and so on. This calculator works backward from your bedtime using that decay curve to find the latest time you can have a caffeinated drink and still fall to the residual level you choose (30 mg by default) by the time you want to sleep.
The half-life varies from person to person — smokers metabolize caffeine roughly twice as fast, pregnancy slows it considerably, and certain medications and liver function shift it too — but the 5-hour figure is the standard reference point used in sleep hygiene guidance. People use a cutoff time like this to plan their last cup of coffee, energy drink, or tea of the day when they have a fixed bedtime, rather than relying on the vague 'no caffeine after 2pm' rule that ignores dose size and individual sensitivity.
Enter your planned bedtime, how much caffeine you plan to drink, your half-life (5 hours by default) and the residual level in mg you want by bedtime, and the calculator returns the latest time to have it.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)