Geometric and Harmonic Mean Calculator
Calculate the geometric, harmonic, arithmetic and quadratic means of a list of positive numbers, for growth rates, ratios, speeds and averages.
Results are rounded for display. Check important answers, especially in assessed or technical work.
What are the geometric and harmonic means?
The geometric mean is the nth root of the product of n positive numbers, and the harmonic mean is the number of values divided by the sum of their reciprocals. Together with the arithmetic mean they are the three classical Pythagorean means, each suited to a different kind of average.
How to use this calculator
Enter two or more positive numbers. Use the geometric mean for growth factors and ratios (enter +5% as 1.05), the harmonic mean for rates such as speeds over equal distances, and the arithmetic mean for ordinary averages. The calculator shows all four means so you can compare them.
Formula
Arithmetic mean = Σx ÷ n. Geometric mean = (x₁ × x₂ × … × xₙ)^(1/n) = exp(Σ ln x ÷ n). Harmonic mean = n ÷ Σ(1/x). Quadratic mean (RMS) = √(Σx² ÷ n). For positive values, HM ≤ GM ≤ AM ≤ RMS.
Terms in the formula
- n
- The number of values.
- Σ
- The sum over all values.
- ln x
- The natural logarithm of each value.
- 1/x
- The reciprocal of each value.
Understanding your result
For any positive values, harmonic mean ≤ geometric mean ≤ arithmetic mean ≤ quadratic mean, with equality only when all values are the same. A large gap between the means shows that the values are spread out. Choose the mean that matches how the quantities combine: add for arithmetic, multiply for geometric, and reciprocals for harmonic.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewIfrahMSc Mathematics
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
When should I use the geometric mean?
Use it to average growth rates, investment returns, ratios and anything that multiplies over time. It gives the constant rate that would produce the same overall result.
When should I use the harmonic mean?
Use it to average rates over equal amounts, such as speeds over equal distances or prices paid for equal spending. Driving 60 km at 30 km/h and 60 km at 60 km/h averages 40 km/h, the harmonic mean.
Why is the geometric mean always smaller than the arithmetic mean?
For positive values that are not all equal, the AM–GM inequality guarantees GM < AM. They are equal only when every value is the same.
Can the geometric mean be used with negative numbers or zero?
No. It needs positive values. For percentage returns, convert them to growth factors first: −5% becomes 0.95.
How do I calculate an average annual return?
Enter each year's growth factor (1 + return). The geometric mean minus 1 is the compound average return per year, the same as CAGR.
What is the quadratic mean used for?
The quadratic mean, or root mean square, is used for quantities that vary around zero or whose squares matter, such as AC voltage, errors and standard deviation.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- Weisstein, E. W. (n.d.). Geometric mean. MathWorld—A Wolfram Web Resource. View source
- Weisstein, E. W. (n.d.). Harmonic mean. MathWorld—A Wolfram Web Resource. View source
- Croarkin, C., & Tobias, P. (Eds.). (2012). NIST/SEMATECH e-handbook of statistical methods. National Institute of Standards and Technology. View source
- Illowsky, B., & Dean, S. (2023). Introductory statistics 2e. OpenStax. View source