How This Caffeine Half-Life Calculator Works

This calculator estimates how much caffeine remains in your body at any point after you drink it, using the scientific concept of half-life. Enter your drink (or a custom caffeine amount), the time you consumed it, and your bedtime. The tool then shows how much caffeine is still active at bedtime, draws a decay curve over the hours, and tells you the last safe time you could have consumed that caffeine for it to clear before sleep.

What Is Caffeine Half-Life?

Half-life is the time it takes for your body to eliminate half of a substance. For caffeine, the average half-life in a healthy adult is about 5 to 6 hours. This means if you drink a coffee with 200mg of caffeine, about 100mg remains after 5 hours, 50mg after 10 hours, and 25mg after 15 hours. Caffeine is broken down primarily by the liver enzyme CYP1A2, and the rate varies significantly from person to person.

Why Caffeine Timing Affects Your Sleep

Research suggests that as little as 25mg of caffeine remaining in your system at bedtime can delay sleep onset and reduce the amount of deep, restorative sleep you get, even if you do not feel wired. This is why an afternoon coffee can quietly harm your sleep quality. Because caffeine has a long half-life, a 3pm coffee can still have a meaningful amount circulating at 11pm. The calculator helps you see this clearly so you can decide whether that afternoon cup is worth it.

What Affects Your Personal Half-Life?

Several factors change how quickly you process caffeine:

The fast, normal, and slow settings in the calculator approximate these differences so you can get a more personal estimate.

Caffeine Remaining After Each Half-Life

Time after drinkingCaffeine left (from 200mg)Percent remaining
0 hours200mg100%
5 hours (1 half-life)100mg50%
10 hours (2 half-lives)50mg25%
15 hours (3 half-lives)25mg12.5%
20 hours (4 half-lives)12.5mg6.25%
25 hours (5 half-lives)6.25mg3.1%

When Should You Stop Drinking Coffee?

A practical rule of thumb is to stop consuming caffeine 8 to 10 hours before bed. For a more precise answer, this calculator works backwards from your bedtime to find the latest time a given dose would drop below the 25mg sleep threshold. If you are caffeine-sensitive or have trouble sleeping, an even earlier cut-off, such as early afternoon, often makes a noticeable difference to sleep quality.

Frequently Asked Questions

What is the half-life of caffeine?
The half-life of caffeine is about 5 to 6 hours in a typical healthy adult, meaning half of the caffeine you consumed is eliminated in that time. After 5 hours, a 200mg dose drops to 100mg; after 10 hours, to 50mg. Individual half-life varies with genetics, age, pregnancy, smoking and medications.
Can I sleep if I drink coffee at 4pm?
It depends on the dose and your metabolism. A 95mg coffee at 4pm leaves about 36mg in your system by 11pm with a 5-hour half-life. Since as little as 25mg at bedtime can affect deep sleep, an afternoon coffee can reduce sleep quality even if you fall asleep normally. Use the calculator to check your specific timing.
How long does caffeine stay in your system?
Caffeine takes roughly 10 to 12 hours to clear almost completely from your system, though noticeable amounts can remain for longer. With a 5-hour half-life, about 97 percent is gone after 25 hours. The practical concern is how much remains at bedtime, since even small amounts affect deep sleep.
When should I stop drinking coffee to sleep well?
A common rule of thumb is to stop caffeine 8 to 10 hours before bed. The calculator gives you a personalised last safe time by working backwards from your bedtime to the point where caffeine would drop below the 25mg sleep threshold.
What slows down caffeine metabolism?
Pregnancy, oral contraceptives, some medications, liver conditions and older age slow caffeine metabolism, lengthening its half-life. Smoking speeds it up, roughly halving the half-life. The calculator lets you adjust for sensitivity to reflect a faster or slower personal metabolism.