StatGardenREF. DESK
Calculators/Maths/Geometric & harmonic mean
Maths

Geometric & harmonic mean calculator

The geometric mean and the harmonic mean of a list of positive numbers.

Published 6 August 2026 · Updated 23 September 2026

What this calculator does

There are three classical means and each answers a different question. The arithmetic mean averages values, the geometric mean averages ratios, and the harmonic mean averages rates.

They are always ordered the same way. For 2, 8 and 4 the arithmetic mean is 4.667, the geometric 4.000 and the harmonic 3.429, and no set of positive numbers ever breaks that ordering unless all the values are equal.

The formula

FormulaGM = (x₁x₂...xₙ)^(1/n); HM = n / Σ(1/xᵢ)

The geometric mean multiplies all values and takes the nth root. The harmonic mean divides the count by the sum of the reciprocals. Both require positive values.

TermMeaning
Geometric meanThe nth root of the product, appropriate for growth rates and ratios.
Harmonic meanThe reciprocal of the average reciprocal, appropriate for rates.
AM-GM-HM inequalityThe arithmetic mean is always at least the geometric, which is always at least the harmonic.

The inputs explained

FieldWhat to enter
Positive numbers (comma separated)Positive numbers, comma separated. Zero and negative values are excluded, since neither mean is defined for them.

When to use it

Averaging growth rates

Compounding returns over several years call for the geometric mean.

Averaging speeds over equal distances

The harmonic mean gives the correct average speed.

Understanding why averages differ

Seeing all three together shows how much the choice matters.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How far apart do the three means sit?

The same calculation applied to sets with different spread.

Three different sets
NumbersGeometric meanHarmonic mean
5,5,55.0005.000
2, 8, 44.0003.429
1,2,4,82.8282.133
With all values equal at 5 the three means coincide at 5.000. As spread increases they separate: 2, 8, 4 gives 4.000 and 3.429, and 1, 2, 4, 8 gives 2.828 and 2.133.

Questions

When should I use the geometric mean?

When averaging things that multiply rather than add, such as growth rates, investment returns or ratios. Averaging 50 per cent growth and minus 50 per cent arithmetically gives zero, which is wrong; the geometric mean correctly shows a loss.

When should I use the harmonic mean?

When averaging rates over a fixed quantity. Driving at 40 then 60 km/h over equal distances gives an average speed of 48, the harmonic mean, not the 50 the arithmetic mean suggests.

Why do the means coincide when all values are equal?

Because there is nothing to average. The inequality between the three means is strict unless every value is identical, which is the equality condition of the AM-GM-HM inequality.

Why must the values be positive?

Because the geometric mean involves an nth root of a product, which is undefined or ambiguous with negatives, and the harmonic mean divides by values, which fails at zero.

For the standard average and spread, see the descriptive statistics calculator. For weighted averaging, see the weighted mean calculator.