Harmonic Mean Calculator

Harmonic mean, weighted harmonic mean, and the geometric and arithmetic means for comparison.

Harmonic mean = n ÷ Σ(1/xᵢ). For speeds of 60 and 40 km/h over equal distances, H = 2 ÷ (1/60 + 1/40) = 48 km/h, not the arithmetic 50. The harmonic mean is always ≤ the geometric mean ≤ the arithmetic mean.

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Paste positive values, separated by commas or spaces.
  2. Optionally add weights (for example distances for an average speed).
  3. Read the harmonic mean next to the geometric and arithmetic means.

What you enter

What you get

Formula

H = n ÷ Σ(1/xᵢ) | Weighted H = Σwᵢ ÷ Σ(wᵢ/xᵢ)

Worked example

Input: 60 and 40 km/h over equal distances

Result: H = 48 km/h (G = 48.99, A = 50)

You spend longer at the slower speed, so the true average speed is 48 km/h.

Questions

How do you calculate the harmonic mean?

Take the reciprocal of each value, average the reciprocals, and take the reciprocal of that average.

When should I use the harmonic mean?

When averaging rates over a fixed amount of the thing in the denominator, such as speeds over equal distances, or price-to-earnings ratios.

Why is the harmonic mean always the smallest?

Reciprocals give small values more weight, so the harmonic mean is pulled toward the smallest numbers. H ≤ G ≤ A holds for any positive data.

Can the harmonic mean include zero?

No. 1 ÷ 0 is undefined, and values near zero dominate the result.

Limitations

References

Related reading

More Statistics

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.