HRV Analyzer methods and Kubios comparison

Every algorithm the HRV Analyzer uses, the paper behind it, what the Kubios defaults preset sets, and how its results were checked.

Last updated

The Analyzer works out time-domain, frequency-domain and nonlinear HRV measures from RR intervals, in your browser. It has two presets: Site defaults, the settings the rest of this site uses, and Kubios defaults.

The Kubios defaults preset takes its analysis settings from the Kubios HRV User’s Guide, version 3.5 (sections 3.3 and 6). Two of its settings are not in the guide. The preset turns on medium threshold correction, and its λ = 500 for smoothness-priors detrending is the default of the method’s authors (Tarvainen and colleagues). The name says where the settings come from. It does not promise Kubios’s numbers.

We have not compared the Analyzer with Kubios HRV Standard yet, so every Kubios column below reads “Not compared yet”. We have compared it with NeuroKit2, an independent open-source HRV library, on public recordings. The NeuroKit2 column names the measures that agree, and how closely.

Open the HRV Analyzer to use these methods on your own recordings.

Algorithms

Algorithm What the Analyzer does References Kubios defaults preset NeuroKit2 Kubios HRV Standard
Time-domain statistics Gives Mean RR, Mean heart rate, SDNN, RMSSD, lnRMSSD, SDSD, NN50, pNN50, NN20, pNN20 Mean RR and mean heart rate, SDNN (the sample standard deviation), RMSSD and lnRMSSD, SDSD, and NN50, pNN50, NN20 and pNN20 counted over the successive differences. No difference is taken across a beat the site rules removed, or across a break in the recording. [1] No settings. Agrees within tolerance:
  • Mean RR, within 0.1 ms
  • SDNN, within 0.1 ms
  • RMSSD, within 0.1 ms
  • pNN50, within 0.1 percentage points
Not compared yet
Geometric measures Gives HRV triangular index, TINN HRV triangular index and TINN, from a histogram with bins of 1/128 s (7.8125 ms), the Task Force’s choice. Shown for recordings of 5 minutes or more. [1] No settings. Not compared Not compared yet
Long-term measures Gives SDANN, SDNN index SDANN and SDNN index over 5-minute segments. Shown when the recording holds at least two full segments. [1] No settings. Not compared Not compared yet
Threshold artifact correction Marks an interval that is further from the median of up to ten neighbouring intervals than the level’s threshold: very low 0.45 s, low 0.35 s, medium 0.25 s, strong 0.15 s or very strong 0.05 s at 60 bpm, and lower at higher heart rates. Each marked interval is replaced by cubic-spline (or linear) interpolation, so the number of intervals stays the same. Results carry a caution when more than 5 % of the intervals were corrected. [2] Medium, cubic spline. The guide lists the levels but does not name one as the default. Not compared Not compared yet
Automatic threshold level The Analyzer’s own rule, not Kubios’s automatic correction. It takes the weakest level at which the number of marked intervals stops rising, as long as that level marks at least one interval and at most 5 % of them. The methods text states the rule in full. [2] Not used. Not compared Not compared yet
Site rules Removes intervals outside 300–2000 ms, or more than 25 % from the median of up to ten in-range neighbours, and takes no successive difference across a removed beat. The rest of the site uses the same rules. None Not used. Not compared Not compared yet
Resampling For Welch’s periodogram, a cubic spline is drawn through the intervals and read off at an even rate, 4 Hz unless you change it. None 4 Hz, cubic spline. Not compared Not compared yet
Smoothness-priors detrending Removes slow trends with λ = 500; linear detrending or none can be chosen instead. The Analyzer detrends the 4 Hz series before Welch’s periodogram, and the beat series before the nonlinear measures when that setting is on. [3] Smoothness priors, λ = 500 (Tarvainen’s default; the guide does not state λ). The nonlinear measures use the detrended series. Not compared Not compared yet
Welch’s periodogram Gives VLF power, LF power, HF power, Total power, ln VLF, ln LF, ln HF, LF n.u., HF n.u., LF/HF, VLF peak, LF peak, HF peak Hann windows that overlap by half are averaged, and each band’s power is summed over the frequency bins inside it. The band limits can be changed, and a ULF band turned on. A recording shorter than one window gets a single, zero-padded periodogram (see the known differences below). [4] , [1] 300 s windows, 50 % overlap; VLF 0–0.04 Hz, LF 0.04–0.15 Hz, HF 0.15–0.4 Hz. Agrees within tolerance:
  • LF power, within 1 %
  • HF power, within 6 %
  • LF/HF, within 6 %
Not compared yet
Lomb–Scargle periodogram Gives VLF power, LF power, HF power, Total power, ln VLF, ln LF, ln HF, LF n.u., HF n.u., LF/HF, VLF peak, LF peak, HF peak The spectrum straight from the uneven beat times, with no resampling or detrending, up to the highest band limit in use (at least 0.5 Hz). It gives the same band measures as Welch’s periodogram. [5] , [6] Not used. Not compared Not compared yet
Poincaré plot Gives SD1, SD2, SD2/SD1 SD1 from the successive differences, SD2 from SD1 and the standard deviation of the series, and their ratio. [7] SD2 from the detrended series. Agrees within tolerance:
  • SD1, within 0.01 ms
Not compared yet
Detrended fluctuation analysis Gives DFA α1, DFA α2 Boxes of every size in the α1 and α2 ranges, without overlap; α1 and α2 are the slopes of a straight-line fit on log–log axes over each range. α2 needs at least four boxes of its largest size. [8] α1 over 4–12 beats and α2 over 13–64 beats, on the detrended series. Agrees within tolerance:
  • DFA α1, within 0.05
Not compared yet
Sample and approximate entropy Gives Sample entropy, Approximate entropy Runs of m beats that match within r × SD. Sample entropy leaves out a run’s match with itself; approximate entropy counts it. Longer recordings use their first 3000 beats, so the browser stays responsive. [9] , [10] m = 2 and r = 0.2 × SD, on the detrended series. Agrees within tolerance:
  • Sample entropy, within 0.0001 %
Not compared yet
Baevsky’s stress index Gives Baevsky stress index, Stress index (√SI) From a histogram of the intervals with 50 ms bins. The Analyzer reports Baevsky’s index and its square root, which Kubios reports as its Stress index. [11] , [2] No settings. Not compared Not compared yet

How we compared

The reference recordings are ten stretches of RR intervals, five of 5 minutes and five of 20 minutes, from records nsr001 to nsr005 of the Normal Sinus Rhythm RR Interval Database on PhysioNet.

NeuroKit2 0.2.13 (Python 3.13.11, NumPy 2.5.4, SciPy 1.18.1) computed its values on 16 Oct 2026. The site’s automated tests analyse the same recordings and fail when a measure falls outside its tolerance.

For this comparison the Analyzer was set to NeuroKit2’s choices where it can be: no artifact correction, no detrending, a 64 s Welch window, the nonlinear measures on the raw series, and DFA α1 over 4–11 beats. NeuroKit2’s values were computed to match.

Measures compared with NeuroKit2, settings matched
Measure Allowed difference Largest difference seen
Mean RR 0.1 ms Rounding only
SDNN 0.1 ms Rounding only
RMSSD 0.1 ms Rounding only
pNN50 0.1 percentage points Rounding only
SD1 0.01 ms Rounding only
LF power 1 % 0.1 %
HF power 6 % 4.7 %
LF/HF 6 % 4.4 %
Sample entropy 0.0001 % Rounding only
DFA α1 0.05 0.032

