CCalclabhub

Math · 93 calculations

Statistics

How To Calculate The Root Mean Square

The root mean square, often shortened to RMS, is the square root of the average of the squares of a set of values. It is the standard way to quote a typical magnitude when signs should not cancel, which is why electrical engineers use it for alternating voltage. This page uses three fixed values so every step stays visible.

Last updated

Quick Answer

RMS = sqrt((v1^2 + v2^2 + ... + vn^2) / n)

RMS
The root mean square of the values
vi
Each individual value in the set
n
The number of values, which is three here
Sum of squares
The total obtained after squaring and adding every value

Square each value, add the squares, divide by how many values there are, then take the square root. For the three values 2, 3 and 6 the squares are 4, 9 and 36, their sum is 49 and the mean square is 49 / 3 or 16.3333 recurring. The square root of that is about 4.04145, which is larger than the arithmetic mean of 3.6667.

What Is The Root Mean Square?

The root mean square is a single number summarising the typical size of a set of values, whether those values are positive, negative or mixed. Its name describes the order of operations exactly: square everything, take the mean of those squares, then take the square root. Mathematicians also call it the quadratic mean, which places it alongside the better-known arithmetic and geometric means as one member of a wider family. It turns up wherever the magnitude of a fluctuating quantity matters more than its direction, from the voltage in a household socket to the size of an error across repeated measurements.

Squaring first is what makes the measure work. If you averaged an alternating signal directly, the positive and negative halves would cancel and a clearly nonzero quantity would report as zero. Squaring makes every contribution positive, so a value of minus three contributes exactly the same magnitude as a value of plus three. Taking the square root at the very end undoes the squaring and returns the answer to the original units. That final step is easy to forget, and forgetting it leaves you with the mean square rather than the root mean square a reader expects.

For the three values used on this page the arithmetic is unusually tidy. Squaring 2, 3 and 6 gives 4, 9 and 36, which add to exactly 49. Dividing by three gives a mean square of 49 / 3, or 16.3333 recurring, and the square root of that is about 4.04145. The arithmetic mean of the same values is 11 / 3, or 3.6667, so the RMS is noticeably higher. That gap is not an error: it reflects the fact that the larger value of 6 is amplified by being squared, and the square root at the end cannot fully undo the extra weight it received.

The RMS is always at least as large as the arithmetic mean of nonnegative values, and the two coincide only when every value is identical. The reason is that the variance of a set is never negative. Writing the mean square as the square of the mean plus the population variance makes the relationship explicit: the extra variance term can only add to the result. With values of 1, 1 and 1 the variance is zero and the RMS is exactly 1, equal to the mean. With values of 0, 0 and 0 both quantities are 0, the smallest answer the RMS can produce. Any spread between the values pushes the RMS above the mean.

Because squaring is applied to each value before averaging, doubling every value doubles the RMS. Each square becomes four times as large, the mean square becomes four times as large, and the square root restores a factor of two. For the worked set the RMS at doubled values is about 8.0829, precisely twice 4.04145. More generally, multiplying every value by a constant k multiplies the RMS by the absolute value of k. This property is called homogeneity, and it is why the RMS behaves sensibly as a measure of magnitude when you change scales, such as converting a signal from volts to millivolts.

Unlike covariance, the RMS is not invariant to translation: adding the same constant to every value changes the answer, usually raising it. Adding one to each of 2, 3 and 6 gives 3, 4 and 7, whose squares sum to 74 rather than 49, so the RMS increases. This is a feature rather than a flaw, because a quantity centred far from zero genuinely has a larger magnitude. It also explains the close connection to standard deviation: standard deviation measures spread around the mean, whereas RMS measures magnitude relative to zero. For the worked data the population variance is the mean square minus the square of the mean, and the RMS can be rebuilt from the mean and that variance.

The most familiar application is alternating current. A sinusoidal voltage spends half its time negative, so a plain average would report zero and be useless for sizing a fuse or a heating element. Quoting the RMS voltage instead gives the value that would deliver the same power as a steady direct voltage, which is why a mains supply described as 230 volts means an RMS value with a higher peak. The same reasoning applies to any oscillating signal, to the magnitude of a vector of errors and to the speed of molecules in kinetic theory, where a root-mean-square speed summarises a whole distribution of molecular speeds.

Reading the number calls for some care. Squaring gives disproportionate influence to the largest observations, so one unusually large value can lift the RMS well above what most of the data would suggest. A set of 0, 0 and 10 has an RMS of about 5.77 even though two of the three values are zero. That sensitivity is desirable when large excursions matter, as they do in electrical heating or in error budgets, but misleading if you wanted a robust typical value. In those cases the arithmetic mean or median may be the more honest summary, and reporting both is often the clearest approach.

Whenever you quote an RMS, say what went into it. The number depends on the count, on the units and on whether every value was included, and a root mean square computed from three fixed teaching values should not be confused with one estimated from a long series of measurements. Used with that care, the RMS is a compact and physically meaningful description of magnitude. The three values on this page, 2, 3 and 6, give a sum of squares of 49 and an RMS of about 4.04145; the identical set of 1s gives 1, and the set of zeros gives 0. Those three cases cover the increasing, the constant and the empty end of the scale.

Formula

RMS = sqrt((v1^2 + v2^2 + ... + vn^2) / n)

Formula page →

Square every value, average those squares, then take the square root. The result is in the same units as the original values.

SymbolMeaning
RMSRoot mean square
viEach value in the set
nNumber of values

SumSq = v1^2 + v2^2 + v3^2

Formula page →

The intermediate quantity before division. For 2, 3 and 6 it equals 4 + 9 + 36, which is 49.

SymbolMeaning
SumSqSum of the squared values
v1, v2, v3The three fixed values

