Harmonic Mean Calculator

Calculate the harmonic mean of a positive number sequence instantly, with the count and reciprocal sum shown for rates, ratios, and averaged speeds.

Harmonic Mean Calculator
Calculate the harmonic mean of a positive number sequence instantly, with the count and reciprocal sum shown for rates, ratios, and averaged speeds.

About the harmonic mean calculator

The harmonic mean is a special kind of average designed for situations where rates, ratios, or unit-based quantities are being combined. Instead of adding the values directly and dividing by the number of values, the harmonic mean works through reciprocals. For positive numbers x1, x2, ..., xn, the formula is H = n / Σ(1/xi). This calculator applies that rule automatically and reports not only the harmonic mean but also the number of values and the sum of reciprocals used in the computation. Why does that matter? Because not every average should be an arithmetic mean. If you are averaging speeds over equal distances, price-per-unit figures, productivity ratios, or any quantity expressed as “something per something,” the harmonic mean often gives the correct combined rate. For example, if you drive the same distance at 30 mph on the way out and 60 mph on the way back, your average speed is not 45 mph. The correct result is the harmonic mean of 30 and 60, which is 40 mph. The slower segment receives more influence because it occupies more time. The harmonic mean is always less than or equal to the arithmetic mean for positive inputs, with equality only when all the values are identical. That makes intuitive sense: when you average reciprocals and then invert again, small values weigh more heavily. In rate problems that behavior is desirable, because the lower rate is often the real bottleneck. It also means the harmonic mean is sensitive to very small numbers. If one value is close to zero, the reciprocal becomes very large and can drag the mean down sharply. Because reciprocals are involved, every input must be strictly positive. A zero would require division by zero, and a negative value usually breaks the interpretation of the mean in most practical contexts. This calculator checks both conditions before returning a result. It also accepts either comma-separated or space-separated input, which makes it easy to paste data from a spreadsheet, notebook, or textbook problem. Use the harmonic mean whenever you are combining rates, densities, speeds over equal distances, yields per unit, or other reciprocal-style measurements. It is a compact statistic, but it solves a very specific problem extremely well. If you are not sure whether to use the arithmetic, geometric, or harmonic mean, the key question is simple: are you averaging values themselves, multiplicative growth factors, or rates? For rates, the harmonic mean is often the right tool.

Harmonic mean examples

These examples show where reciprocal averaging produces a more meaningful summary than a simple arithmetic mean.

InputOutputNotes
30, 6040.000000Equal-distance speeds of 30 and 60 average to 40, not 45, because the slower leg takes more time.
1, 2, 41.714286The reciprocal sum is 1 + 0.5 + 0.25 = 1.75, so H = 3 / 1.75 = 1.714286.
2, 3, 63.000000The reciprocal sum is exactly 1, so the harmonic mean equals the count, 3.

How to use the harmonic mean calculator

  1. Enter the full number sequence in one field using commas or spaces as separators.
  2. Make sure every value is positive and greater than zero before calculating.
  3. Click "Calculate" to see the harmonic mean, the count of values, and the reciprocal sum.
  4. Use "Reset" to clear the sequence and start again with a new dataset.

Harmonic mean FAQ

When should I use the harmonic mean instead of the arithmetic mean?
Use the harmonic mean when averaging rates or ratios, especially when each rate applies to the same amount of work, distance, or quantity. In those cases the arithmetic mean can overstate the true combined rate, while the harmonic mean preserves the reciprocal structure of the problem.
Why can't I include zero in the sequence?
The harmonic mean formula uses reciprocals, so a zero would require division by zero and the calculation would break down. Even values very close to zero have a strong effect because their reciprocals become very large.
Is the harmonic mean always less than the arithmetic mean?
Yes, for any set of positive numbers the harmonic mean is always less than or equal to the arithmetic mean. They are equal only when every input value is exactly the same.
What practical fields use the harmonic mean?
It appears in transportation, finance, physics, and data analysis whenever reciprocal quantities are averaged. Common examples include average speeds over equal distances, pooled price-per-unit figures, and some performance metrics built from rates.