With the Kubios defaults preset against NeuroKit2’s own defaults, the frequency-domain measures differ far more: HF power by up to 200 % and LF power by up to 170 %. Most of that is the window. The preset’s 300 s window gives a 5-minute recording a single periodogram, where NeuroKit2 averages windows half as long as the recording. Detrending, the way each sums band power and the interpolation make up the rest. The time-domain measures still agree to rounding.

Kubios HRV Standard

Not compared yet. When Kubios HRV Standard’s results for the same ten recordings are in, this page will give its version and the date, and a row will say it agrees only where its measures fall within the tolerance.

Known differences from Kubios HRV

  • Kubios HRV also reports an autoregressive (AR) spectrum. The Analyzer does not; it offers Welch’s periodogram and the Lomb–Scargle periodogram.
  • The Kubios guide does not say whether detrending acts on the beat series or on the series resampled at 4 Hz. The Analyzer detrends the 4 Hz series for the spectrum and the beat series for the nonlinear measures, so either may differ from Kubios’s.
  • When a recording is shorter than the Welch window (a 5-minute recording with the preset’s 300 s window, for instance), the Analyzer applies the Hann window to the data alone, scales the power by that window, and pads the result with zeros to the full window length. The frequency grid stays that of the full window, and band power is not understated. Kubios may handle this case differently, so the spectrum of a short recording can differ slightly from Kubios’s.
  • Kubios’s Stress index is the square root of Baevsky’s stress index. The Analyzer reports both, under different names.
  • The automatic threshold level is the Analyzer’s own rule. Kubios’s automatic correction, in its Premium edition, is a different method.

References

  1. Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology. Heart rate variability: standards of measurement, physiological interpretation and clinical use. Circulation. 1996;93(5):1043–1065. doi:10.1161/01.CIR.93.5.1043
  2. Tarvainen MP, Lipponen J, Niskanen JP, et al. Kubios HRV software user’s guide. Kubios Oy. Version 3.5, 3 November 2021. https://www.kubios.com/downloads/Kubios_HRV_Users_Guide.pdf
  3. Tarvainen MP, Ranta-aho PO, Karjalainen PA. An advanced detrending method with application to HRV analysis. IEEE Transactions on Biomedical Engineering. 2002;49(2):172–175. doi:10.1109/10.979357
  4. Welch P. The use of fast Fourier transform for the estimation of power spectra: a method based on time averaging over short, modified periodograms. IEEE Transactions on Audio and Electroacoustics. 1967;15(2):70–73. doi:10.1109/TAU.1967.1161901
  5. Lomb NR. Least-squares frequency analysis of unequally spaced data. Astrophysics and Space Science. 1976;39(2):447–462. doi:10.1007/BF00648343
  6. Scargle JD. Studies in astronomical time series analysis. II - Statistical aspects of spectral analysis of unevenly spaced data. The Astrophysical Journal. 1982;263:835. doi:10.1086/160554
  7. Brennan M, Palaniswami M, Kamen P. Do existing measures of Poincare plot geometry reflect nonlinear features of heart rate variability? IEEE Transactions on Biomedical Engineering. 2001;48(11):1342–1347. doi:10.1109/10.959330
  8. Peng CK, Havlin S, Stanley HE, et al. Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time series. Chaos: An Interdisciplinary Journal of Nonlinear Science. 1995;5(1):82–87. doi:10.1063/1.166141
  9. Richman JS, Moorman JR. Physiological time-series analysis using approximate entropy and sample entropy. American Journal of Physiology-Heart and Circulatory Physiology. 2000;278(6):H2039–H2049. doi:10.1152/ajpheart.2000.278.6.H2039
  10. Pincus SM. Approximate entropy as a measure of system complexity. Proceedings of the National Academy of Sciences. 1991;88(6):2297–2301. doi:10.1073/pnas.88.6.2297
  11. Baevsky RM, Chernikova AG. Heart rate variability analysis: physiological foundations and main methods. Cardiometry. 2017;(10):66–76. doi:10.12710/cardiometry.2017.10.6676