Enter your bedtime and caffeine sensitivity to get your personal cutoff times — so caffeine helps your focus without hurting your sleep.
How to use this calculator
Enter your target bedtime
Choose when you want to be asleep — not when you get into bed.
Select your caffeine sensitivity
Not sure? Pick "Average." You can always adjust.
Get your cutoff times
You'll see three times: ideal, hard, and absolute latest. Aim for the ideal.
Example output
Bedtime: 11:00 PM (average sensitivity)
Why it works
Caffeine blocks adenosine receptors in the brain, temporarily reducing sleepiness. Its half-life — the time for your body to eliminate half the caffeine — averages 5 hours but ranges from 3 to 7 hours depending on genetics (CYP1A2 enzyme activity), liver function, pregnancy, and medications (Nehlig, 2018).
A study by Drake et al. (2013) in the Journal of Clinical Sleep Medicine found that caffeine consumed even 6 hours before bed significantly disrupted sleep quality, reducing total sleep time by over an hour. The effect was measurable even when participants didn't subjectively notice it.
Limitations: Individual metabolism varies widely. Factors like smoking (speeds clearance), oral contraceptives (slows clearance), and age all influence your personal half-life. This calculator uses general population data — adjust based on your own experience.
Related guides & tools
Frequently asked questions
How long does caffeine stay in your system?
Caffeine's half-life is about 5 hours, meaning if you drink 200mg at noon, you still have ~100mg at 5 PM and ~50mg at 10 PM. Full clearance takes 10–12 hours for most people.
Does decaf have caffeine?
Yes — decaf typically contains 2–15mg per cup (vs. 80–100mg in regular coffee). This is usually low enough that it won't affect sleep, but very sensitive individuals may still notice it.
What about tea vs. coffee?
A cup of black tea has roughly 40–70mg of caffeine (vs. 80–100mg in coffee). Green tea has 20–45mg. The same cutoff rules apply — just adjust for the lower dose.
Can I build tolerance to caffeine's sleep effects?
You can build tolerance to caffeine's alerting effects, but research suggests the sleep-disrupting effects persist even in regular users. Your body still takes the same time to metabolize caffeine regardless of tolerance.
How we chose sources: Calculations based on caffeine pharmacokinetics research, including Drake et al. (2013, JCSM) and Nehlig (2018). Read our editorial policy →
This tool is for educational purposes only and is not medical advice. Read our medical disclaimer →
Use the caffeine result as a sleep-protection rule
The calculator estimates a practical cutoff time so caffeine helps alertness without quietly damaging sleep. Treat the result as a starting boundary, then adjust for sensitivity, medication, anxiety, pregnancy, and late-day training. If sleep is already fragile, combine the cutoff with a calmer evening routine instead of using caffeine to push through fatigue.
After using the tool, write down one next action, one review time, and one sign that the plan is working. This keeps the result from becoming passive advice. If the tool gives a schedule or recommendation, treat it as a starting point and adjust it after real feedback from your energy, recall, focus, or sleep.