PlanimoraPlanimora

How healthy is your coffee, actually? A measurement.

TL;DR — Coffee Score is a free interactive measurement tool that estimates how your daily caffeine affects your sleep, your longevity bonus, and your overall pattern, based on three peer-reviewed studies (Gardiner 2024 SLEEP RCT, Poole 2017 BMJ umbrella review, Liu 2022 UK Biobank cohort). You enter five inputs in thirty seconds and see a 0–100 Coffee Score, five subscores (Dose, Timing, Sleep, Load, Balance), and an actionable plan for tomorrow. Coffee is the primary source for most users — but Coffee Score also counts tea, matcha, energy drinks, decaf, and cola toward your total.

Most people think their afternoon coffee is fine. The cup at three o'clock feels routine — same as the cup at noon, same as the cup at nine. By bedtime, the alertness has faded, the room is dark, sleep arrives without fanfare. The next morning carries no memory of caffeine's interference. Whatever happened underneath the sheets stayed there.

But a randomized controlled trial published in SLEEP in 2024 measured what actually happens, and the measurement does not match the feeling. Investigators gave twenty-three healthy adults either a placebo, 100 milligrams of caffeine, or 400 milligrams of caffeine — once at twelve hours before bed, once at eight, once at four. In-home polysomnography captured every minute of sleep that followed. The 100-milligram dose, even at four hours before bed, produced no significant disruption against placebo. The 400-milligram dose was a different story.

What 400 milligrams at three in the afternoon actually does to your midnight sleep

A ceramic coffee cup tipped forward with concentric shockwave rings radiating outward; below it a small figure lying flat asleep but with eyes open, two small clock faces marking 3 and 12.
The afternoon cup, measured at midnight.

At four hours before bed, the 400-milligram dose cut perceived sleep quality by 34.02 percent. That number is specific because the trial was specific: dose isolated, timing isolated, sleep measured by sensors rather than memory. The investigators wrote that the result "supports recommendations to avoid substantial caffeine consumption for at least 6 hours pre-bedtime" — a sentence written in the cautious tone of medical guidance but anchored in numbers no editorial committee could soften.

Four hundred milligrams is roughly four filter coffees, two cold brews, or a couple of stronger drip cups. A latte, by contrast, sits closer to 75 milligrams. The trial's quiet implication is that the conversation about "afternoon coffee" has been pointed at the wrong variable for years. The question was never when. The question was how much, with when as the multiplier.

Sleep impact by dose and timing (Gardiner et al. 2024, SLEEP, N=23 healthy adults, in-home polysomnography):

Dose4h before bed8h before bed12h before bed
100 mg (≈ 1 latte or small espresso)No significant effectNo significant effectNo significant effect
400 mg (≈ 4 filter coffees or 2 cold brews)−34.02% perceived sleep qualityGreater sleep fragmentationSignificant sleep delay + architecture alteration

The table reads cleanly: at 100 mg, timing does not matter for healthy adults; at 400 mg, timing matters enormously and extends back further than most people realize.

