Skip to main content

Sleep, daily intake & half-life

Caffeine Calculator: Half-Life, Sleep Cutoff & Safe Daily Limit

Track caffeine on board across the day, get a personalized safe daily limit by body weight and age, find the latest safe time for one more cup before bed, and size a pre-workout dose. Half-life adjusts for pregnancy, contraceptives, and smoking. Educational estimates only.

By Jeff Beem

Updated

01

What you've had today

Drink presets use USDA averages and manufacturer labels. Edit the mg field to match your brand or pour size, or pick Custom to type your own.

02

You

EFSA's safe range is 3-6 mg/kg/day. The personal limit on the right uses the 5 mg/kg midpoint, capped at 400 mg.

Adults 50-64 use a 10% reduction; 65+ uses 25% for slower CYP1A2 clearance. Tool is not designed for minors.

Average CYP1A2 activity. Half-life ~5 h.

03

Sleep & sensitivity

After-midnight bedtimes are handled. The cutoff math finds the latest time you can drink before bed.

Common heuristic: below this, EEG disruption is small.

Using state preset: 5.0 h

If a late drink keeps you wired and the calculator says it shouldn't, your half-life is probably longer than the preset.

The latest-safe time below assumes you drink this much extra (95 mg = 8 oz brewed coffee).

04

Pre-workout (optional)

Results Β· live as you sip

Caffeine on board now Β· 12:00 PM

137 mg

Total today: 190 mg Β· 49% of personal limit (Under)

Predicted at bedtime

32 mg

Threshold: 50 mg at 10:30 PM

Latest safe last cup

Already too late

For 95 mg, half-life 5.0 h.

Drops below 25 mg

12:18 AM

From now on; "negligible" by most policies.

Personal daily limit

386 mg

5 mg/kg Γ— age factor 1

Check

mg(t) = Ξ£ Di Γ— 0.5(t βˆ’ ti) / 5.0h

At now (12:00 PM), 2 doses sum to 137 mg.

05

Caffeine across the day

Total caffeine on board between 6:00 AM and 12:00 AM. Each drink is marked at its consumption time. The dashed red line is your at-bedtime threshold; the dashed black line is the current time.

Loading chart...

Caffeine primer

Reading the results panel

A short read on what each output means and where the model has soft edges.

01

Overview

What this calculator does

The tool tracks every drink you've added today, decays each one with a first-order half-life, and sums what's left at any time you ask about. The headline is caffeine on board now. The tile grid covers the four questions people actually want answered: predicted level at bedtime, the latest safe time for one more cup, when caffeine drops below the 25 mg "negligible" line, and your personal daily safe limit.

Inputs feed one model. Change body weight and the daily limit shifts. Change the half-life and the curve in the chart relaxes or steepens. The output is an estimate, not a clinical reading; for medication interactions or arrhythmia risk, ask your doctor.

02

Formula

Half-life decay, multiple doses

Each dose decays by half every tΒ½ hours:

remaining(t) = D Γ— 0.5(t βˆ’ ti) / tΒ½

Multi-dose total is the sum across drinks (linear pharmacokinetics, valid at dietary doses below CYP1A2 saturation):

total(t) = Ξ£ Di Γ— 0.5(t βˆ’ ti) / tΒ½

The verification line at the bottom of the dark panel restates this with your actual numbers, so you can match it against a spreadsheet or hand calculation.

03

Half-life states

Why the same coffee can be a 3-hour or an 11-hour drink

Caffeine half-life varies by a factor of three to four across healthy adults, and almost an order of magnitude once pregnancy enters the picture. The tool ships with six state presets that drive a sensible default; flip on the custom half-life if you want to dial it in to your real-world response.

  • Healthy adult: ~5 h. The number every cookie-cutter calculator assumes by default.
  • Heavy smoker: ~3 h. Smoking induces CYP1A2, so caffeine clears faster (and the buzz fades faster too).
  • Hormonal contraceptive or SSRI: ~7 h. Estrogens and several SSRIs slow CYP1A2; one cup hits like 1.5 cups would otherwise.
  • Pregnancy 3rd trimester: ~11.5 h. Late pregnancy nearly doubles the half-life, which is why the ACOG limit drops to 200 mg/day.
