Heart Rate Variability Calculator

Enter a list of beat to beat intervals in milliseconds and get SDNN, RMSSD, pNN50 and the average heart rate.

Health and FitnessUpdated 2026-10-215 min read
Heart Rate Variability Calculator
The NN intervals in milliseconds, separated by spaces or commas. Copy them from an ECG report or from the raw output of a heart rate monitor.
Mean NN interval
...
SDNN, overall variability...
RMSSD, short term variability...
pNN50...
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

  1. 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.
  2. 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.
  3. Check that the list has at least five intervals, and remove any that are obviously wrong rather than leaving them in.
  4. Read the mean interval and the average heart rate first, since a wrong mean shows up there.
  5. Compare SDNN and RMSSD with the reference values on the page, remembering that the task force figures come from a full day of recording.
  6. 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

Mean NN = sum of the NN intervals / number of intervals. SDNN = square root of the sum of (NN minus mean NN) squared divided by (n - 1). RMSSD = square root of the sum of the squared differences between neighbouring intervals divided by (n - 1). pNN50 = number of intervals differing from the previous one by more than 50 ms, divided by the number of intervals, as a percentage. Average heart rate = 60000 / mean NN in ms.
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.

  1. The list holds 30 intervals with a total of 24,398 ms.
  2. Mean NN interval: 24,398 / 30 = 813.2667 ms, so 813.3 ms.
  3. Average heart rate: 60,000 / 813.2667 = 73.8 bpm.
  4. 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.
  5. 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.
  6. NN50: 12 of the 29 successive differences are larger than 50 ms, so pNN50 = 12 / 30 = 40.0 %.
  7. The tool shows 813.3 ms, 26.7 ms, 46.5 ms, 40.0 % and 73.8 bpm.

Reference table

Reference values from the 1996 task force standard, with 24 hour time domain figures and 5 minute spectral figures
MeasureNormal valueWhat it describes
SDNN141 ± 39 msOverall variability over 24 hours
SDANN127 ± 35 msVariability from cycles longer than 5 minutes
RMSSD27 ± 12 msShort term variability, linked to breathing
HRV triangular index37 ± 15Overall variability from the interval histogram
Total power3466 ± 1018 ms2Spectral power over a 5 minute supine recording
LF to HF ratio1.5 to 2.0Balance 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

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.