Skip to main content
Calcimator

Caffeine Half-Life Calculator

Calculate how much caffeine remains in your system at bedtime and when to stop drinking coffee.

About this calculator

This is exponential decay with a personal half-life. The gap between your cup and your pillow is measured in hours, wrapping past midnight where needed, and the dose is halved once for every half-life inside that gap. The metabolism selector supplies the half-life outright — seven hours if you describe yourself as sensitive, five for typical, three if caffeine barely touches you — and because it sits in the exponent rather than alongside it, that dropdown moves the bedtime figure further than anything else on the page. Two hundred milligrams taken at two in the afternoon before an eleven o'clock bedtime leaves about 57 mg on the normal setting, 82 mg on the sensitive one and only 25 mg on the fast one, the difference between a night flagged as disrupted and one that is not.

That flag is a single fixed cutoff of 40 mg; there is no gradual scale and no body-weight adjustment. The latest safe time works the same relationship backwards, solving for how many half-lives are needed to bring your dose down to that 40 mg line and stepping that many hours back from bedtime. One consequence catches people out: a dose already at or under 40 mg needs no decay time, so the hours-to-safe figure collapses to zero and the latest safe time is simply reported as your bedtime. Tolerance, pregnancy, medication that slows clearance, and the stimulating effect of caffeine taken hours earlier are all outside the model.

Inputs

mg

Results

Caffeine at Bedtime

57 mg

Sleep Disruption RiskYes — Above threshold
Latest Safe Coffee Time11:23
Your Caffeine Half-Life5 hrs
Hours to Safe Level11.6 hrs
Hours Until Bedtime9 hrs
How to Use This Calculator
  1. Enter the milligrams of caffeine in the drink you had — roughly 95 for brewed coffee, 63 for espresso, 47 for tea.
  2. Set Consumption Time to the 24-hour hour you drank it, in half-hour steps.
  3. Set Bedtime to your planned sleep hour, using values above 24 for an after-midnight bedtime.
  4. Choose the metabolism speed that describes you; it selects a 7, 5, or 3 hour half-life and drives every other result.
  5. Read Caffeine at Bedtime against the 40 mg cutoff used by the Sleep Disruption Risk row, then use Latest Safe Coffee Time as your cut-off for tomorrow.

How the result changes with Bedtime (24h)

Bedtime (24h)Caffeine at Bedtime
2176 mg
2266 mg
2450 mg
2544 mg

What each input means

Caffeine Amount
Caffeine consumed (coffee ~95mg, espresso ~63mg, tea ~47mg)
Consumption Time (24h)
Hour you consumed caffeine (24-hour)
Bedtime (24h)
Hour you plan to sleep (24-hour)
Caffeine Metabolism
How quickly your body processes caffeine

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Caffeine Amount = 200, Consumption Time (24h) = 14, Bedtime (24h) = 23, Caffeine Metabolism = 2 = 4 input(s) provided
  2. Calculate Caffeine at Bedtime
    Caffeine at Bedtime
    57 = 57
  3. Calculate Sleep Disruption Risk
    Yes — Above threshold = Yes — Above threshold
  4. Calculate Latest Safe Coffee Time
    Latest Safe Coffee Time = formatTime(safeHour
    11:23 = 11:23

Engine last updated . Checked against 3 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why does the metabolism dropdown change the answer more than the dose does?

Because it sets the exponent, not a multiplier. Halving your cup only halves the bedtime figure once, while moving from the three-hour to the seven-hour half-life more than triples what is left after a nine-hour wait — 25 mg becomes 82 mg on the default two hundred milligram dose.

What counts as enough caffeine to disrupt sleep?

A single fixed line at 40 mg remaining at bedtime. Anything above it returns the above-threshold warning and anything at or below returns the safe message, with no weighting for body mass, tolerance or sensitivity beyond the half-life you selected in the metabolism field.

Why is Hours to Safe Level zero and the latest safe time the same as my bedtime?

That happens whenever the dose you entered is already at or below the 40 mg cutoff. With nothing to decay away, no waiting period is calculated, so the page reports zero hours and hands back your bedtime unchanged rather than suggesting an earlier cut-off.

How should I enter a bedtime after midnight?

Keep counting past twenty-four, up to the limit of twenty-six. Entering 26 for a two in the morning bedtime gives a twelve-hour gap from a two in the afternoon coffee, and the displayed clock times are wrapped back into a normal twenty-four hour reading for you.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Health & Fitness.