Skip to main content
SparkCalc

Caffeine Calculator

Example: Two coffees and a cola leave about 49 mg in you at 10:30 pm

That 3 pm coffee is still working at midnight. Add the drinks from your day to see how much caffeine is left in your body hour by hour, how much of it you take to bed, and the latest time another cup will not cost you sleep.
Last reviewed by SparkCalc editorial team · October 2026
Runs in your browser No signup

Drink 1

servings

Drink 2

servings

Drink 3

servings

Drink 4

You

Calculation results updated

Caffeine in your body through the day and night

Where your bedtime level lands

Each drink: what you had vs what is left at bedtime

Caffeine at Bedtime

Effect on Sleep

Last Call for Coffee

Total Caffeine Today

Drops Under 30 mg

Left in the Morning

Share Link:
Did this answer your question?

Related Calculators

You might also find these calculators helpful: best time to go to bed, how much sleep you owe, Hydration Lifetime Calculator, and how many times your heart has beaten.

How to use this calculator

  1. For each drink, pick what you had (or "My own amount" with the milligrams from the label), the time and how many servings.
  2. Set drinks you did not have to "No drink".
  3. Choose your usual bedtime.
  4. Pick how fast you clear caffeine. Leave it on typical unless you smoke, take the combined pill or are pregnant, or you know your own half-life.
  5. Read how much caffeine you take to bed, where that sits against the sleep marker, and the latest time for another coffee.

How We Calculate This

Each drink is treated as fully absorbed and then cleared by first-order elimination: amount left = dose × 0.5^(hours since drinking ÷ half-life). Oral caffeine is almost 100% absorbed and peaks in the blood about 30 to 50 minutes after drinking (Blanchard and Sawers, 1983; Abernethy and Todd, 1985), so counting each drink from the moment you have it slightly overstates the first half hour and changes later readings very little. Doses add together. Half-life presets come from published pharmacokinetic studies: 5 hours for a typical adult (individual values 2.7 to 9.9 hours, Blanchard and Sawers), 3.5 hours for smokers (Parsons and Neims, 1978), 8 hours on the low-dose combined pill (7.9 hours, Abernethy and Todd; older higher-dose pills measured 10.7 hours, Patwardhan, 1980), and 8.3 hours averaged across pregnancy with a range up to 16 hours (Knutti, 1981). The 30 mg bedtime marker is derived from Gardiner et al. (2023): their latest safe times for a 107 mg coffee (8.8 hours before bed) and a 217.5 mg pre-workout (13.2 hours) both leave about 30 to 35 mg at bedtime with a 5 hour half-life. It is a rough guide, not a clinical threshold. The 100 mg band follows EFSA (2015), which found single doses of 100 mg near bedtime can affect sleep in some adults. Drink amounts use USDA FoodData Central values per 100 g scaled to the serving size; energy drinks use common can amounts inside the FDA ranges (54 to 328 mg per 16 fl oz). Daily references: FDA 400 mg for most adults, ACOG under 200 mg in pregnancy.

Methodology last reviewed: October 2026. How SparkCalc works

Sources: FDA: Spilling the Beans: How Much Caffeine is Too Much? (400 mg a day, drink ranges) · Gardiner C et al. (2023). The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews 69:101764 · Drake C et al. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine 9(11):1195-1200 · EFSA Panel on Dietetic Products (2015). Scientific Opinion on the safety of caffeine. EFSA Journal 13(5):4102 · Blanchard J, Sawers SJ (1983). The absolute bioavailability of caffeine in man. European Journal of Clinical Pharmacology 24(1):93-98 · Parsons WD, Neims AH (1978). Effect of smoking on caffeine clearance. Clinical Pharmacology and Therapeutics 24(1):40-45 · Abernethy DR, Todd EL (1985). Impairment of caffeine clearance by chronic use of low-dose oestrogen-containing oral contraceptives. European Journal of Clinical Pharmacology 28(4):425-428 · Patwardhan RV et al. (1980). Impaired elimination of caffeine by oral contraceptive steroids. Journal of Laboratory and Clinical Medicine 95(4):603-608 · Knutti R, Rothweiler H, Schlatter C (1981). Effect of pregnancy on the pharmacokinetics of caffeine. European Journal of Clinical Pharmacology 21(2):121-126 · ACOG Committee Opinion 462: Moderate Caffeine Consumption During Pregnancy (under 200 mg a day) · USDA FoodData Central (SR Legacy): caffeine in coffee, espresso, tea, cola and dark chocolate · 21 CFR 340.50: Labeling of OTC stimulant drug products (100 to 200 mg caffeine dose)

Why the afternoon cup matters more than the morning ones

With a 5 hour half-life, a morning coffee has had three half-lives to fade by bedtime and an afternoon coffee only one or two. In the default day here, the 7:30 am coffee contributes about 12 mg at 10:30 pm, while the 4 pm cola, with a third of the caffeine, still adds 13 mg and the 12:30 pm coffee adds 24 mg. Moving one drink earlier usually does more for your sleep than cutting a morning cup.

Feeling sleepy does not mean the caffeine is gone

Caffeine blocks adenosine, the chemical that builds sleep pressure through the day. Many people fall asleep with plenty of caffeine on board, yet sleep studies still find less deep sleep and more waking during the night. In the Drake study, people given caffeine 6 hours before bed lost more than an hour of sleep on the monitor, while their own sleep diaries showed a smaller loss that did not reach significance.

