📐 RMS Calculator – Root Mean Square Explained
The Root Mean Square (RMS) is one of the most important statistical measures in mathematics, engineering, and signal processing. It quantifies the effective magnitude of a set of values, giving proportionally greater weight to larger numbers and working correctly with both positive and negative inputs.
The RMS Formula
For a dataset of n values x1, x2, …, xn:
RMS = √( (x₁² + x₂² + … + xₙ²) / n )The three steps are: Square every value → Mean the squares → take the Square Root. This is why RMS is also called the quadratic mean.
Weighted RMS
When values contribute unequally — for example, samples measured at different intervals — you need the weighted RMS:
RMS_w = √( Σ(wᵢ · xᵢ²) / Σwᵢ )Each weight wᵢ scales the influence of the corresponding value. All weights must be non-negative and at least one must be positive.
RMS vs Arithmetic Mean vs Mean Absolute Value
| Metric | Formula | Sensitivity to Large Values |
|---|---|---|
| Arithmetic Mean | Σxᵢ / n | Linear |
| Mean Absolute Value | Σ|xᵢ| / n | Linear (sign-independent) |
| RMS (Quadratic Mean) | √(Σxᵢ² / n) | Quadratic — emphasises outliers |
By the QM–AM inequality, RMS ≥ arithmetic mean for any real dataset. The gap grows when the data has large spread or extreme outliers.
Real-World Applications
- Electrical engineering: Mains electricity is rated at 120 V or 230 V RMS — the equivalent DC voltage that delivers the same power as the alternating waveform.
- Signal processing: RMS measures signal power and loudness (dBFS levels in audio are RMS-based).
- Vibration & acoustics: Accelerometer readings use RMS amplitude to characterise vibration severity.
- Machine learning / statistics: Root Mean Square Error (RMSE) applies the RMS formula to prediction residuals, penalising large errors more than MAE does.
- Finance: Volatility is sometimes expressed as the RMS of logarithmic returns over a period.
Worked Example
Values: 3, −4, 5
- Square each:
9, 16, 25 - Mean of squares:
(9 + 16 + 25) / 3 = 16.667 - Square root:
√16.667 ≈ 4.0825
Notice that the arithmetic mean of 3, −4, 5 is 1.333 — far lower than the RMS of 4.0825because RMS treats the negative value the same as its positive counterpart and amplifies the larger magnitude values.
Accuracy & Limitations
This calculator uses JavaScript's Math.sqrt and standard 64-bit floating-point arithmetic, which is accurate to roughly 15 significant digits. For very large datasets or values near the limits of IEEE 754 double precision, minor rounding differences may appear. Extremely large squared values (above ~10¹⁵⁴) may overflow to Infinity — in such cases, consider rescaling your data before calculating.