Calculate the harmonic mean of any set of numbers, compare with arithmetic and geometric means, and verify the AM-GM-HM inequality.
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.
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 instantly 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.
HM = n / (1/x₁ + 1/x₂ + … + 1/xₙ) AM = (x₁ + x₂ + … + xₙ) / n GM = (x₁ · x₂ · … · xₙ)^(1/n)
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.
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.
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.
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.
When averaging rates or ratios measured over equal amounts — like speeds over equal distances, or prices paid for equal-dollar investments. Use this as a practical reminder before finalizing the result.
By the AM-GM-HM inequality: for positive values, HM ≤ GM ≤ AM. Equality holds only when all values are the same.
The classical harmonic mean requires positive values. Negative or zero values make the reciprocal sum undefined or meaningless.
HM = 2ab/(a + b). This is the same formula used for parallel resistors: 1/R_total = 1/R₁ + 1/R₂.
For averaging P/E ratios, dollar-cost averaging analysis, and calculating average rates of return over equal investments. Keep this note short and outcome-focused for reuse.
Arithmetic (AM = sum/n), Geometric (GM = nth root of product), and Harmonic (HM = n/sum of reciprocals). They always satisfy HM ≤ GM ≤ AM.