In mathematics, root mean square (abbreviated RMS or rms), also known as the quadratic mean, is a statistical measure of the magnitude of a varying quantity. It can be calculated for a series of discrete values or for a continuously varying function. The name comes from the fact that it is the square root of the mean of the squares of the values. It is a power mean with the power .

## Calculating the root mean square

The rms for a collection of values is:

and the corresponding formula for a continuous function defined over the interval (for a periodic function the interval should be a whole number of complete cycles) is:

## Uses

The RMS value of a function is often used in physics and electronics. For example, we may wish to calculate the power dissipated by an electrical conductor of resistance . It is easy to do the calculation when a constant current flows through the conductor. It is simply,

But what if the current is a varying function ? This is where the rms value comes in. It may be trivially shown that the rms value of can be substituted for the constant current in the above equation to give the average power dissipation:

 (where denotes the arithmetic mean) (R is constant so we can take it outside the average) (by definition of RMS)

We can also show by the same method

By square rooting both these equations and multiplying them together we get the equation

However it is important to stress that this is based on the assumption that voltage and current are proportional (that is the load is resistive) and is not true in the general case (see AC power for more information).

In the common case of alternating current, when is a sinusoidal current, as is approximately true for mains power, the rms value is easy to calculate from equation (2) above. The result is:

where is the peak amplitude.

It should be noted that the peak amplitude is half of the peak-to-peak amplitude. When the peak-to-peak amplitude is known, the same formula is applied by using half of the p-p value.

The RMS value can be calculated using equation (2) for any waveform, for example an audio or radio signal. This allows us to calculate the mean power delivered into a specified load. For this reason, listed voltages for power outlets (e.g. 110 V or 240 V) are almost always quoted in RMS values, and not peak values.

From the formula given above, we can calculate also the peak-to-peak value of the mains voltage which is approx. 310 (U.S.A) and 677 (Europe) volts respectively.

In the field of audio, mean power is often (misleadingly) referred to as RMS power. This is probably because it can be derived from the RMS voltage or RMS current. Furthermore, because RMS implies some form of averaging, expressions such as "peak RMS power", sometimes used in advertisements for audio amplifiers, are meaningless.

In chemistry, the root mean square velocity is defined as the square root of the average velocity-squared of the molecules in a gas. The RMS velocity of an ideal gas is calculated using the following equation:

where represents the ideal gas constant (in this case, 8.314 J/(mol⋅K)), is the temperature of the gas in kelvins, and is the molar mass of the compound in kilograms per mole.

## Relationship to the arithmetic mean and the standard deviation

If is the arithmetic mean and is the standard deviation of a population then