04

Sleep cutoff

Working backward from bedtime

The classic question is "when should I stop drinking coffee for sleep?" The tool answers it by back-solving. Given everything you've already had, project the level at bedtime, find the headroom under your threshold, then compute how late you could add one more drink and still land under it. Closed form:

t* = bedtime βˆ’ tΒ½ Γ— log2(Dnext / headroom)

The threshold dropdown lets you pick how strict to be. Sleep researchers like Walker and Drake target zero. The conventional 50 mg line is where EEG sleep architecture begins to change measurably. If your sleep already feels off, drop to 25 mg or strict zero and watch the cutoff time march earlier.

05

Pre-workout

3-6 mg/kg, 45-60 min before

Caffeine is the most-studied legal ergogenic in sport. The ISSN position stand and EFSA's safety opinion converge on a 3-6 mg/kg single dose taken 45-60 min before exercise as the well-evidenced range for endurance and high-intensity work. Toggle the pre-workout block to see a personalized dose and recommended take-time.

Two warnings the calculator can't print. First, the dose still counts toward your daily limit and your sleep cutoff. Late-afternoon training plus a 200 mg pre-workout is the most common reason coffee drinkers can't fall asleep at night. Second, 6 mg/kg is a ceiling, not a target; taller doses raise jitter and arrhythmia risk without extra performance.

06

Limits

What this tool can't do

Linear pharmacokinetics break down at very high doses (CYP1A2 saturates above ~600 mg in a single sitting), and the tool doesn't model that. It also can't predict interactions with prescription drugs, arrhythmia history, anxiety disorders, or caffeine sensitivity at the genetic CYP1A2*1F level. Outputs are educational estimates, not medical advice.

Pregnancy guidance is the firmest part. The 200 mg/day cap is not negotiable in clinical guidance, regardless of body weight, and high consumption is linked to miscarriage and low birth weight in observational data. If you're pregnant or breastfeeding, talk to your obstetrician before changing intake based on this calculator.

Two morning coffees, one bedtime

The default load is 95 mg at 8 a.m. and another 95 mg at 11 a.m. With a 5 h half-life and a 50 mg bedtime target, you can watch how much is still on board at 10:30 p.m. and what time the tool says one more 95 mg cup would break your line. Weight sets the daily cap; state sets half-life; bedtime sets the cutoff.

Four things worth knowing

Log the small pours

Decaf is about 2 mg per cup; yerba mate and cold brew are not. Missing afternoon tea makes the curve look too low and makes β€œlatest safe cup” too late.

Half-life is personal

If 3 p.m. coffee still feels wired at 11 p.m., try 7 h or a custom value until predicted-at-bedtime matches experience. Smokers often clear faster; pregnancy and some contraceptives slower.

Latest-safe time is for one hypothetical cup

The cutoff uses the mg you type for β€œone more cup” (default 95 mg brewed). A double espresso after that time blows the threshold even if the clock looked fine.

Pre-workout belongs in the drink list

Add the workout dose as a drink row if you want bedtime math to include it. The pre-workout panel alone does not always feed the decay sum unless you enter it.

Caffeine calculator: half-life, sleep cutoff, and daily limit

Two 95 mg coffees by late morning, 5 h half-life, 50 mg at-bed target: see what is left at 10:30 p.m. and when one more cup is too late. Educational only; not medical advice.

What this calculator does

You list timed drinks (mg and clock time), body weight, age, and a metabolism state. It sums exponential decay for caffeine on board now, projects level at bedtime against a threshold you pick, back-solves the latest time for one more cup of a size you specify, and computes a personal daily mg cap. A chart plots the day; an optional pre-workout block sizes 3–6 mg/kg.
  • Outputs:
    Mg on board now; mg predicted at bedtime; latest safe time for one hypothetical cup; daily limit; optional ISSN-style pre-workout dose and suggested take-time (~50 min before workout).
  • Limits:
    Linear decay model breaks down at extreme single doses or very high daily intake. Does not model every drug interaction, arrhythmia, or anxiety. Drink presets are typical USDA/manufacturer values. If a clinician capped your caffeine, follow that. Runs in the browser only.

