Behind the algorithm
If you've switched on “When stressed,” the app reads heart-rate signals from Health Connect to work out when you might genuinely need one. Here is exactly how — including the part most stress trackers get wrong.
Step one
Sleep-derived resting heart rate — the daily figure Garmin, Pixel Watch, Galaxy Watch, Fitbit, Whoop and Apple Health already compute. We take the median of the last seven days.
Step two
Sleep RHR is the lowest heart rate of your night — typically 10 to 25 bpm below where you sit during a normal awake, seated day. Compare a stress threshold against it and you are measuring from the wrong floor.
Step three · +14
The Fenland Study measured awake-seated HR at 67.6 bpm against sleeping HR of 56.9 in the same 10,865 people — and the gap widens with fitness.7 Athletes get +14. Sedentary users get +8.
Step four · +20
Across 171 Trier Social Stress Test studies covering 8,452 healthy adults, a mental-arithmetic stressor lifts heart rate about +20 bpm above an awake-seated baseline.12 Not a percentage. A fixed jump.
The result
Built from your body, not from a population average. A sedentary colleague's line sits at 98. Same algorithm, same physiology, different numbers.
Part 1 · Inputs
Health Connect is Android's privacy-respecting bridge between fitness apps. When you grant permission, the algorithm reads exactly three things from it — and nothing else.
The daily figure your watch already computes. We take the median of the last seven days, so one bad night doesn't move your baseline.
The last 60 minutes of samples — stretched to 180 if your wearable hasn't synced, because Garmin Connect batch-syncs every few hours.
When your last workout ended. Inside 60 minutes, stress evaluation is skipped entirely — that's recovery, not anxiety.
The full evaluation runs in process memory on your phone. Health Connect data is read, one decision is made, the data is discarded. No heart rate, sleep or workout history ever touches a server. In the app, Settings → Privacy → Your data shows a live inventory of everything held about you.
Part 2 · The trap
The percentage trap. The intuitive approach is “flag stress when current HR runs more than 30% above resting.” Plenty of older stress trackers did exactly this. It sounds reasonable, and it is quietly broken for anyone whose resting heart rate isn't average.
Take an endurance athlete resting at 42 bpm. Simply sitting upright at a desk puts them at 55 — already 31% above baseline. The percentage model fires all day. A sedentary user at 70 doesn't trigger until 91. Same algorithm, wildly different sensitivities, both wrong.
The wrong-baseline trap. Switching to an absolute offset is the right structural move — sympathetic activation produces a roughly user-independent jump, not a fractional one. But it leaves a second question: above what? Comparing a TSST-derived +20 against sleep RHR over-triggers for fit users and slightly under-triggers for sedentary ones. The fix is the chain you just scrolled through.
Part 3 · The numbers
The Trier Social Stress Test is the most widely validated laboratory paradigm for inducing acute psychological stress. Across every age, sex, fitness level and ethnicity studied, the heart-rate response is remarkably consistent.
| Stressor task | Mean HR increase above awake-seated baseline |
|---|---|
| Mental arithmetic challenge | +20 bpm — our medium sensitivity |
| Public speaking task | +25 bpm — our low sensitivity |
| Combined TSST protocol | +26 bpm mean across all studies |
The effect size in healthy adults is 0.96 — which in research terms means the response is close to universal. Virtually everyone reacts.3 Crucially, in every one of those studies the increase was measured from a seated five-minute pre-task baseline: awake calm, not sleep. That is the comparison point Reliefr uses.
High sensitivity drops the offset to +15 to catch milder reactions. Low raises it to +25 so only heavier ones register.
Your awake baseline is estimated from sleep resting HR plus a population-norm gap that scales with fitness:7
| Your sleep resting HR | Estimated awake-sedentary gap |
|---|---|
| Under 50 bpm — athletic | +14 bpm |
| 50–59 bpm — fit | +11 bpm |
| 60–69 bpm — average | +10 bpm |
| 70+ bpm — sedentary or older | +8 bpm |
Athletes get a larger gap than sedentary users, which is exactly how the physiology works: fitter people have more parasympathetic dominance at rest and a larger sympathetic response on standing.
Three users hitting an identical stress level — mental arithmetic during a difficult meeting, medium sensitivity:
| User | Sleep RHR | Awake baseline | Threshold | HR during stress | Fires? |
|---|---|---|---|---|---|
| Endurance athlete | 42 | 56 (42+14) | 76 | 76 | Yes |
| Recreational fit | 58 | 69 (58+11) | 89 | 89 | Yes |
| Sedentary office | 70 | 78 (70+8) | 98 | 98 | Yes |
Same physiological event. Same algorithm. Different absolute numbers, because the people are different — and a normal upright office heart rate of 60 no longer trips the athlete's threshold the way it did in earlier versions.
Part 4 · The guard rails
Heart rate stays elevated for up to 30 minutes after a stressor ends, and exercise recovery runs longer.4 If your last workout finished within the hour, stress evaluation is skipped entirely. Better to miss a real moment than fire as you leave the gym.
Any sample above resting +40 bpm is dropped from the recent-window average. Walking briskly across the office is movement, not anxiety — filtering it keeps the average honest.
Nothing fires below 70 bpm in the recent window, whatever the delta says. Below 70 you are effectively not in sympathetic arousal — post-stress TSST heart rate sits at 78–82.
Part 5 · Honest limitations
Heart-rate-based stress detection running passively in the background is not an instrument-grade signal. Caffeine, hurrying up a flight of stairs, an animated conversation, a tense email exchange — any of these can lift your heart rate enough to fire a delivery when nothing about your day genuinely qualifies as stressful.
We accept that trade. The alternative is asking you to tell the app when you're stressed, which defeats the entire point of a passive trigger. And practically: an unexpected joke is not the worst thing that can happen to your afternoon.
If a delivery feels wrong, dislike it on the card. The algorithm learns from your ratings and tunes what fires when.
That heart rate equals stress. That the app can distinguish excitement from anxiety. That any of this is diagnostic. It is a timing heuristic built on published population data, tuned by your own ratings — nothing more, and we would rather say so here than imply otherwise.
Keep reading
Cortisol, dark humor, and the four humor styles that decide whether a joke helps or hurts.
Read the science →Meeting fatigue, micro-breaks, psychological safety, and the cost of being present but depleted.
Read the workplace cut →Sources
Every citation on this page links to the original peer-reviewed source.