Caffeine in common drinks (per the Coffee Score reference table, used in the tool's math):

DrinkCaffeine per typical serving
Espresso (1 oz shot)64 mg
Filter coffee (8 oz)95 mg
Latte (8 oz)75 mg
Cappuccino (6 oz)75 mg
Americano (8 oz)75 mg
Flat white (8 oz)130 mg
Cold brew (8 oz)200 mg
Mocha (8 oz)95 mg
Decaf coffee (8 oz)5 mg
Green tea (8 oz)30 mg
Matcha (8 oz)70 mg
Black tea (8 oz)47 mg
Energy drink (8 oz)80 mg
Cola (12 oz)35 mg

The three-cup sweet spot — and why the fourth cup matters less

Three full ceramic coffee cups arranged in a graceful arc with small steam wisps; a fourth ghost-grey cup sits faintly behind the third.
Three cups is where the curve plateaus. The fourth is along for the ride.

Stack that finding on top of the larger picture. The 2017 BMJ umbrella review by Poole and colleagues pooled 201 observational studies and 17 trials and found a U-shaped curve: relative risk of all-cause mortality drops to 0.83 at three cups per day versus zero, then plateaus. The fourth cup is not harmful, but it is not additive — the benefit stops climbing. A 2022 UK Biobank cohort of 171,616 participants confirmed the sweet spot, this time at 1.5 to 3.5 cups per day, with a 29 to 31 percent lower all-cause mortality even among those who added a small amount of sugar.

The two findings, taken together, draw a tight envelope: a few cups is the right amount, and the timing of those cups decides whether the benefit survives the night.

Why your CYP1A2 genotype changes the math

Population averages flatten one detail the model can't see. Caffeine's half-life — the time your body takes to clear half a dose — averages five hours in healthy adults. But the CYP1A2 enzyme that does most of the clearing varies by genotype: fast metabolizers can clear a dose in as little as two hours; ultra-slow metabolizers can take eight or more. Smoking induces faster metabolism (cuts the half-life roughly in half); pregnancy slows it down; older adults clear caffeine more slowly than younger ones. Coffee Score builds these into the model where the inputs allow, and hedges where they don't. A saliva genotype test would tighten the result; the tool can't request one, so it shows the range its assumptions allow.

How Coffee Score puts these numbers on your body

Screen 1 collects nine pieces of information across five visual rows: what you drink, how many cups, when the first and last lands, who you are, and when you sleep. The math runs in the background — total milligrams, half-life decay to bedtime, dose-response curve lookup, body-weight normalization, distribution check. Screen 2 returns a single composite Coffee Score from 0 to 100 and five subscores: Dose (where your total sits versus the sweet spot), Timing (whether your first and last cups land in the safe zone), Sleep (residual caffeine at bedtime versus the 50-milligram threshold), Load (milligrams per kilogram of body weight), and Balance (whether the cups spread sensibly or cluster).

The shape on the screen is a bezier-shaped coffee blob with five organic swellings. Each subscore stretches one swelling out from the center. Even subscores produce a balanced silhouette; uneven ones produce a recognizably lopsided splatter that the user reads as their own pattern. A character badge above the blob — Late Sipper, Morning Optimizer, Green Zone, Early Riser — names the pattern in two words.

What to actually do tomorrow

The third screen shows the dashboard and a live simulator. A user moves the cups slider from 3 to 2 — say, by dropping the third cup or switching it to decaf — and the blob morphs in real time: Sleep climbs from 43 to 79 (a 36-point gain), the residual at bedtime drops from 107 milligrams to 71, the composite Coffee Score gains 12 points (from 70 to 82). The Dose subscore eases slightly (93 → 82) because 190 mg/day sits below the 200–300 mg sweet spot, but Sleep and Load improvements offset it. Another user cuts from four cups to three and watches the Load subscore lift, the Dose stay flat, and the life-years estimated range (a hedged number, never a single figure) widen toward the upper bound the cohort literature supports.

The intent of the whole tool is one decision: change one thing tomorrow. A cup pushed earlier. A weak cup substituted for a strong one. Sleep three minutes longer, or measure it.

"The most important finding is that even modest doses of caffeine consumed several hours before bedtime can have measurable effects on sleep architecture," Gardiner and colleagues wrote in their 2024 conclusion. The measurement is there for you. The decision is yours.


Reviewed by Planimora Research · Last reviewed: May 2026 against Gardiner et al. 2024 (SLEEP), Poole et al. 2017 (BMJ), and Liu et al. 2022 (Annals of Internal Medicine) data. Updated quarterly as new peer-reviewed evidence emerges. A measurement. Not medical advice.

Common questions

Should I delay my morning coffee by 90 minutes after waking up?
The viral claim comes from a small set of studies on cortisol-caffeine interaction, where coffee on top of peak morning cortisol gave a smaller subjective alertness boost. The signal exists but is modest, and Gardiner 2024 didn't isolate it. Coffee Score treats first-cup timing under one hour as a Timing penalty — not because of cortisol, but because most people compress their daily dose by drinking right at wake. A 60-to-90-minute delay rarely hurts, but the gain is small.
Does adding sugar to my coffee cancel its health benefit?
The Liu 2022 UK Biobank cohort of 171,616 participants is the cleanest recent answer. People drinking 1.5 to 3.5 cups per day showed a 29 to 31 percent lower all-cause mortality — and the effect held for both plain coffee and lightly-sweetened coffee (about a teaspoon of sugar). Heavy sweetening was not tested as cleanly. Coffee Score treats sugar as a separate variable in the calorie/hydration block but does not penalize the score for it.
How long does caffeine actually stay in my system?
Population average half-life is about five hours, meaning half of a dose remains five hours after consumption. But CYP1A2 genetic variation shifts this between two and eight hours in healthy adults. Smoking cuts the half-life by roughly half; pregnancy and older age slow it. Coffee Score models five hours as the baseline, adds an hour for women, half an hour for adults over 65, and halves it for smokers. The result is a band, never a precise number.
Is decaf coffee just as good for me as regular coffee?
Decaf delivers most of the polyphenols and antioxidants that observational studies link to lower mortality — but it does not deliver the alertness, the dose-response curve from Poole 2017 is less clear, and the Liu 2022 UK Biobank cohort grouped decaf differently from caffeinated. Coffee Score gives decaf 5 milligrams per cup in the math, which means a four-cup decaf habit looks under-dosed in the Dose subscore. That's a measurement, not a recommendation.
How many cups of coffee equal 400 milligrams of caffeine?
The answer depends on what you drink. Four filter coffees (≈95 mg each) get you to 380, which the model rounds to near the threshold. Two cold brews (≈200 mg each) hit exactly 400. Six espressos (≈64 mg each) come in under at 384. Four lattes (≈75 mg each) only reach 300. The Coffee Score input table maps each drink type to its measured caffeine content; the math handles the rest.

Related tools

PlanimoraPlanimoraMade with Planimora
Coffee Score — Planimora