The math

Each dose decays by half every t1/2t_{1/2}. Total at time t is the sum of contributions:
  • Decay:
    remaining(t)=Dβ‹…0.5(tβˆ’ti)/t1/2\text{remaining}(t) = D \cdot 0.5^{(t - t_i) / t_{1/2}} and C(t)=βˆ‘iDiβ‹…0.5(tβˆ’ti)/t1/2C(t) = \sum_i D_i \cdot 0.5^{(t - t_i) / t_{1/2}}
  • Daily limit:
    weight (kg) Γ— 5 mg/kg, Γ—0.9 if age 50–64, Γ—0.75 if 65+, hard cap 400 mg (FDA) or 200 mg in pregnancy presets (ACOG).
  • Sleep cutoff:
    Latest minute for a hypothetical dose DnextD_{next} before bedtime: tβˆ—=bedtimeβˆ’t1/2β‹…log⁑2(DnextCβˆ—βˆ’C(bedtime))t^{*} = \text{bedtime} - t_{1/2} \cdot \log_2 \left( \dfrac{D_{next}}{C^{*} - C(\text{bedtime})} \right)
  • Worked example:
    200 mg at 8:00 and 95 mg at 11:00, t1/2=5t_{1/2}=5 h, bedtime 22:00, threshold 50 mg: existing at bed β‰ˆ 200β‹…0.514/5+95β‹…0.511/5β‰ˆ49.5200 \cdot 0.5^{14/5} + 95 \cdot 0.5^{11/5} \approx 49.5 mg. Headroom for another 95 mg cup is essentially zero; the tool will say no safe late cup unless you relax the threshold.
  • Pre-workout:
    Dose (mg) = weight (kg) Γ— 3, 4.5, or 6. UI suggests intake about 50 minutes before workout time.
  • Half-life presets:
    Heavy smoker ~3 h; healthy adult ~5 h; contraceptive/SSRI ~7 h; pregnancy ~7 / ~9 / ~11.5 h by trimester. Custom override available.

Using the calculator

Match the state preset to how fast you clear caffeine, then tune half-life if afternoons still feel wrong. Use strict 0 mg at bed if you want planning aligned with sleep studies; 50 mg is the default heuristic.
  • Drinks:
    Edit mg per preset. Cold brew, energy cans, and matcha differ a lot from averages.
  • Hidden caffeine:
    Chocolate, some pain relievers, and β€œdecaf” (not zero) are not auto-added; enter them if they matter.
  • Pregnancy:
    Switch to a pregnancy trimester for 200 mg cap and longer t1/2t_{1/2}. See the pregnancy timeline calculator if useful.
  • Privacy:
    All math stays on your device.

Caffeine Calculator FAQ

How long does caffeine stay in your system?

Half-life is about 5 hours for many healthy adults (often quoted range 3–7 hours). After one half-life, half the dose remains; after two, a quarter. A 200 mg coffee at 8 a.m. is roughly 100 mg at 1 p.m., 50 mg at 6 p.m., and 25 mg by 11 p.m. The tool sums decay from every drink you list.

How much caffeine is safe per day?

EFSA and FDA cite about 400 mg/day for healthy adults, roughly 5.7 mg/kg. This calculator uses 5 mg/kg as a midpoint, then multiplies by 0.9 for ages 50–64 and 0.75 for 65+, capped at 400 mg. Pregnancy presets lock the cap at 200 mg/day (ACOG), regardless of weight.

When should I stop drinking coffee to sleep well?

β€œ8–10 hours before bed” is a rough rule. Here you set bedtime, half-life, and a caffeine-at-bed threshold; the tool back-solves the latest time for one more cup of the size you specify. Drake et al. (2013) still found 400 mg at 6 hours before bed cut sleep by over an hour, so strict thresholds are not overcautious.

