Skip to content

Caffeine Calculator

How much caffeine is still in your body at bedtime, hour by hour.

A mug of filter coffee about 95–200 mg, an espresso about 65, a cup of tea about 45, a small energy drink about 80.
About 5 hours on average. Shorter for smokers, longer in pregnancy or with some medicines.

Caffeine left at bedtime

25 milligrams

Below 50 mg at
18:05
Caffeine today
200 milligrams

Caffeine left, hour by hour
TimeLeft (mg)
08:00200
09:00174
10:00152
11:00132
12:00115
13:00100
14:0087
15:0076
16:0066
17:0057
18:0050
19:0044
20:0038
21:0033
22:0029
23:0025

Good to know. Half of the afternoon coffee is usually still there at bedtime. Sleep notices, even when you don’t.

Not medical advice. A general estimate for healthy adults.

How it works

In plain words

Caffeine leaves the body at a steady rate: half of it every half-life, about 5 hours for most adults. After two half-lives a quarter is left, after three an eighth. A second drink adds its own amount, which halves the same way.

The formula

left = amount × 0.5^(hours since ÷ half-life)
several drinks: add each one’s amount left

Worked example

200 mg of caffeine at 08:00, with a half-life of 5 hours, is 100 mg at 13:00, 50 mg at 18:00 and 25 mg at 23:00: three half-lives later, an eighth is left at bedtime.

Sources

Sources checked October 3, 2026. 4 automated tests check its answers on every change.

About the caffeine calculator

Caffeine is absorbed within an hour and then cleared slowly by the liver. The time it takes to clear half of it, the half-life, averages about 5 hours in adults, but ranges from under two hours to more than nine. Smoking roughly halves it; pregnancy, some oral contraceptives and some medicines make it much longer.

That is why an afternoon coffee can matter at night. 200 mg at 3 p.m. is still about 75 mg at 10 p.m., as much as a small coffee. Many people fall asleep anyway, but studies find caffeine taken even six hours before bed shortens and lightens sleep. A common rule is no caffeine after early afternoon.

For healthy adults, up to about 400 mg a day, around four cups of filter coffee, is generally not linked with harm. Less is advised in pregnancy (often 200 mg a day), for teenagers and for people with heart problems, anxiety or sensitivity to it. The amount in drinks varies a lot: a large café coffee can hold more than 300 mg.

The figures here are estimates for an average adult, not medical advice. For sleep timing, use the sleep calculator.

Questions people ask

How long does caffeine stay in your body?

Its half-life is about 5 hours on average, so half is gone after 5 hours and about 90% after 16 hours. It varies a lot from person to person.

How much caffeine is too much?

For healthy adults, the US FDA puts about 400 mg a day as an amount not generally linked with harm. Less in pregnancy and for teenagers.

When should I stop drinking coffee before bed?

Often about 8–10 hours before, so most of it is gone. Some people are more sensitive and need longer.

Put this calculator on your site

Paste this where you want it. It fits the width of the page, grows with the answer and follows your readers’ dark mode. Free, with no ads inside.

<a href="https://99solved.com/caffeine" data-99solved>Caffeine Calculator</a>
<script async src="https://99solved.com/embed.js"></script>