Caffeine Curve

Sleep science · free tool

When can you sleep after coffee?

Caffeine outlasts the cup. Enter what you drank and when you want to sleep, and see the caffeine still in your bloodstream hour by hour — plus the time it finally drops below the line.

1 What did you drink?
mg

One 8 oz cup of drip coffee.

2 When did you drink it?

The time you finished the cup. Times before now are assumed to be today or last night.

3 Your caffeine sensitivity

The typical adult clears half of a dose in about 5 hours.

4 Target bedtime

The time you actually want to be asleep — not the time you get into bed.

Everything is calculated in your browser. Nothing is uploaded.

Loading your caffeine curve…

Safe bedtime

—

Caffeine down to 50 mg

—

At bedtime

—

Still in your system

—

Cutoff time

—

Last drink for a 50 mg bedtime

—

Caffeine left in your body

 

— Local time

How the estimate works

Your body clears caffeine exponentially, not in a straight line. Each half-life removes half of whatever is left, so the curve falls fast at first and then flattens. This calculator applies that curve to your dose from the minute you finished the drink, then marks where it crosses the two lines that matter for sleep: 50 mg and 25 mg.

C(t) = C₀ × 0.5t / t½ C₀ = your dose · t = hours since drinking · t½ = your half-life

Half-life is personal. Fast metabolizers clear caffeine in about 3.5 hours, the average adult takes roughly 5 hours, and sensitive sleepers can take 7 hours or more. Genetics, pregnancy, oral contraceptives, some medications and liver health all shift it — which is why the result is an estimate, not a measurement.

DrinkTypical caffeine
Espresso (1 shot, 1 oz)63 mg
Drip coffee (8 oz)95 mg
Cold brew (12 oz)200 mg
Energy drink (16 oz)160 mg
Red Bull (8.4 oz)80 mg
Matcha (1 tsp powder)70 mg
Black tea (8 oz)47 mg
Decaf coffee (8 oz)2–15 mg

Amounts are typical values from USDA FoodData Central and manufacturer labels. Actual caffeine varies with beans, brewing strength and serving size. The FDA considers up to 400 mg a day safe for most healthy adults.

Questions people ask

How long does caffeine stay in your body?

Caffeine has a half-life of roughly 3 to 7 hours in most adults, with an average near 5 hours. Half of what you drink is gone in about 5 hours, and roughly 97% is cleared after five half-lives — around 25 hours. Effects on sleep can show up long before the caffeine is fully gone.

How much caffeine is safe before bed?

There is no official bedtime limit, but a practical target is under 50 mg of caffeine at lights-out, or under 25 mg if you are sensitive. In one clinical trial, 400 mg taken 6 hours before bed cut total sleep by more than an hour, even when participants did not notice the difference.

Does a 5-hour half-life mean I am fine after 5 hours?

No — after 5 hours half is left, not none. A 95 mg cup still leaves about 48 mg at the 5-hour mark, which is close to a full espresso for someone who is sensitive.

Is decaf a safe swap in the evening?

Usually, yes. Decaf coffee typically contains 2–15 mg of caffeine per 8 oz cup, far below the 50 mg line. Check labels on decaf espresso and decaf cold brew, which can run higher.

Why does caffeine affect me more than other people?

Clearance depends largely on genetics (the CYP1A2 enzyme), plus pregnancy, some medications, oral contraceptives, smoking and liver health. That is why this calculator offers a 3.5-hour, 5-hour and 7-hour half-life instead of a single number.