Methodology
Every number, explained.
Keely publishes how it computes every number. Recovery, Load, Stress and Sleep are built from the signals your Polar Loop records, heart rate, beat-to-beat intervals, movement and skin temperature, with the formulas and constants on this page. Everything is computed on your iPhone.
Updated
- Recovery
- 0–100 %, last night against your 30-night normal
- Load
- Minutes weighted by heart-rate zone, no ceiling
- Stress
- 0–100 against your calm: heart rate and HRV while still, heart rate alone while moving
- Sleep
- Stages from the Loop, measured against your need
- Fitness
- VO2 max from steady walks and runs, with a likely range
- Keely Age
- Your fitness in years, from the evidence on fitness and mortality
- Computed
- On your iPhone; raw heart data never leaves it
- Updated
- When a formula changes, this page changes with it
Principles
- Signals in, numbers out. The band delivers signals. Every score is Keely’s own calculation, so the same formulas would work with another band.
- Never fabricate. Missing data is shown as missing, older readings show their time, and nothing estimated is shown as a measurement.
- Every number is explainable. Each score keeps its inputs, and the app shows what moved it.
- Deterministic. The same data always gives the same numbers. The calculations are pure functions, tested against hand-checkable examples like the ones on these pages.
What the Loop records
- Heart rate, around the clock: an average every 5 minutes at rest, and every second during activity.
- Beat-to-beat intervals (peak-to-peak intervals from the optical sensor), the raw material for HRV, breathing rate and stress.
- Movement: steps and an activity level for each minute.
- Skin temperature, and its nightly difference from your normal.
- Sleep stages from the Loop’s own staging.
- Live heart rate and beat intervals while Keely is open and the band is connected.
Stored data syncs from the band to your iPhone. Band data is deleted only after Keely has saved it.
Cleaning the beats
Optical sensors see noise: a moved wrist, a loose band. Before any HRV, breathing or stress calculation, each beat interval passes two filters:
- Beats the band flags, beats with an error estimate above 30 ms, and intervals outside 300–2000 ms (30–200 beats a minute) are dropped.
- Intervals more than 25 % from the median of their 11 surviving neighbours are dropped.
Differences are only taken between beats that were next to each other, so a dropped beat never creates a false jump.
HRV
HRV is RMSSD, the root mean square of successive differences between clean beat intervals, in milliseconds:
RMSSD = √( average of (interval[i+1] − interval[i])² )
For example, intervals of 1000, 1010, 990 and 1005 ms give differences of 10, −20 and 15, so RMSSD = √((100 + 400 + 225) ÷ 3) ≈ 15.5 ms. Nightly HRV is the median of ln RMSSD over the 5-minute windows from 30 minutes to 4½ hours after sleep starts that hold 150 clean beat pairs, back in milliseconds, the window most studies use; it needs 12 such windows, else it uses the whole night’s beats. Deep-sleep RMSSD, the basis until October 2026, stays measured beside it on the band’s page.
Resting heart rate
The lowest 10-minute average heart rate overnight, from windows with at least 5 minutes of samples.
Breathing rate
Heart rate rises a little with each breath in and falls with each breath out, so the beat intervals oscillate at your breathing rate. Keely finds that rhythm in 2-minute windows while you sleep: clean beats resampled at 4 Hz, the trend removed, and the power spectrum searched between 0.15 and 0.40 Hz (9–24 breaths a minute). A window counts when its peak is at least 3 times the band’s average power, and the night’s rate is the median of at least 3 such windows. A peak at 0.25 Hz is 15 breaths a minute.
Your normal
- For each nightly signal (HRV, resting heart rate, breathing rate and skin temperature), your baseline is an exponentially weighted average of the last 30 nights, with a half-life of 7 nights, so last week counts half as much as last night.
- The standard deviation comes from the same window, and your normal range is the baseline ± one standard deviation. HRV’s baseline lives on its logarithm: the normal shown is the geometric mean, e^mean, and its range e^(mean ± SD), a little wider above the normal than below.
- A night enters a baseline clipped to ±2.5 standard deviations of the baseline the nights before it made (once three exist), so one extreme night moves your normal but doesn’t widen your range for the month it stays in.
- The first Recovery needs 3 nights of HRV and resting heart rate, and baselines are fully personal after 14. A night never counts toward its own baseline.
- Settling in. A distance from a baseline is weighed by how sure the baseline is:
t = (value − baseline) ÷ (SD × √(1 + 1/n)), where n is the baseline's effective nights,(Σw)² ÷ Σw²(3 nights: 3.0; a month: 18.2), then the normal z with the same tail as t on Student's t with n − 1 degrees of freedom. A night 2 SD off counts 1.21 SD with 3 nights behind it, 1.75 with 14 and 1.83 from a month on, with no step anywhere.
Recovery
| Input | Weight | Better when |
|---|---|---|
| HRV (RMSSD in the early night, on its logarithm: half last night, half this week) | 45 % | Higher |
| Resting heart rate | 25 % | Lower |
| Sleep (asleep ÷ the night’s own need) | 20 % | Closer to 100 % |
| Breathing rate | 5 % | Not faster than your normal |
| Skin temperature | 5 % | Not warmer than your normal |
z = (value − baseline) ÷ SD, weighed by how sure the baseline is; HRV on its logarithm
zHRV = ½ z last night + ½ (week mean − band centre) ÷ band width
z sleep = 0 for 88–100 % of need; (asleep ÷ need − 0.88) ÷ 0.15 below; at most +1 above
z breathing, temperature = −max(0, z − 1)
every z → 2 × tanh(z ÷ 2)
c = Σ weight × z
Recovery = 100 ÷ (1 + e^(−1.6 × (c + 0.213)))
likely = Recovery at c ∓ √Σ (weight × SE)²
Signals where lower is better flip sign, so a positive z always helps. Breathing rate counts only when it’s faster than your normal range and skin temperature only when it’s warmer than it, sleep is read against the night’s own need (sleep debt left out): from 88 % of need up to need it counts 0, a shorter night counts from that edge, and sleeping past it at most +1; HRV is compared on its logarithm, half as last night against the normal and half as the week against its band (HRV this week, below); and every z is bounded by 2 × tanh(z ÷ 2), so no input contributes more than two. Each score carries a likely range from its inputs’ standard errors: HRV’s from the windows it rests on and their spread, sleep’s from the band’s timing (20 minutes). A night at your normal reads 58 %, and HRV half a standard deviation above it, the smallest change worth acting on, reads 67 %. Standard deviations have floors: 5 % of the mean for HRV, 1 bpm, 0.3 breaths a minute and 0.2 °C. The states are Primed (67–100), Balanced (34–66) and Restore (0–33). How Recovery works, with a worked example.
Load and heart-rate zones
HRR = (HR − resting HR) ÷ (max HR − resting HR)
points = 10 × (HRR − 0.45) a minute, from 0 to 5.5
Load = the day’s points since local midnight
| Zone | Share of heart-rate reserve |
|---|---|
| Z1 Recovery | 50–60 % |
| Z2 Endurance | 60–70 % |
| Z3 Tempo | 70–80 % |
| Z4 Threshold | 80–90 % |
| Z5 VO2 max | 90–100 % |
Resting heart rate for zones is the average of your last 7 nights. Maximum heart rate is the most a workout held for 30 seconds (the window’s 20th percentile of every-second samples) among the measured workouts of the last 90 days that weren’t in water and weren’t multisport events: a hold counts on its own within 15 bpm of Tanaka’s estimate, 208 − 0.7 × age, and above that only when another workout’s hold is within 5 bpm of it; otherwise the estimate. A workout’s 5-second peak is shown but never anchors the zones alone.
chronic = 28-day average daily Load
target = chronic × (0.2 + 0.014 × Recovery) ± 15 %
Balance = 7-day average ÷ the 21 days before, measured days only
Chronic Load starts at 110 until you have 14 days. A day counts when the Loop was worn 10 hours or recorded a workout. Balance reads well below your usual under 0.75, below to 0.9, steady to 1.1, above to 1.4, and well above beyond. How Load works, with its examples.
Workouts
A workout is at least 10 minutes at or above the Zone 1 floor, found in 1-minute medians of the Loop’s heart rate, with dips of up to 2 minutes allowed. It’s classed by the share of its minutes in each zone, checked in order: VO2 max (Zone 5 ≥ 15 %), Threshold (Zones 4–5 ≥ 35 %), Tempo (Zone 3 ≥ 40 %), Recovery (Zone 1 ≥ 60 %), Endurance (Zones 1–2 ≥ 60 %), otherwise Mixed.
recovery time = 10 + 0.12 × Load × (1.35 − Recovery ÷ 100) hours
The 1-minute heart-rate recovery is the steepest 60-second fall starting in the workout’s last 3 minutes, from every-second samples only; without them it isn’t shown.
Stress
zHR = (HR − (resting HR + calm)) ÷ 8
zRMSSD = (ln RMSSD − (ln nightly HRV − calm HRV)) ÷ 0.35
s = 0.9 × zHR − 0.9 × zRMSSD
Stress = 100 ÷ (1 + e^−(s − 1.4))
Your calm starts at 12 bpm above your nights’ resting heart rate, and HRV 0.25 below your nights’ (in ln), and adapts to your own still, awake time (see Learning you). Without RMSSD, s = 1.2 × zHR. The levels are Calm (0–25), Mild (26–50), Elevated (51–75) and High (76–100). Stress is read per 5-minute window, whatever you’re doing; while still, from at least 20 clean beat pairs. A window is Active when any minute has more than 10 steps or more than light activity, when it overlaps a workout, or when heart rate is at or above the Zone 1 floor, and settling while heart rate is more than 15 bpm above resting, for up to 30 minutes after a workout and 10 minutes after a walk. Active and settling windows are read from heart rate alone, as body stress = 20 + 80 × (HR − (resting HR + calm)) ÷ (max HR − (resting HR + calm)), clamped to 0–100: calm and awake reads 20 on both scales, and your maximum heart rate 100. Every number counts both. How Stress works.
Sleep
debt = min(60, 0.25 × shortfall over 3 nights)
strain = min(30, 40 × max(0, Load ÷ target top − 1)) × (1 − e^(−d/7))
need = base + debt + strain
performance = asleep ÷ need
regularity = 200 × P − 100
lights out = usual wake − need − 12
Times are in minutes. The base starts as your sleep goal and adapts to what you sleep before good mornings (see Learning you, below). The strain part uses yesterday’s Load against the top of yesterday’s target, counted as far as that target is your own: d is the days your Loop measured behind it, so in your first days, when the target is still a starting value, a hard day adds little. P is the share of minutes over the last 14 days when you were in the same state, asleep or awake, as 24 hours later (the Sleep Regularity Index), counting naps and leaving out minutes the Loop wasn’t on your wrist.
Stages come from the Loop: Awake, REM, Light (NREM 1–2) and Deep (NREM 3). How Sleep works.
Learning you
Keely adapts to you quietly. Each of these is learned only from your own days before the one it’s used for, shrunk toward the starting value until your data is clear, and kept within bounds, so nothing changes sharply:
- Sleep need. The base moves from your goal toward the sleep you got before good mornings (the 10 %-trimmed mean, over 42 days, with at least 7 good mornings and 3 below). Its weight is n ÷ (n + 14), it moves at most an hour, and it never drops below 7 hours or your goal, whichever is lower.
- Your calm. Stress is read against how far above your nights’ resting heart rate you sit when still and awake, and how your HRV compares, learned from 14 days of still windows (weight n ÷ (n + 600), heart rate offset 8–16 bpm). Everyone starts at 12 bpm.
- What you call a workout. When you name workouts, similar ones (by time of day, weekday, length and zones) are suggested with the same name, and named for you once four agree. Easy blips you keep removing stop being found.
- When you get up. Once you’ve ended your sleep in the app a few times, Keely learns how soon after you start moving you’re really up.
The journal’s model
What affects you fits, for each outcome (next-morning HRV, as 100 × ln(HRV ÷ normal), and resting heart rate minus normal), a Bayesian linear model with a column per tag, the day before’s Load, and sleep timing:
y = Xβ + ε, β | σ² ~ N(m0, σ²V0), σ² ~ Inverse-Gamma(3, 2s0²)
Priors come from research (alcohol, for example, starts at −10 ± 8 % HRV and +2.5 ± 2 bpm), never from other people’s data. The posterior is closed-form, solved by Cholesky, and each tag gets an 80 % interval. Nothing is said before 14 nights with a normal of at least 7. The journal.
Fitness (VO2 max)
From the Loop’s heart rate against the pace of walks and runs saved to Apple Health, on steady, level stretches between minutes 5 and 35:
cost (walking) = 3.5 + 0.1 × S S = metres a minute
cost (running) = 3.5 + 0.2 × S
VO₂ max = 3.5 + (cost − 3.5) × (max − resting) ÷ (HR − resting)
Resting is your nights’ resting heart rate plus your calm offset; max is yours if set, otherwise the higher of 208 − 0.7 × age and the most you’ve held for 30 seconds. The estimate is the median of the last 42 days’ sessions, once 3 on 2 days agree within 10 %, with a likely range of ±5 (±7 while max is estimated). Bands are FRIEND’s quartiles for your age and sex. How Fitness works.
Keely Age
Keely Age = age + ln(0.86) ÷ 3.5 ÷ 0.0917 × (VO₂ max − FRIEND median for age and sex)
About −0.47 years a point, worked out each Monday from established fitness, shown in whole years with the ages at the fitness range’s ends as its range. A change over six months is named only past a MET (3.5). How Keely Age works.
Constants and changes
Some constants are starting values, and they’ll be tuned on real nights from the Loop as they accumulate: the Recovery curve’s steepness (1.6), the sleep scale (0.15) and its normal zone (88 % of need), the bound on every input (2), the stress model’s offsets and scales, the sleep-debt and strain shares, the recovery-time formula, and Load’s starting chronic value (110).
When a formula or constant changes, this page changes with it, and so does the app’s explanation. Your stored days are recomputed from the raw samples on your iPhone, so old and new numbers stay comparable.