Heart Rate Variability Calculator
Enter a list of beat to beat intervals in milliseconds and get SDNN, RMSSD, pNN50 and the average heart rate.
What it does
Heart rate variability is the variation in the time between one heartbeat and the next. A heart that keeps a perfect metronomic beat is not a healthy heart, and the phrase for the reason appears in the 1996 standard on the subject: healthy biological systems show complex patterns of variability, and a healthy heart is not a metronome. The oscillations let the cardiovascular system adjust quickly to changes in posture, exercise, temperature and stress.
The measurement itself is a list of intervals. Each NN interval, so called because only intervals between normal beats are counted, is the gap between one normal heartbeat and the next, and a monitor or an ECG machine produces them in milliseconds. Everything else on this page is arithmetic applied to that list. The task force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology set out the definitions in 1996, and they remain the reference most studies and devices follow.
Two numbers dominate the time domain analysis. SDNN is the standard deviation of all the intervals, which measures overall variability, and it mixes in every timescale at once, from the slow rise and fall over breathing to the faster changes between one beat and the next. RMSSD is the square root of the mean of the squared differences between neighbouring intervals, which mostly responds to the beat to beat changes linked to breathing and to the vagus nerve. The same standard calls RMSSD the preferred measure for short term variation because it has better statistical properties than pNN50.
This page takes the raw interval list and returns the mean interval, the average heart rate, SDNN, RMSSD and pNN50, which is the share of intervals that differ from the one before by more than 50 milliseconds. It works with any list you paste in, whether it comes from a clinic ECG, a chest strap or a watch that exports its beats.
Two cautions belong with the numbers. The task force asks for readings of at least five minutes, and warns that measures taken over different lengths cannot be compared, because total variance rises with the length of the recording. And these are numbers, not a diagnosis. A low value can follow illness, poor sleep, alcohol or long term stress, and a high value can follow training or a fever, but only a clinician can say what a particular recording means.
How to use
- Get a list of beat to beat intervals in milliseconds from an ECG report, a chest strap or a heart rate monitor that exports the raw data.
- Copy the intervals into the field. Spaces, commas and semicolons all work as separators, and the order must be the order the beats happened in.
- Check that the list has at least five intervals, and remove any that are obviously wrong rather than leaving them in.
- Read the mean interval and the average heart rate first, since a wrong mean shows up there.
- Compare SDNN and RMSSD with the reference values on the page, remembering that the task force figures come from a full day of recording.
- Look at pNN50 as a rough picture of how often the beat length changes by more than 50 ms, and check the recording length before comparing two readings.
Formula
- NN interval
- Gap in milliseconds between two normal heartbeats.
- n
- Number of intervals in the recording.
- SDNN
- Standard deviation of all NN intervals, in milliseconds.
- RMSSD
- Root mean square of successive differences, in milliseconds.
- pNN50
- Percentage of intervals that differ from the previous one by more than 50 ms.
Both standard deviations divide by n minus 1, which is the sample correction, and both are computed only over intervals between normal beats. The pNN50 count is taken over n, the number of intervals, while the number of successive differences is n minus 1, so a short list makes the percentage jump around. The task force standard also notes that for the geometric measures the recording should run for at least 20 minutes, and for the standard frequency measures about five minutes.
Worked example
Example: a 30 beat recording at rest
Defaults: 30 NN intervals in milliseconds, running from 812 down to 831 with a few longer and shorter beats in between.
- The list holds 30 intervals with a total of 24,398 ms.
- Mean NN interval: 24,398 / 30 = 813.2667 ms, so 813.3 ms.
- Average heart rate: 60,000 / 813.2667 = 73.8 bpm.
- SDNN: the square root of the sum of the squared gaps from the mean divided by 29 gives 26.7078 ms, so 26.7 ms.
- RMSSD: the square root of the sum of the squared differences between the 29 neighbouring pairs divided by 29 gives 46.4591 ms, so 46.5 ms.
- NN50: 12 of the 29 successive differences are larger than 50 ms, so pNN50 = 12 / 30 = 40.0 %.
- The tool shows 813.3 ms, 26.7 ms, 46.5 ms, 40.0 % and 73.8 bpm.
Reference table
| Measure | Normal value | What it describes |
|---|---|---|
| SDNN | 141 ± 39 ms | Overall variability over 24 hours |
| SDANN | 127 ± 35 ms | Variability from cycles longer than 5 minutes |
| RMSSD | 27 ± 12 ms | Short term variability, linked to breathing |
| HRV triangular index | 37 ± 15 | Overall variability from the interval histogram |
| Total power | 3466 ± 1018 ms2 | Spectral power over a 5 minute supine recording |
| LF to HF ratio | 1.5 to 2.0 | Balance of low and high frequency power |
Limits
- The calculator only sees the intervals you paste in, so a reading with artefacts or missed beats will give a wrong result unless you clean it first.
- Reference values depend on the recording length, the posture and the time of day, so a five minute number and a 24 hour number are not comparable.
- No spectral or frequency domain measures are calculated, so the LF and HF balance and the baroreflex numbers are not available here.
- The output is a set of numbers for information, not a diagnosis or a training plan.
Common mistakes
- Comparing a short recording with a full night of data. The task force standard says the durations should be standardised because total variance grows with the length.
- Including intervals that contain an ectopic beat. Those beats must be excluded and the interval marked as excluded, otherwise SDNN swings wildly.
- Dividing by n instead of n minus 1 in the standard deviations, which makes the answer slightly too small.
- Reading a low RMSSD as a diagnosis. RMSSD tracks vagal tone, and it falls with illness, alcohol, poor sleep and long term stress.
- Mixing heart rate with heart rate variability. A steady heart rate of 60 bpm can sit alongside a healthy variability, and the two say different things.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the RMSSD for the example recording?
46.5 ms. RMSSD is the square root of the mean of the squared differences between neighbouring intervals, and the 29 differences between the 30 intervals give 46.5 ms.
How many intervals in the example differ from the one before by more than 50 ms?
12 of the 29 successive differences, which is 40.0 % when the count is taken over the 30 intervals.
A recording has a mean NN interval of 800 ms. What average heart rate does that mean?
75 bpm, because 60,000 divided by 800 ms gives 75 beats a minute.
Questions
What is heart rate variability?
The variation in the time between one heartbeat and the next. It reflects how well the autonomic nervous system adapts the heart to changes in demand, and a healthy heart varies more than a rigid one.
What is the difference between SDNN and RMSSD?
SDNN is the standard deviation of every interval, so it mixes all timescales together. RMSSD looks only at the change from one interval to the next, so it tracks short term variation and the vagus nerve.
What is a normal value?
For a full day of recording the 1996 standard lists SDNN at 141 ± 39 ms and RMSSD at 27 ± 12 ms. A five minute recording gives different numbers, so always match the length before comparing.
How long should the recording be?
At least five minutes for the time domain measures, and the task force prefers a nominal 24 hour recording for the standard set. Many studies use five minutes, but say so.
What is pNN50?
The share of intervals that differ from the previous one by more than 50 milliseconds. It gives a quick picture of how often the beat length changes sharply, and the standard prefers RMSSD because pNN50 behaves less well statistically.
Can I measure this with a watch?
Wrist devices give a good estimate of the intervals when the signal is clean, though optical sensors struggle with movement and skin tone. A chest strap is more reliable, and a clinical ECG is the reference.
Sources
- Task Force of the ESC and NASPE, Circulation 1996: standards of measurement for heart rate variability
- Shaffer and Ginsberg, Frontiers in Public Health: an overview of heart rate variability metrics and norms
- Task Force of the ESC and NASPE, European Heart Journal 1996: the full standard