When the same coffee lasts twice as long

Half-life is the setting that changes the answer most. A 95 mg coffee at 2 pm leaves about 29 mg at 10:30 pm for a typical adult, 18 mg for a smoker, 45 mg on the combined pill and 64 mg in late pregnancy. If caffeine keeps you up even when you stop early, try a slower preset to see how far back your cut-off moves.

How much of one 8 oz coffee (95 mg) is left

Caffeine remaining after one brewed coffee, by half-life.

How much of one 8 oz coffee (95 mg) is left
Time since drinkingSmoker (3.5 h)Typical adult (5 h)Combined pill (8 h)Late pregnancy (15 h)
2 hours64 mg72 mg80 mg87 mg
4 hours43 mg55 mg67 mg79 mg
6 hours29 mg41 mg56 mg72 mg
8 hours19 mg31 mg48 mg66 mg
10 hours13 mg24 mg40 mg60 mg
12 hours9 mg18 mg34 mg55 mg
16 hours4 mg10 mg24 mg45 mg
24 hours1 mg3 mg12 mg31 mg

First-order elimination with each drink fully absorbed. Real levels vary from person to person.

Caffeine in common drinks

Caffeine in common drinks
DrinkCaffeine
Brewed coffee, 8 fl oz / 240 mL95 mg
Brewed coffee, 16 fl oz / 475 mL190 mg
Espresso, 1 shot (1 fl oz)64 mg
Instant coffee, 8 fl oz62 mg
Decaf coffee, 8 fl oz2 mg
Black tea, 8 fl oz47 mg
Green tea, 8 fl oz28 mg
Cola, 12 fl oz can33 mg
Energy drink, 8.4 fl oz / 250 mL can80 mg
Energy drink, 16 fl oz can160 mg
Pre-workout, 1 scoop218 mg
Caffeine tablet, 200 mg200 mg
Dark chocolate 70-85%, 1 oz / 28 g22 mg

USDA FoodData Central values for coffee, tea, cola and chocolate. Brands and café brews vary widely, so check the label when you can.

Key terms

Half-life
The time your body takes to clear half of the caffeine in it. About 5 hours for a typical adult, but anywhere from about 2 to 10 hours.
First-order elimination
Clearing a fixed fraction per hour rather than a fixed amount, so the level falls fast at first and then trails off for many hours.
CYP1A2
The liver enzyme that breaks down most caffeine. Smoking speeds it up; the combined pill, pregnancy and some medicines slow it down.
Sleep marker (30 mg)
A rough bedtime level derived from the 2023 Gardiner meta-analysis cut-off times. Less caffeine than that at bedtime is unlikely to shorten sleep for most people.

Frequently Asked Questions

How long does caffeine stay in your system?

For a typical healthy adult, half of the caffeine is gone after about 5 hours, but measured half-lives run from under 3 to almost 10 hours. After five half-lives (about a day for most people) less than 4% is left. An 8 oz coffee (95 mg) drunk at 8 am still leaves about 18 mg at 8 pm, and a 3 pm coffee leaves about 36 mg at 10 pm.

What time should I stop drinking coffee before bed?

A 2023 meta-analysis of 24 studies (Gardiner and colleagues) found that a 107 mg coffee should be drunk at least 8.8 hours before bed, and a 217.5 mg pre-workout serve at least 13.2 hours before, to avoid losing sleep. An earlier home sleep study (Drake, 2013) found that 400 mg taken even 6 hours before bed cut sleep by more than an hour. For a 10:30 pm bedtime, that puts the last regular coffee around 1:30 to 2 pm.

How much caffeine is too much in a day?

The FDA cites 400 mg a day, about four 8 oz cups of brewed coffee, as an amount not generally linked to harmful effects in healthy adults. The European Food Safety Authority also considers single doses up to 200 mg safe for adults. ACOG advises staying under 200 mg a day during pregnancy. Sensitivity varies, and some medicines and health conditions call for less.

Why does caffeine last longer in some people?

Caffeine is cleared by a liver enzyme (CYP1A2) whose activity varies widely. Smoking speeds it up: smokers cleared caffeine with a 3.5 hour half-life against 6 hours for non-smokers. The combined contraceptive pill slows it to roughly 8 to 11 hours, and pregnancy slows it further, averaging 8.3 hours and reaching 16 hours in some women. Liver disease and some medicines also slow clearance.

How much caffeine is in a cup of coffee?

USDA data put an 8 oz (240 mL) cup of brewed coffee at about 95 mg, an espresso shot at about 64 mg, black tea at 47 mg and a 12 oz cola at about 33 mg. Coffee-shop brews vary a lot: the FDA reports 113 to 247 mg in 12 oz of brewed coffee, so a large café coffee can carry well over 200 mg. Use "My own amount" with the figure from the label or menu when you know it.

Embed this calculator

Add this free calculator to your own website. Copy the code below and paste it into your page’s HTML. It is responsive and resizes to fit.

This calculator provides estimates for educational purposes only. Caffeine content varies by brand and preparation, and the rate your body clears caffeine varies with genetics, medicines, pregnancy, liver health and other factors. It is not medical advice. Consult a healthcare professional about caffeine if you are pregnant or breastfeeding, have a heart condition, anxiety or a sleep disorder, or take prescription medicines.

References