Calculateus

Harmonic Mean Calculator

Calculate the harmonic mean of a set of numbers - the standard way to average rates like speed.

Result

Harmonic Mean
55.3846
Arithmetic Mean (for comparison)
60

About the Harmonic Mean Calculator

The Harmonic Mean Calculator averages a set of positive numbers using reciprocals rather than a straight sum, which makes it the mathematically correct choice whenever you're averaging rates such as speed, price-to-earnings ratios, or cost per unit. A plain arithmetic mean overstates the true average in these situations because it treats each rate as equally weighted, when in fact the slower or higher-cost rate actually consumes more of the underlying resource. Enter any list of positive values and the calculator returns both the harmonic mean and the arithmetic mean side by side so the gap between them is visible.

How It Works

You provide a comma or space separated list of positive numbers, such as speeds for equal-distance trip legs. The calculator takes the reciprocal of every value, sums those reciprocals, and divides the count of numbers by that sum to produce the harmonic mean. It also reports the ordinary arithmetic mean of the same numbers so the difference between the two averaging methods is clear.

Harmonic Mean = n / (1/x1 + 1/x2 + ... + 1/xn), where n is the count of values and every xi must be greater than zero.

Formula & Methodology

To compute it by hand, invert each number (1 divided by the value), add the inverted values together, then divide the count of numbers by that sum. Because reciprocals of small numbers are large, a single low value in the list pulls the harmonic mean down more aggressively than it would pull down an arithmetic mean.

Examples

Averaging Speed Over Equal Distances

A trip is driven in three equal-distance legs at 60, 40, and 80 mph. The reciprocal sum is 1/60 + 1/40 + 1/80 = 0.05417, and dividing 3 by that sum gives a harmonic mean of about 55.38 mph, versus 60 mph from a plain arithmetic mean.

Dollar-Cost Averaging a Share Price

An investor buys the same dollar amount of stock in three months at prices of $10, $20, and $30 per share. The harmonic mean is 3 / (1/10 + 1/20 + 1/30), about $16.36, which matches the investor's actual average cost per share more closely than the $20 arithmetic mean.

Advantages

  • Produces the mathematically correct average whenever the quantities being combined share a fixed numerator, such as distance or dollar amount, across unequal rates.
  • Displays the arithmetic mean alongside the harmonic mean so the size of the discrepancy is immediately visible.
  • Handles any list length instantly, saving the manual work of inverting and summing reciprocals by hand.

Common Mistakes

  • Using a simple arithmetic mean to average speeds, rates, or ratios, which systematically overstates the true average when the underlying legs or periods are unequal in effect.
  • Entering a zero or negative value in the list, which breaks the calculation since reciprocals of zero are undefined.
  • Applying harmonic mean to values that don't share a common fixed numerator, such as speeds over equal time rather than equal distance, where a straight arithmetic mean is actually correct.

Edge Cases to Watch For

  • Every value must be strictly positive; entering zero or a negative number returns an error since 1/0 is undefined.
  • At least one number is required; with a single value the harmonic mean simply equals that value.
  • The harmonic mean is always less than or equal to the arithmetic mean for the same dataset, with the gap growing as the values become more spread out.

Common Use Cases

  • Logistics planners and drivers averaging speed across trip segments of equal distance.
  • Investors and analysts averaging valuation ratios like price-to-earnings, or computing average cost per share under dollar-cost averaging.
  • Students and analysts checking statistics work that calls for a harmonic mean instead of a standard average.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

When should I use harmonic mean instead of arithmetic mean?

Harmonic mean is the correct average for rates when the numerator (like distance) is fixed and equal across segments - for example, averaging speeds over equal-distance trip legs. Using a plain arithmetic mean in that situation overstates the true average speed, since it doesn't account for the extra time spent at slower speeds.

Conclusion

The harmonic mean corrects a common averaging error that shows up whenever rates, ratios, or per-unit costs are combined across unequal segments. Comparing it directly against the arithmetic mean makes clear when the difference actually matters for the numbers at hand.