The harmonic mean is one of the three classical means, alongside the arithmetic mean and geometric mean. It is especially useful when you want to average rates, speeds, or other quantities that behave like “value per unit” (for example, km/h, items per hour, cost per unit).
Given a set of positive numbers that represent such rates, the harmonic mean gives more weight to smaller values than to larger ones. This reflects the idea that spending time at a very low speed or rate can drag down your overall performance much more than short bursts at a higher speed can improve it.
Common situations where the harmonic mean is appropriate include:
This calculator automates the harmonic mean computation, so you can quickly enter your data, get the result, and then interpret what it means for your specific problem.
Suppose you have n positive numbers:
x1, x2, …, xn
The harmonic mean H is defined as:
H = n / (1/x1 + 1/x2 + … + 1/xn)
In words, you:
n, by that sum.That definition is equivalent to the following more formal mathematical expression:
Here:
n is the number of values.xi is the i-th value in your list.i = 1 to i = n.To compute a harmonic mean with this tool:
40, 60, 8010.5 or 3.25.1,000, enter 1000.The calculator is designed for strictly positive inputs. If you include a zero, a negative number, or something that is not a valid number, the tool will not be able to compute a meaningful harmonic mean and may show an error message.
A classic example where the harmonic mean is the correct type of average is average speed when traveling equal distances at different speeds.
Imagine you drive:
Many people might think the average speed is just the arithmetic mean:
(40 + 60) / 2 = 50 km/h
However, this is incorrect for average speed when distances are the same but speeds differ, because you spend more time traveling at the lower speed. The correct measure is the harmonic mean:
H = 2 / (1/40 + 1/60)
Compute the reciprocals and sum:
1/40 = 0.0251/60 ≈ 0.01666671/40 + 1/60 = 0.025 + 0.0166667 = 0.0416667Now divide n = 2 by this sum:
H = 2 / 0.0416667 ≈ 48 km/h
So your true average speed over the whole trip is 48 km/h, not 50 km/h. The harmonic mean correctly captures the longer time spent at the lower speed.
Once you compute the harmonic mean for your data, it helps to understand how it compares to the arithmetic and geometric means for the same numbers. For any set of positive numbers that are not all equal, you have the ordering:
harmonic mean ≤ geometric mean ≤ arithmetic mean
This inequality has practical meaning:
For rates and ratios, the harmonic mean often tells you “how the system actually behaved over time or over repeated trials,” while the arithmetic mean might give an overly optimistic impression by weighting all levels equally, regardless of how long they lasted.
The table below summarizes the differences between the three main means for positive data. This can help you decide which one is most appropriate for your situation.
| Type of mean | Formula (for x1, …, xn > 0) | Best suited for | Effect of small values |
|---|---|---|---|
| Harmonic mean | H = n / (1/x1 + … + 1/xn) |
Averaging rates, speeds, and ratios when the underlying quantity (like distance or quantity purchased) is held equal. | Small values have a strong effect and pull the mean down sharply. |
| Geometric mean | G = (x1 × x2 × … × xn)^(1/n) |
Averaging growth factors, returns, or multiplicative effects (e.g., investment returns over time). | Small values influence the mean, but less strongly than with the harmonic mean. |
| Arithmetic mean | A = (x1 + x2 + … + xn) / n |
Simple averages of quantities that add directly, like test scores or total amounts. | Each value contributes linearly; small values do not receive any extra weight. |
Another related measure is the root mean square (RMS), also known as the quadratic mean. It is always greater than or equal to the arithmetic mean and is used when you care about the magnitude of fluctuations, such as in electrical engineering (RMS voltage) or in statistics for measuring errors. While RMS is not the same as the harmonic mean, thinking about all four measures together helps you understand how different ways of averaging highlight different aspects of your data.
The harmonic mean is powerful in the right context, but it is not universally applicable. Keep the following assumptions and limitations in mind when you use this calculator:
Before relying on the result, check that your data fit these assumptions. If your situation does not involve rates, ratios, or equal-weight scenarios, consider whether the arithmetic or geometric mean might better answer your question.
When you use the harmonic mean from this calculator in your own work:
Used appropriately, the harmonic mean can provide a more realistic summary of rates and ratios than the arithmetic mean, particularly in contexts where time, distance, or quantity is shared equally across the different levels you are averaging.