Cup of coffee next to an alarm clock in the evening — caffeine and sleep calculator

Caffeine Sleep Calculator: When to Stop Caffeine

That 4 p.m. coffee feels harmless. You drink it, you feel alert, and by bedtime you assume it has worn off. But caffeine does not work like that. It stays in your system for hours, quietly blocking the sleep signals your brain needs to wind down — even when you no longer feel wired.

A caffeine sleep calculator answers one simple question: what time should you stop drinking caffeine so it does not steal your sleep? The rule of thumb is straightforward — stop at least 6 hours before bed — but your exact cutoff depends on your bedtime, your drink, and how sensitive you are. This guide gives you the cutoff, the science behind it, and a quick calculator to find your personal time.

Caffeine Half-Life Calculator: How It Works

Caffeine has a half-life of about 5–6 hours in most adults: after that time, half of it is still in your system. So a coffee with 200 mg of caffeine at 4 PM still leaves about 100 mg in your body at 9–10 PM — enough to make falling asleep harder and to lighten deep sleep. This calculator applies that half-life to the drinks you enter, so you can see how much caffeine is left at your bedtime and decide when your last coffee should be.

How Caffeine Affects Your Sleep

Caffeine works by blocking adenosine, the chemical that builds up in your brain all day and creates sleep pressure. When caffeine occupies those receptors, your brain cannot feel how tired it really is. You feel awake, but the tiredness is still there, waiting underneath.

The key number is caffeine’s half-life: roughly 5 to 6 hours for most healthy adults. That means if you drink 200 mg of caffeine at 4 p.m., about 100 mg is still circulating at 10 p.m. And caffeine has a long tail — a quarter of it can still be present 10 to 12 hours later. Research consistently links late-day caffeine with longer time to fall asleep, lighter sleep, and less deep sleep, even in people who say caffeine “does not affect” them.

This is why a cutoff time matters more than a total daily amount. You can stay under the commonly cited 400 mg daily limit for adults and still sleep badly if most of it lands late in the day.

Find Your Caffeine Cutoff Time

Use this quick calculator. Enter your usual bedtime and it gives you a caffeine cutoff 6 hours earlier — the minimum gap most sleep researchers recommend. If you are sensitive to caffeine, shift it another hour or two earlier.

Your bedtime:

Once you know your cutoff, the next step is knowing what counts. A single large coffee can hold more caffeine than two cups of tea, and energy drinks vary widely by brand.

How Much Caffeine Is in Your Drink?

Drink (typical serving)Caffeine
Brewed coffee (240 ml / 8 oz)~95 mg
Espresso, single shot (30 ml)~63 mg
Black tea (240 ml)~47 mg
Green tea (240 ml)~28 mg
Cola (355 ml can)~34 mg
Energy drink (250 ml)~80 mg
Dark chocolate (28 g)~20 mg

These are averages — brewing method, bean, and brand all shift the number. A large café coffee can easily pass 200 mg, which is half the commonly cited daily limit in a single cup.

Caffeine Cutoff Chart by Bedtime

If you prefer a quick lookup instead of the calculator, here is the 6-hour rule applied to common bedtimes:

Your bedtimeStop caffeine by
9:00 p.m.3:00 p.m.
10:00 p.m.4:00 p.m.
11:00 p.m.5:00 p.m.
12:00 a.m.6:00 p.m.
1:00 a.m.7:00 p.m.

Night-shift workers should apply the same rule in reverse: stop caffeine at least 6 hours before your daytime sleep window. Our shift work sleep schedule guide shows how to plan the full routine around it.

5 Rules for Caffeine and Better Sleep

1. Front-load your caffeine

Have most of your caffeine in the morning, when it supports alertness without colliding with bedtime. A second cup before noon is far less costly than one at 4 p.m.

2. Treat the cutoff as a hard stop, not a suggestion

Half a coffee after your cutoff still counts. If you want something warm in the afternoon, switch to herbal tea or decaf — decaf still contains a few milligrams, but far less than regular.

3. Watch the hidden sources

Chocolate, some pain relievers, pre-workout powders, and even certain teas add caffeine you may not be counting. An evening dessert or a late workout supplement can quietly push you past your cutoff.

4. Know your own sensitivity

Genetics, smoking, pregnancy, and some medications change how fast you clear caffeine. If you regularly lie awake after an afternoon coffee, your personal cutoff is earlier than 6 hours — try 8 to 10 hours and see if your sleep improves.

5. Pair the cutoff with a real bedtime

A cutoff only helps if bedtime is consistent. Use a sleep calculator to pick a bedtime built on 90-minute sleep cycles, then count your caffeine cutoff back from it. For more ways to fall asleep faster once caffeine is out of the way, see our guide on how to fall asleep fast.

Frequently Asked Questions

What is a caffeine sleep calculator?

A caffeine sleep calculator finds the latest time you can drink caffeine without it harming your sleep. It subtracts caffeine's effective window — about 6 hours — from your bedtime to give you a personal cutoff time.

What is the caffeine cutoff time for a 10 p.m. bedtime?

For a 10 p.m. bedtime, stop caffeine by 4 p.m. That 6-hour gap lets roughly half the caffeine clear before you try to sleep. Sensitive sleepers often do better stopping by 2 p.m.

How long does caffeine stay in your system?

Caffeine's half-life is about 5 to 6 hours, so half of a dose remains after that time. Smaller amounts can linger for 10 to 12 hours, which is why even morning coffee is fully cleared only by late evening.

Does caffeine affect deep sleep even if I fall asleep fine?

Yes. Studies show caffeine can reduce deep sleep and increase nighttime awakenings even in people who fall asleep quickly. Feeling tired the next day after late caffeine is a common sign.

Is decaf coffee safe before bed?

Decaf is much lower in caffeine — usually 2 to 5 mg per cup versus about 95 mg in regular coffee — so it rarely disrupts sleep. If you are highly sensitive, keep decaf earlier in the evening too.

What is the half-life of caffeine?

About 5–6 hours for most adults, though it ranges from roughly 4 to 7 hours depending on age, genetics, medication and pregnancy. After one half-life, half the caffeine remains in your system.

This article is for general information only and is not medical advice.

Last reviewed: November 23, 2026

Similar Posts

5 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *