Harmonic Mean Calculator

Calculate the harmonic mean of any set of numbers, compare with arithmetic and geometric means, and verify the AM-GM-HM inequality.

Harmonic Mean (HM)
48.0000
n / Σ(1/xᵢ) = 2 / 0.0417
Arithmetic Mean (AM)
50.0000
Sum of values / count
Geometric Mean (GM)
48.9898
nth root of the product of values
AM-GM-HM Inequality
HM ≤ GM ≤ AM ✓
48.00 ≤ 48.99 ≤ 50.00
HM / AM Ratio
0.9600
Closer to 1 when values are similar
Count & Range
2 values, range 20.00
Min: 40.00, Max: 60.00

Mean Comparison

Harmonic Mean
48.0000
Geometric Mean
48.9898
Arithmetic Mean
50.0000

Value Breakdown

#Value (xᵢ)1/xᵢ% of Total
160.00000.016760.0%
240.00000.025040.0%
Σ100.00000.0417100%
Planning notes, formulas, and examples

About the Harmonic Mean Calculator

The harmonic mean is one of the three classical Pythagorean means alongside the arithmetic and geometric means. It is defined as the reciprocal of the arithmetic mean of the reciprocals — or equivalently, n divided by the sum of the reciprocals of n values. The harmonic mean is always the smallest of the three Pythagorean means (for positive values), obeying the famous inequality HM ≤ GM ≤ AM.

This calculator computes the harmonic mean for any set of positive numbers, compares it with the arithmetic and geometric means, and visually demonstrates the AM-GM-HM inequality. It provides a detailed breakdown showing each value, its reciprocal, and its contribution to the total.

The harmonic mean is especially useful when averaging rates or ratios. For example, if you drive 60 km/h for one leg of a trip and 40 km/h for the return leg (same distance), the correct average speed is the harmonic mean: 2/(1/60 + 1/40) = 48 km/h — not the arithmetic mean of 50. Similarly, the harmonic mean appears in electrical circuits (parallel resistors), finance (price-earnings ratios), and physics (lens equations). Understanding when to use each type of mean is a critical skill in statistics and applied mathematics.

When This Page Helps

The harmonic mean involves summing reciprocals — a step where arithmetic mistakes are common, especially with more than two values or when comparing HM against arithmetic and geometric means. This calculator computes all three Pythagorean means, verifies the AM-GM-HM inequality, and provides a visual bar chart comparison so you can see exactly how the means relate. It is essential for correctly averaging speeds over equal distances, computing equivalent parallel resistances, and understanding dollar-cost averaging in finance.

How to Use the Inputs

  1. Choose between entering a comma-separated list or using two-value mode.
  2. Enter your positive numbers in the input field.
  3. Adjust the decimal places for precision control.
  4. Use presets to explore common scenarios like speed averaging.
  5. Review the three means and their inequality relationship in the output cards.
  6. Check the visual comparison bars to see where each mean falls.
  7. Examine the table for individual value reciprocals and contributions.
Formula used
HM = n / (1/x₁ + 1/x₂ + … + 1/xₙ) AM = (x₁ + x₂ + … + xₙ) / n GM = (x₁ · x₂ · … · xₙ)^(1/n)

Example Calculation

Result: HM = 48, AM = 50, GM ≈ 48.99

For values 60 and 40: HM = 2/(1/60 + 1/40) = 2/(0.0417) = 48. This is the correct average for round-trip speed calculations.

Tips & Best Practices

  • Use harmonic mean for averaging rates, speeds, or price-to-earnings ratios.
  • The harmonic mean is undefined if any value is zero.
  • All three Pythagorean means are equal only when all values are identical.
  • For two values, HM = 2ab/(a+b), which is the harmonic formula for parallel resistors.
  • The harmonic mean weights smaller values more heavily than the arithmetic mean.

The Three Pythagorean Means

The arithmetic mean (AM), geometric mean (GM), and harmonic mean (HM) are the three classical Pythagorean means, each suited to different types of data. AM = (x₁+x₂+…+xₙ)/n is the everyday average. GM = (x₁·x₂·…·xₙ)^(1/n) is used for growth rates and ratios. HM = n/(1/x₁+1/x₂+…+1/xₙ) is used for rates and reciprocal quantities. For any set of positive, non-equal values, HM < GM < AM — this is the AM-GM-HM inequality, one of the most important inequalities in mathematics. Equality holds only when all values are identical.

When to Use the Harmonic Mean

Use the harmonic mean whenever you are averaging rates measured over equal quantities (not equal times). The classic example is average speed: if you drive 60 km/h for 100 km and 40 km/h for 100 km, the correct average speed is HM(60, 40) = 48 km/h, not 50. Similarly, averaging price-to-earnings ratios across equal-dollar investments, computing the equivalent resistance of parallel resistors (1/R = 1/R₁ + 1/R₂), and finding the average rate of work when workers contribute equal amounts all require the harmonic mean. Using the arithmetic mean in these contexts gives systematically biased results.

Harmonic Mean in Electrical Engineering

In circuit design, resistors in parallel combine by the reciprocal sum formula: 1/Rₜₒₜₐₗ = 1/R₁ + 1/R₂ + … + 1/Rₙ. For two resistors this simplifies to Rₜₒₜₐₗ = 2·HM(R₁, R₂)/n, or equivalently R₁R₂/(R₁+R₂). Capacitors in series follow the same pattern. Understanding the harmonic mean makes these calculations intuitive and helps engineers quickly estimate equivalent component values without lengthy algebra.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • When averaging rates or ratios measured over equal amounts — like speeds over equal distances, or prices paid for equal-dollar investments.