Caffeine Half-Life Calculator

See how much caffeine is still in your body hours after coffee, tea or an energy drink, and when it will drop low enough for sleep.

Informational only, not medical advice. Talk to a doctor.

How it works

Enter how many milligrams of caffeine you had. An 8 ounce brewed coffee has about 95 mg, a shot of espresso about 63 mg, a can of cola about 34 mg and many energy drinks 80 to 300 mg. Add up drinks taken close together and enter the time since the first one for a conservative estimate.

Caffeine leaves the body by exponential decay. The half-life is the time it takes to clear half of what is left. For healthy adults it averages around 5 hours, but it can be as short as 2 hours in smokers and as long as 10 hours or more during pregnancy or with some medications.

The calculator applies the half-life formula to show the milligrams still in your system and the percent of the original dose. It also shows how many hours it takes to fall below a level you choose, such as 50 mg, which many people find low enough not to disturb sleep.

Formula

remaining = dose × 0.5^(hours ÷ half-life) hours to level = half-life × log₂(dose ÷ level)

Where:

dose
= Caffeine consumed in milligrams
half-life
= Hours for the amount to fall by half, about 5 on average
level
= Target amount you want to fall below

Worked example

Two cups of coffee totaling 200 mg with a 5 hour half-life leave 100 mg after 5 hours and 50 mg after 10 hours.

If you drink them at 2 pm, you still have about 50 mg at midnight. Moving that coffee to 10 am gets you below 50 mg by 8 pm.

Using caffeine without losing sleep

Caffeine blocks adenosine, the chemical that builds sleep pressure during the day. Even if you can fall asleep after an evening coffee, studies show it can reduce deep sleep. Knowing how many milligrams remain at bedtime helps you choose a cutoff time that protects sleep quality, not just sleep onset.

If you want energy without the late night effects, have your caffeine earlier, split one large drink into two smaller ones in the morning, or switch to half caff or tea after lunch. Drinking water and getting daylight early in the day can also help with alertness without adding to the caffeine total.

Frequently asked questions

About 5 hours for an average healthy adult, with a normal range of roughly 2 to 10 hours depending on genetics, smoking, pregnancy and medications.

Related calculators

For informational purposes only. This calculator does not provide medical advice. Consult a qualified professional before making decisions based on these results.