Geometric, Harmonic and RMS Mean Calculator

Paste or type your positive numbers. Use the geometric mean for growth factors, the harmonic mean for rates such as speeds, and RMS for magnitudes.

Separate numbers with commas, spaces or new lines. All values must be positive.

Geometric mean

48.9898

Harmonic mean

48

Root mean square

50.9902

Arithmetic mean

50

Count

12

How it works

The ordinary (arithmetic) mean is not always the right average. Growth factors multiply rather than add, so their average is the geometric mean: the n-th root of their product. Rates such as speeds, when the same distance is covered at each one, average to the harmonic mean: the reciprocal of the mean of the reciprocals. The root mean square squares the values before averaging and then takes the square root, which weights the larger values more heavily; it is the average that matches a quantity whose effect grows with the square of the value, such as the heating effect of a current or the kinetic energy of a set of speeds.

For positive numbers the four always come in the same order: harmonic ≤ geometric ≤ arithmetic ≤ root mean square, and they are all equal only when every value is the same. The further apart your values are, the further apart the means.

Type or paste the values separated by commas, spaces or new lines. The geometric mean is computed as the exponential of the mean logarithm, which gives the same answer as the n-th root of the product without the product overflowing for long lists, and the root mean square is computed relative to the largest value for the same reason.

Formula

AM  = (x₁ + x₂ + … + xₙ) ÷ n
GM  = (x₁ × x₂ × … × xₙ)^(1/n) = exp( (ln x₁ + … + ln xₙ) ÷ n )
HM  = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)
RMS = √( (x₁² + x₂² + … + xₙ²) ÷ n )
HM ≤ GM ≤ AM ≤ RMS   for positive values

Example

A car does six out-and-back trips, going out at 60 km/h and returning at 40 km/h each time, so the twelve legs are 60, 40, 60, 40, and so on. The arithmetic mean of the twelve speeds is 50 km/h, but the true average speed over the whole distance is the harmonic mean, 2 ÷ (1/60 + 1/40) = 48 km/h, because more time is spent on the slower legs. The geometric mean is √(60 × 40) = 48.99 and the root mean square is √((60² + 40²) ÷ 2) = 50.99.

An investment grows by 80%, then 16.67%, then 42.86%, so the growth factors are 1.8, 1.1667 and 1.4286 and their product is 3. The geometric mean is ∛3 = 1.4422, so the average growth was 44.22% a year, not the arithmetic mean of 46.51%.

Assumptions and limitations

  • All values must be positive. The geometric and harmonic means are undefined for zero or negative numbers.
  • To average growth rates, enter growth factors (1 + rate), not percentages: 8% growth is 1.08. The geometric mean minus 1 is the average rate.
  • The harmonic mean is the right average for rates when the same amount of the numerator is spent at each rate: the same distance at each speed, or the same money at each price. If the same time was spent at each speed, the arithmetic mean is correct instead.
  • Every entry must be a number. Text such as units in the list stops the calculation and names the offending entry.

Frequently asked questions

Which mean should I use for an average rate of return?

The geometric mean of the growth factors. A fund that gains 50% and then loses 50% has an arithmetic mean return of 0% but ends at 75% of its starting value; the geometric mean of 1.5 and 0.5 is 0.866, a loss of 13.4% a year, which is what actually happened.

Why can't I enter a zero or a negative number?

A zero makes the product, and so the geometric mean, zero whatever the other values are, and makes the harmonic mean divide by zero. A negative value has no real n-th root in general. If your data include zeros or negatives, the arithmetic mean or the median is the appropriate average.