Caffeine Half-Life Calculator: Bedtime Cutoff for Sleep

Track daily coffee and caffeine intake half-life breakdown, calculate residual bloodstream mg at bedtime, and determine your optimal cutoff time.

Caffeine at bedtime: residual dose and cut-off time

Caffeine is cleared exponentially: after one half-life 50% of a dose remains, after two half-lives 25%. The tool adds up what is left of each drink at bedtime and suggests a last cup 1.8 half-lives before sleep, around 1 pm for an 11 pm bedtime with a 5.5-hour half-life.

Formulas

  • Amount left from one drink at bedtime: N = N0 × 0.5^(Δt / T½), where Δt is the hours between the drink and bedtime.
  • Residual caffeine = sum of what is left from every drink.
  • Cut-off time = bedtime − 1.8 × T½; a drink taken then still leaves about 29% at bedtime.

Example (default values)

Bedtime 11 pm, half-life 5.5 h. Filter coffee, 120 mg at 8 am: 18.1 mg left; espresso, 75 mg at 1:30 pm: 22.7 mg; green tea, 45 mg at 4 pm: 18.6 mg. Total intake 240 mg, residual 59.4 mg. The computed cut-off is 1:06 pm. With an 8-hour half-life the residual rises to 90.2 mg and the cut-off moves to 8:36 am; with 4 hours it falls to 36.8 mg and the cut-off becomes 3:48 pm.

Assumptions and limits

The model assumes instant absorption and a constant half-life, adjustable from 3 to 9 h (5.5 h by default). In practice the half-life varies between people: smoking shortens it, while pregnancy and some oral contraceptives lengthen it (indicative, not verified). A drink taken at or after bedtime is counted in full. The caffeine content of the presets (65 mg espresso, 110 mg for 250 ml filter coffee, 80 mg for a 250 ml energy drink…) are averages; the label prevails. The 25 and 50 mg thresholds that colour the result are the tool's own markers, not an official recommendation. The result is an estimate and does not replace medical advice, especially during pregnancy or with heart rhythm problems.

Sources and dates: European Food Safety Authority scientific opinion on the safety of caffeine, published on 27 May 2015: up to 400 mg a day and 200 mg per single dose raise no concern for healthy adults, 200 mg a day during pregnancy, and a 100 mg dose close to bedtime may shorten sleep in some adults (EFSA, Caffeine topic page) (checked on 14/10/2026)

Frequently Asked Questions

How long does caffeine stay in your body?

With a 5.5-hour half-life (the tool default), half of a cup is cleared in 5.5 hours and three quarters in 11 hours. Of 120 mg drunk at 8 am, about 18 mg remain at 11 pm. The actual half-life varies widely between people.

What time should I have my last coffee?

The tool puts the last cup 1.8 half-lives before bedtime: 1:06 pm for an 11 pm bedtime with a 5.5-hour half-life, 3:48 pm with 4 hours, 8:36 am with 8 hours. EFSA notes that 100 mg close to bedtime may shorten sleep in some adults.

How much caffeine per day is safe?

According to EFSA (May 2015 opinion), up to 400 mg a day spread over the day and 200 mg in a single dose raise no concern for healthy adults. During pregnancy the limit is 200 mg a day, and 3 mg per kilo of body weight for children and teenagers.

How much caffeine is in an espresso or a filter coffee?

The tool uses 65 mg for an espresso, 130 mg for a double, 110 mg for 250 ml of filter coffee, 50 mg for a mug of black tea and 80 mg for a 250 ml energy drink. These are averages: real content depends on the beans, grind and extraction.

Is this tool really free?

Yes, all tools on Kristools are 100% free and accessible without registration.

Is my data protected?

Yes. All processing is performed directly and securely inside your browser. No personal data is sent to our servers.