RMS = sqrt(mean^2 + variance)

Formula page →

The mean square splits into the square of the arithmetic mean plus the population variance. It shows directly why the RMS is never below the mean.

SymbolMeaning
RMSRoot mean square
meanArithmetic mean of the values
variancePopulation variance around that mean

How To Calculate The Root Mean Square

  1. 1

    List the values and count them

    Write down the values and note how many there are. Here the three values are 2, 3 and 6, so n is 3. The count becomes the divisor later, so getting it right at the start matters. This calculator deliberately fixes the count at three to keep the expression transparent.

  2. 2

    Square each value

    Square each value separately: 2 squared is 4, 3 squared is 9 and 6 squared is 36. Squaring removes any negative sign, so a value of minus 3 would also contribute 9. Keep these three results rather than averaging as you go, because the order of operations matters.

  3. 3

    Add the squares and divide by the count

    Add the three squares to get 4 + 9 + 36 = 49, then divide by n = 3. This gives the mean square, 49 / 3, which is 16.3333 recurring. It is still in squared units at this stage, which is why it is an intermediate quantity rather than the reported answer.

  4. 4

    Take the square root

    Take the square root of the mean square: sqrt(16.3333 recurring) is about 4.04145, or more precisely 4.041451884327381. This final step returns the result to the original units and makes it comparable with the values that went in. Skipping it would report the mean square instead of the RMS.

  5. 5

    Check against the mean and a rescaled set

    The arithmetic mean of 2, 3 and 6 is 11 / 3, or 3.6667, so the RMS of 4.04145 is correctly the larger figure. As a scaling check, doubling every value gives an RMS of about 8.0829, exactly twice the original, confirming the homogeneity expected of a magnitude measure.

Examples

Example 1: The three default values 2, 3 and 6

v1
2
v2
3
v3
6
StepCalculationResult
Squares2*2, 3*3, 6*64, 9, 36
Sum of squares4 + 9 + 3649
Mean square49 / 316.3333 recurring
Root mean squaresqrt(49 / 3)4.04145

Result: The root mean square of 2, 3 and 6 is 4.04145, above the arithmetic mean of 3.6667 because squaring gives extra weight to the largest value.

Example 2: Three identical values of 1

v1
1
v2
1
v3
1
StepCalculationResult
Squares1*1, 1*1, 1*11, 1, 1
Sum of squares1 + 1 + 13
Mean square3 / 31
Root mean squaresqrt(1)1

Result: With three identical values the RMS is 1, exactly equal to the arithmetic mean, because there is no spread to raise it.

Example 3: Three values of zero

v1
0
v2
0
v3
0
StepCalculationResult
Squares0*0, 0*0, 0*00, 0, 0
Sum of squares0 + 0 + 00
Mean square0 / 30
Root mean squaresqrt(0)0

Result: When every value is zero the RMS is 0, the smallest result the calculation can return.

Calculator

Root mean square

4.0415

Arithmetic mean
3.6667
Sum of squares
49
RMS at double the values
8.0829

Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.

Prefer a full-width tool? Open the The Root Mean Square calculator page.

Common Mistakes

  • Taking the square root before averaging

    Averaging the square roots of the values is a different calculation and gives the wrong answer. The order is square, then average, then root. For 2, 3 and 6 the correct mean square is 49 / 3 before the root is taken.

  • Forgetting the final square root

    Stopping at 16.3333 recurring reports the mean square, which is in squared units and roughly four times too large in magnitude. The root is what returns the answer to the scale of the original data.

  • Expecting the RMS to equal the mean

    The RMS is never below the arithmetic mean for nonnegative values, and it is strictly higher whenever the values differ. Here 4.04145 exceeds 3.6667. A result that came out lower means a step was performed in the wrong order.

  • Dividing by n minus one

    The Bessel correction belongs to sample variance and standard deviation, not to the root mean square of a fixed set of values. Dividing the sum of squares of 49 by 2 instead of 3 would give a completely different and unjustified answer.

  • Assuming translation leaves the result unchanged

    Unlike covariance and standard deviation, the RMS is measured relative to zero, so adding a constant to every value raises it. Adding one to 2, 3 and 6 changes the sum of squares from 49 to 74 and increases the RMS.

  • Ignoring the influence of a single large value

    Squaring gives disproportionate weight to extremes, so one large observation can dominate the result. That is useful for power and error calculations but misleading if you wanted a robust typical value. Inspect the data and consider reporting the mean or median alongside.

FAQ

What is the root mean square?

It is the square root of the average of the squares of a set of values, also called the quadratic mean. It summarises typical magnitude rather than centre, so the signs of the values do not cancel each other out.

Why is the RMS larger than the arithmetic mean?

Because the mean square equals the square of the mean plus the variance, and variance is never negative. For 2, 3 and 6 the mean is 3.6667 and the RMS is about 4.04145. The two are equal only when every value is the same.

What happens to the RMS if I double every value?

It doubles. Each square becomes four times larger and the final square root restores a factor of two. The doubled set of 4, 6 and 12 has an RMS of about 8.0829, exactly twice the original value.

How does RMS differ from standard deviation?

Standard deviation measures spread around the mean, while RMS measures magnitude relative to zero. If the mean is zero the two coincide. Otherwise the RMS is larger, and the relationship is RMS squared equals mean squared plus population variance.

Why is RMS used for alternating voltage?

An alternating voltage averages to zero over a cycle, so a plain mean would be useless. RMS gives the steady direct voltage that would deliver the same power, which is what a heating element or fuse actually responds to.

Does adding a constant change the RMS?

Yes. Because the RMS is measured from zero rather than from the mean of the set, shifting all values upward increases it. Adding one to each of 2, 3 and 6 changes the sum of squares from 49 to 74 and raises the RMS.

References