Caffeine Calculator
Science-based timing for your coffee and tea
Work out when to drink your coffee and tea, based on your cortisol rhythm and caffeine half-life. Adjust the inputs and everything recalculates instantly.
I built this to help me time my caffeine around my cortisol peaks. To quote Tim Ferriss: "I am not a doctor, and I don't play one on the internet." This is not medical advice.
How this works
Cortisol rhythm: Your body produces cortisol in peaks throughout the day, starting with the cortisol awakening response about 30-45 minutes after you wake up, with smaller peaks in the late morning and mid-afternoon. Caffeine is most effective between these peaks, when cortisol is naturally low.
Caffeine half-life: The average adult eliminates half the caffeine in their system every 5 hours. Fast metabolisers (including smokers) clear it in about 3 hours; slow metabolisers (including those on oral contraceptives) may take 7 hours. This affects how late you can safely drink.
The 25mg threshold: The "last safe drink" calculation works backwards from your bedtime to find the latest time you can drink so that less than 25mg of caffeine remains in your system when you want to sleep. Below 25mg, most people experience minimal sleep disruption.
Drink placement: By default, coffees are placed in earlier optimal windows (higher caffeine, more time to clear) and teas in later windows (lower caffeine, needs less clearance time). Use the drink order selector to change this if you prefer tea in the morning.
Yesterday's carry-over: Caffeine doesn't fully clear overnight. With a 5-hour half-life, a drink at 2pm still leaves a few milligrams in your system 17 hours later at 7am. Toggle this on to see the residual from an identical previous day's schedule layered into the curve. It's usually small (10-15mg) but adds up for slow metabolisers or heavy drinkers.
This is a simplified model. Individual responses to caffeine vary based on genetics, tolerance, medications, and other factors. Use it as a guide, not gospel.