Skip to content
Omnikalc

Geometric mean calculator, with harmonic and quadratic means

Calculate the geometric, harmonic, arithmetic and quadratic (RMS) means of up to 8 positive values and see which one fits your data.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Geometric mean

8.0000

Harmonic mean

4.5714

Arithmetic mean
14.0000
Quadratic mean (root mean square)
19.0788

Different averages for different data

The ordinary average, the arithmetic mean, is not always the right one. When values multiply, or when you average rates, the geometric or harmonic mean gives the correct answer.

The formulas

For n positive values x₁, …, xₙ:

  • Arithmetic mean = (x₁ + … + xₙ) ÷ n
  • Geometric mean = (x₁ × … × xₙ)^(1/n)
  • Harmonic mean = n ÷ (1/x₁ + … + 1/xₙ)
  • Quadratic mean (root mean square) = √[(x₁² + … + xₙ²) ÷ n]

Worked example

For the values 2, 8 and 32:

  1. Arithmetic mean: (2 + 8 + 32) ÷ 3 = 14.
  2. Geometric mean: (2 × 8 × 32)^(1/3) = 512^(1/3) = 8.
  3. Harmonic mean: 3 ÷ (0.5 + 0.125 + 0.03125) ≈ 4.57.
  4. Quadratic mean: √[(4 + 64 + 1,024) ÷ 3] ≈ 19.08.

The four always come in this order for positive values that are not all equal: harmonic ≤ geometric ≤ arithmetic ≤ quadratic.

When to use the geometric mean

Growth rates and returns. An investment gains 50% one year and loses 50% the next. The arithmetic mean of returns is 0%, but $100 becomes $150 then $75: you lost money. Using growth factors 1.5 and 0.5, the geometric mean is √(1.5 × 0.5) ≈ 0.866, a true average return of −13.4% a year. Enter growth factors (1 + return), not percentages, which can be negative.

Other uses: averaging ratios and indexes, combining scores on different scales, and the average in the Human Development Index.

When to use the harmonic mean

Rates over equal amounts. You drive 60 km at 30 km/h and 60 km back at 60 km/h. The average speed is not 45 km/h: the trip takes 2 + 1 = 3 hours for 120 km, so 40 km/h, the harmonic mean of 30 and 60.

Other uses: averaging price-to-earnings ratios across a portfolio with equal investments, the F1 score in machine learning, and resistors in parallel.

When to use the quadratic mean

The root mean square gives more weight to large values. It is used for alternating current (the 120 V or 230 V of mains power is an RMS value), for errors in forecasting (RMSE) and for noise levels.

Limits

The geometric and harmonic means require positive values. A single zero makes the geometric mean zero and the harmonic mean undefined.

Frequently asked questions

When should I use the geometric mean?

For quantities that multiply rather than add, such as growth rates, investment returns and ratios. The geometric mean of returns gives the constant rate that would produce the same total growth.

How do you calculate the geometric mean?

Multiply the n values and take the n-th root. For 2, 8 and 32: (2 × 8 × 32)^(1/3) = 512^(1/3) = 8.

When is the harmonic mean the right one?

For averaging rates over equal amounts, such as the average speed over equal distances or average price-to-earnings ratios. Driving 60 km at 30 km/h and 60 km at 60 km/h gives an average speed of 40 km/h, the harmonic mean.

How do the means compare?

For positive values that are not all equal, harmonic mean < geometric mean < arithmetic mean < quadratic mean. They are all equal only when every value is the same.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.