🧮
🧮 Math & statistics

Geometric & Harmonic Mean Calculator

Results update as you type.

Your numbers

Understanding the geometric and harmonic mean calculator — concept and principle

The arithmetic mean is not the only way to average. The geometric mean is the right average for growth factors and ratios, the harmonic mean is the right average for rates such as speeds over equal distances, and the quadratic mean (root mean square, RMS) is used for quantities that act through their squares, such as errors and alternating current. This calculator gives all four for a list of positive numbers.

Harmonic, geometric, arithmetic and quadratic meansFor 2, 8 and 32 the harmonic mean is 4.57, the geometric mean 8, the arithmetic mean 14 and the RMS 19.08.Four averages of 2, 8, 32HMGMAMRMS2832Harmonic 4.573 ÷ (½ + ⅛ + 1/32)Geometric 8∛(2 × 8 × 32) = ∛512Arithmetic 14(2 + 8 + 32) ÷ 3RMS 19.08√((4 + 64 + 1024) ÷ 3)HM ≤ GM ≤ AM ≤ RMS
Same three numbers, four different averages — always in the order HM ≤ GM ≤ AM ≤ RMS.

How it is calculated

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

All values must be greater than zero.

The principle

Each mean answers "what single value, used n times, gives the same total effect?". If the effect is a sum, the answer is the AM. If it is a product (growth over several periods), the answer is the GM, because GMⁿ equals the product. If it is a sum of reciprocals (time = distance ÷ speed), the answer is the HM. If it is a sum of squares (energy, variance), the answer is the RMS. For positive numbers these satisfy HM ≤ GM ≤ AM ≤ RMS, with equality only when all values are equal; the gaps grow as the values spread out.

Worked example

  1. Inputs: 2, 8, 32 (n = 3).
  2. GM: product = 2 × 8 × 32 = 512, and ∛512 = 8.
  3. HM: 1/2 + 1/8 + 1/32 = 0.65625, so HM = 3 ÷ 0.65625 ≈ 4.571428571.
  4. AM: (2 + 8 + 32) ÷ 3 = 42 ÷ 3 = 14.
  5. RMS: (4 + 64 + 1,024) ÷ 3 = 364, and √364 ≈ 19.07878403.
  6. Check: 4.571 ≤ 8 ≤ 14 ≤ 19.079, as the inequality predicts.

How to read the result

Because 2, 8, 32 grow by a factor of 4 each step, the GM equals the middle term 8, while the AM of 14 is pulled up by 32. A large gap between HM and RMS means the values are widely spread. Choose the mean that matches how the quantities combine.

Common mistakes

Keep in mind: The GM and HM here assume positive values. For returns that can fall to −100% or below, or for data containing zeros, these means are undefined or misleading.

Frequently asked questions

What is the average speed if I drive 60 km/h one way and 40 km/h back?

For equal distances it is the harmonic mean: 2 ÷ (1/60 + 1/40) = 48 km/h, not 50.

Why is the geometric mean used for investment returns?

Returns compound by multiplication. The GM of the growth factors, minus 1, is the constant yearly rate that gives the same final amount.

Where is RMS used?

In electrical engineering (the RMS value of an AC voltage), in physics and in statistics, where the RMS of errors measures typical error size.

Sources: G. H. Hardy, J. E. Littlewood and G. Pólya, Inequalities, Cambridge University Press · P. S. Bullen, Handbook of Means and Their Inequalities, Kluwer Academic Publishers

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →