Root Mean Square (RMS) Calculator
Enter a set of numbers separated by commas or spaces to find their root mean square, also called the quadratic mean. You get the full step-by-step working alongside the arithmetic mean, variance, and standard deviation. An AC voltage panel converts between peak and RMS voltage using the same formula. Results update as you type.
Formula
Worked example
For the dataset {3, 4, 5, 6, 7}: square each value to get 9, 16, 25, 36, 49. Sum = 135. Divide by 5: 27. Take the square root: sqrt(27) = 5.1962. The arithmetic mean is 5 and the variance is 2, giving a standard deviation of 1.4142. Check: RMS^2 = 5.1962^2 = 27 = mean^2 + variance = 25 + 2.
What is the root mean square?
The root mean square, abbreviated RMS and also called the quadratic mean, is a statistical measure of the magnitude of a set of numbers. Unlike the ordinary arithmetic mean, which can be pulled close to zero when positive and negative values cancel each other out, the RMS squares each value before averaging, so sign does not matter. This makes it ideal whenever you care about the typical size of a quantity, regardless of direction. The three-step process gives the name: square every value, find their mean, then take the square root to bring the units back. Mathematically, RMS = sqrt((x1^2 + x2^2 + ... + xn^2) / n).
Where is RMS used?
Electrical engineers use RMS constantly because the power dissipated by a resistor depends on the square of the current or voltage. When you see "120 V AC" printed on a US appliance, that is the RMS voltage of a sinusoidal waveform whose peak is about 170 V. The RMS value equals the peak divided by the square root of 2 (approximately 0.7071 times the peak). In statistics, the RMS relates directly to the standard deviation: RMS^2 = arithmetic mean^2 + variance. When the mean of a dataset is zero, the RMS equals the standard deviation exactly. In machine learning and forecasting, the root mean squared error (RMSE) uses the same idea to measure prediction error in the original units.
RMS and the standard deviation identity
A beautiful relationship connects RMS to the two most common descriptive statistics. If you know the arithmetic mean (x-bar) and the population standard deviation (sigma) of a dataset, you can recover the RMS without squaring every individual value: RMS = sqrt(x-bar^2 + sigma^2). Conversely, the standard deviation is sqrt(RMS^2 - mean^2). This identity is exact for population statistics (dividing by n). When working with sample statistics (dividing by n - 1 for the unbiased estimator), the relationship holds approximately for large samples.
Weighted root mean square
In many real-world applications some measurements are more important or more reliable than others. The weighted RMS generalises the formula by multiplying each squared value by a positive weight before averaging: weighted RMS = sqrt((w1*x1^2 + w2*x2^2 + ... + wn*xn^2) / (w1 + w2 + ... + wn)). If all weights are equal, the weighted RMS reduces to the ordinary RMS. Weights appear in signal processing (where channels have different sensitivities), in economics (where consumption baskets weight goods by expenditure share), and in scientific measurement (where instruments with lower uncertainty receive higher weight).
RMS vs. other means - a comparison
| Measure | Formula | Result for {1,2,3,4,5} |
|---|---|---|
| Arithmetic Mean | sum(x) / n | 3.0000 |
| Geometric Mean | n-th root of product(x) | 2.6052 |
| Root Mean Square (RMS) | sqrt(sum(x^2) / n) | 3.3166 |
| Harmonic Mean | n / sum(1/x) | 2.1898 |
| Standard Deviation | sqrt(variance) | 1.4142 |
For the dataset {1, 2, 3, 4, 5}, four common measures of center are calculated below. The RMS is always at least as large as the absolute arithmetic mean.
Frequently asked questions
What is the difference between RMS and the arithmetic mean?
The arithmetic mean adds all values and divides by the count. The RMS squares each value first, which means larger values have a disproportionate influence and negative signs are ignored. The RMS is always greater than or equal to the absolute value of the arithmetic mean (by the inequality of power means). For a dataset with only positive values the gap is larger when the values are more spread out. The two are equal only when every value in the dataset is identical.
Why does AC voltage use RMS?
Electrical power is proportional to the square of voltage (P = V^2 / R). A sinusoidal AC signal oscillates between positive and negative peaks, so its average over a full cycle is zero, which would wrongly suggest it delivers no power. RMS voltage gives the equivalent DC voltage that would deliver the same power to a resistor. For a pure sine wave, RMS voltage = peak voltage / sqrt(2), which is about 0.7071 times the peak. A US outlet delivers a peak of roughly 170 V, so the RMS is 120 V, which is what the specification on your appliance means.
Can the RMS be negative?
No. Because every value is squared before averaging, the mean of the squares is always non-negative, and the square root of a non-negative number is non-negative. Even if every value in the dataset is negative, their squares are positive, so the RMS is positive.
What is root mean square error (RMSE) and how is it related?
Root mean square error (RMSE) applies the RMS formula to a set of errors: the differences between predicted and observed values. RMSE = sqrt(sum((predicted - actual)^2) / n). It reports prediction accuracy in the same units as the original data, making it easier to interpret than mean squared error. RMSE penalises large errors more heavily than mean absolute error, which is useful when big mistakes are especially costly.
How is the RMS related to the standard deviation?
They are connected by the identity RMS^2 = mean^2 + variance (or equivalently RMS^2 = mean^2 + sigma^2 for population standard deviation). When the arithmetic mean of the dataset is zero, the RMS equals the standard deviation exactly. You can verify this with any zero-mean dataset: {-3, -1, 0, 1, 3} has a mean of 0, a variance of 4, a standard deviation of 2, and an RMS of 2.
Does the order of values matter for the RMS?
No. Because addition and squaring are both commutative and associative, the sum of squares is the same regardless of the order in which the values appear. RMS, like the arithmetic mean and standard deviation, is a permutation-invariant summary statistic.