Geometric mean calculator
Enter positive numbers, get the geometric mean.
What is the geometric mean?
The nth root of the product of n positive numbers. For 2 and 8 it is √(2 × 8) = 4, while the ordinary (arithmetic) mean is 5.
When should I use it?
For quantities that multiply, such as growth rates. An investment that gains 10% one year and loses 10% the next grows by a factor of √(1.10 × 0.90) ≈ 0.99499 a year — an average of about −0.5%, not 0%.
What is the harmonic mean?
The number of values divided by the sum of their reciprocals. It averages rates over equal amounts: driving equal distances at 60 mph and 40 mph gives an average speed of 2 ÷ (1/60 + 1/40) = 48 mph.
How do the three means compare?
For positive numbers the arithmetic mean is always at least the geometric mean, which is at least the harmonic mean. They are equal only when all the numbers are equal.
Can I use zero or negative numbers?
No — the geometric and harmonic means here need all numbers to be positive. For growth rates, enter growth factors like 1.10 and 0.90 instead of 10 and −10.
How do I average percentage growth rates?
Turn each rate into a growth factor (add 1 to the rate as a decimal), take the geometric mean of the factors and subtract 1. Rates of +5%, +10% and −2% are the factors 1.05, 1.10 and 0.98; their geometric mean is 1.0422, an average of 4.22% a year, and 1.0422 cubed is the total factor 1.1319 you get by multiplying the three years together.
What is the geometric mean of two numbers in a right triangle?
The altitude drawn to the hypotenuse of a right triangle is the geometric mean of the two pieces it cuts the hypotenuse into (Wolfram MathWorld, “Geometric Mean”). Pieces of 4 and 9 give an altitude of √(4 × 9) = 6.
How the three means are built
For positive numbers x₁ … xₙ, the geometric mean is the nth root of their product and the harmonic mean is n divided by the sum of the reciprocals (Wolfram MathWorld). NIST’s Digital Library of Mathematical Functions (section 1.7, Eq. 1.7.7) gives the ordering H ≤ G ≤ A, with equality only when all the numbers are equal. The calculator avoids overflowing on a long list by averaging the natural logarithms and exponentiating the result, which equals the nth root of the product.
Worked example: 60 mph and 40 mph
Take the two numbers 60 and 40. The arithmetic mean is 50, the harmonic mean is 2 ÷ (1/60 + 1/40) = 48 and the geometric mean is √(60 × 40) = √2400 = 48.99, so 48 ≤ 48.99 ≤ 50 as the inequality says. For two numbers the geometric mean is the square root of the product of the other two means: 50 × 48 = 2400 = 48.99² (MathWorld gives G = √(A·H)).
Common mistakes
Typing percent changes instead of growth factors: 10 and −10 are not valid, while 1.10 and 0.90 are. Using the arithmetic mean of returns: a year of +50% followed by a year of −50% averages 0% arithmetically, but 100 becomes 150 and then 75, and the geometric mean factor is 0.8660, or -13.4% a year. Including a zero: it makes the product 0 and a reciprocal impossible, which is why the calculator asks for positive numbers.
Sources: NIST Digital Library of Mathematical Functions, section 1.7 (Eq. 1.7.7); Wolfram MathWorld, “Geometric Mean” and “Harmonic Mean”. Related tools: average calculator, CAGR calculator, weighted average calculator and speed calculator. How we check our calculators.