How much caffeine is safe during pregnancy?

ACOG stays under 200 mg/day. Pregnancy presets use that hard cap and longer half-lives (about 7, 9, and 11.5 hours by trimester) because CYP1A2 slows. A morning coffee can linger much longer than cup-counting suggests.

How much caffeine before a workout?

ISSN guidance is about 3–6 mg/kg, often 60 minutes pre-exercise. A 75 kg adult is 225–450 mg. The pre-workout block uses 3, 4.5, or 6 mg/kg and suggests take-time about 50 minutes before start. That dose still counts toward daily total and bedtime level.

Why does half-life change with pregnancy or birth control?

Caffeine is cleared mainly by liver enzyme CYP1A2. Estrogens (pregnancy, hormonal contraceptives) and some SSRIs slow it; smoking speeds it up. Pick a state preset or type your own half-life if 5 hours does not match how late coffee keeps you up.

Is the 50 mg sleep threshold too high?

50 mg is a common engineering line where EEG sleep changes become inconsistent. Strict mode uses 0 mg; low 25 mg; relaxed 100 mg. Tolerant drinkers may feel fine at bedtime and still lose slow-wave sleep; pick the threshold that matches how you want to plan.

Are drink caffeine values exact?

Presets are typical, not lab measurements. Brewed coffee often spans 80–200 mg per 8 oz depending on bean and brew. Edit the mg field per brand or use Custom. The model is only as good as the doses you enter.

Sources & citations

References used for the calculation method and definitions. Links open in a new tab when available.

[1]
EFSA Scientific Opinion on the Safety of Caffeine (Panel on Dietetic Products, Nutrition and Allergies, 2015)

Source for the daily-intake math: single doses up to 3 mg/kg and habitual intake up to 5.7 mg/kg per day (about 400 mg) do not raise safety concerns for healthy adults; pregnant women up to 200 mg/day. The calculator uses the 5 mg/kg midpoint of the 3-6 mg/kg/day range as its baseline.

[2]
FDA: Spilling the Beans, How Much Caffeine Is Too Much

United States Food and Drug Administration consumer guidance fixing 400 mg/day as a generally safe ceiling for healthy adults; the calculator uses this value as the absolute hard cap on the personal daily limit.

[3]
ACOG Committee Opinion No. 462: Moderate Caffeine Consumption During Pregnancy (American College of Obstetricians and Gynecologists, 2010, reaffirmed 2020)

Defines the 200 mg/day pregnancy cap that overrides body-weight math when the user selects a pregnancy state preset.

[4]
Drake C, Roehrs T, Shambroom J, Roth T. Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed (J Clin Sleep Med, 2013)

Randomized trial showing 400 mg of caffeine reduces objectively measured sleep by more than an hour even when taken 6 hours before bed; supports the 6-hour minimum cutoff and the 50 mg at-bedtime EEG-impact heuristic used in the sleep threshold.

[5]
Guest NS et al. International Society of Sports Nutrition Position Stand: Caffeine and Exercise Performance (J Int Soc Sports Nutr, 2021)

Source for the pre-workout dose: caffeine improves performance at 3-6 mg/kg body mass; doses at or above 9 mg/kg add side effects without extra benefit. Most studies use 60 minutes pre-exercise.

[6]
USDA FoodData Central, Caffeine Concentrations in Common Beverages

United States Department of Agriculture reference database for the typical caffeine values used in the drink presets (brewed coffee, espresso, brewed tea, soda).

Fitness Reference Note

Informational Use: These calculations (BMI, Calories, etc.) are based on standard statistical formulas and are intended for general reference and goal-setting purposes only.

Consult Experts: This tool does not provide medical advice, diagnosis, or treatment. Results may not be accurate for athletes, pregnant individuals, or those with underlying health conditions.

Health Safety: Always consult with a healthcare professional or qualified trainer before beginning any new diet or intensive exercise program.

Privacy First: All calculations are performed locally in your browser. No health data is stored or transmitted to any server.

Β© 2026 CalcRegistry Reference Last Logic Update: July 2026Free Online Utility Tools