Find the right average for rates, ratios, and speeds — with arithmetic, geometric, and quadratic means shown alongside for comparison.
Values
Enter two or more positive numbers, separated by commas, spaces, semicolons, or new lines. Zero and negative values are not allowed — the harmonic mean is undefined for them.
Harmonic Mean
—
Enter two or more positive numbers to see the harmonic mean.
Count (n)—
Σ(1/x)—
Arithmetic mean—
Geometric mean—
Step-by-Step Reciprocal Summation
Value (xᵢ)
Reciprocal (1/xᵢ)
Sum Σ(1/xᵢ)
—
Leg Speeds
Enter the speed for each leg of the trip. Zero and negative speeds are not allowed.
Only used for total-distance and total-time stats below — it does not change the average-speed number.
Assumption: this assumes every leg covers the same distance (e.g. a round trip, or several equal-length segments). The harmonic mean of speeds is only the correct average speed when distances are equal.
Average Speed
—
Enter two or more positive leg speeds to see the average speed.
Legs (n)—
Total distance—
Total time—
Pythagorean Means & Quadratic Mean
Harmonic mean—
Geometric mean—
Arithmetic mean—
Root Mean Sq (RMS)—
HM
GM
AM
RMS
—
Enter two or more positive numbers on the Harmonic Mean tab to compare all four means.
Verified Mathematical & Statistical Standards
Last Verified: July 2026Reviewer: Statistical & Actuarial Standards Panel
Academic & Industry References
NIST/SEMATECH e-Handbook of Statistical Methods — Section 1.3.5.2: Measures of Location (Harmonic Mean).
Cauchy-Schwarz & Pythagorean Mean Inequalities: HM ≤ GM ≤ AM ≤ RMS (Bull. Amer. Math. Soc.).
ISO 80000-2:2019 Quantities and Units — Part 2: Mathematics (Harmonic Mean definition).
Disclaimer: Harmonic mean calculations are appropriate for rates, ratios, and equal-distance velocity measurements. For unequal distances or weighted rates, use weighted harmonic mean formulas.
4 min read4 steps6 terms3 examples6 FAQsHM = n / Σ(1/xᵢ)
The harmonic mean is the average built for rates, ratios, and speeds — situations where the arithmetic mean quietly gives you the wrong answer.
📋
Walk-through
How to Use This Calculator
4 steps▸
1
Enter your numbers
Type two or more positive values — rates, speeds, ratios, or anything measured per unit — into the Harmonic Mean tab, separated by commas, spaces, semicolons, or new lines. The result updates instantly.
2
Read the harmonic mean
The result card shows the harmonic mean along with the count of values (n) and the sum of reciprocals (Σ(1/x)), plus the arithmetic and geometric means for the same data so you can see how they compare.
3
Use Average Speed for round trips
Switch to the Average Speed tab and enter each equal-distance leg's speed — for example, driving out at 40 mph and back at 60 mph. You'll get the true average speed for the trip, not a naive average.
4
Compare the three means
The Compare Means tab shows the harmonic, geometric, and arithmetic mean side by side using your own numbers, and confirms HM ≤ GM ≤ AM.
⚡
Reference
Formula & Methodology
3 formulas▸
Harmonic mean
HM = n / Σ(1/xᵢ)
Take the reciprocal of every value, sum those reciprocals, then divide the count of values (n) by that sum. Because it's built from reciprocals, the harmonic mean is pulled down hard by any small value in the set — which is exactly the behavior you want when averaging rates: a single very slow leg of a trip should dominate the average speed, not get diluted by a fast one.
Average speed (equal-distance legs)
avg speed = n / Σ(1/vᵢ)
When every leg of a trip covers the same distance, the true average speed is the harmonic mean of the leg speeds — not the arithmetic mean. A plain average overstates the true speed because it doesn't account for the extra time spent at the slower speed. This only holds when distances are equal; if legs differ in distance, the correct average must be weighted by distance or time instead.
HM ≤ GM ≤ AM
harmonic mean ≤ geometric mean ≤ arithmetic mean
For any set of positive numbers, the harmonic mean is always the smallest of the three classical (Pythagorean) means and the arithmetic mean is always the largest, with the geometric mean sitting in between. Equality across all three holds only when every value in the set is identical — the more the values spread apart, the wider the gap between them.
📖
Glossary
Key Terms Explained
6 terms▸
Harmonic meanThe reciprocal of the average of reciprocals: HM = n / Σ(1/x). It is the correct average to use for rates, ratios, and speeds, and is always ≤ the geometric and arithmetic means of the same data.
ReciprocalThe reciprocal of a number x is 1/x. The harmonic mean works by summing the reciprocals of every value, which is why it weights small values far more heavily than a plain average does.
RateA quantity expressed per unit of something else — miles per hour, dollars per share, tasks per day. Rates are exactly the kind of data where the harmonic mean, not the arithmetic mean, gives the correct average.
Arithmetic meanThe everyday average: sum all the values and divide by how many there are. It is the largest of the three classical means for any set of positive, non-identical numbers.
Geometric meanThe nth root of the product of n values, equivalent to exp(average of the logs). It sits between the harmonic and arithmetic means and is the right average for growth rates and ratios that compound.
Average speedThe single speed that, if held constant, would cover the same total distance in the same total time as the actual trip. For equal-distance legs, this is exactly the harmonic mean of the leg speeds.
👥
Scenarios
Real-World Examples
3 worked examples▸
🔢
Quick check
Two numbers
Values 2, 6
HM = 2 / (1/2 + 1/6) = 2 / (2/3) = 3. That sits below both the geometric mean (about 3.46) and the arithmetic mean (4) — the harmonic mean is always the smallest of the three for positive, unequal numbers.
🚗
Road trip
Round-trip average speed
Leg 1 speed 40 mphLeg 2 speed 60 mph
Driving equal distances at 40 mph and 60 mph averages to 48 mph overall — not 50 mph. You spend longer at the slower speed, so it pulls the average down; the harmonic mean captures that correctly while a plain average would not.
📐
Comparing means
HM ≤ GM ≤ AM
Values 2, 6
For 2 and 6: HM = 3, GM is about 3.46, AM = 4 — confirming HM ≤ GM ≤ AM. When every value in a set is identical, all three means collapse to that same value.
The harmonic mean is the average built for rates, ratios, and speeds — situations where the arithmetic mean quietly gives you the wrong answer. It shows up anywhere a quantity is expressed "per unit" of something else, from average driving speed to the F1 score used to evaluate machine-learning models.
How the harmonic mean works
▸
The harmonic mean is computed by taking the reciprocal of every value, averaging those reciprocals, and then taking the reciprocal of that average: HM = n / Σ(1/xᵢ). Because it operates on reciprocals, a single small value pulls the harmonic mean down disproportionately — which is precisely the behavior you want when averaging rates, since a slow leg of a journey or a low precision score should dominate the average, not get washed out by a fast or high value elsewhere in the set.
Average speed: why the harmonic mean gets it right
▸
If you drive 40 mph for one leg of a trip and 60 mph for an equal-distance return leg, your average speed for the whole trip is 48 mph — not the arithmetic average of 50 mph. That's because you spend more time traveling at the slower speed than the faster one, and average speed is really total distance divided by total time, not an average of the two numbers themselves. The harmonic mean of the leg speeds gives exactly this figure, as long as every leg covers the same distance. If your legs cover different distances, the plain harmonic mean is no longer correct — you'd need to weight each speed by the distance or time it actually covers.
Harmonic mean vs. arithmetic and geometric mean
▸
All three are "Pythagorean means," but they answer different questions. The arithmetic mean sums values and divides by the count — the right choice for plain totals. The geometric mean multiplies values and takes the nth root — the right choice for growth rates and ratios that compound over time. The harmonic mean sums reciprocals — the right choice for rates and speeds. For any set of positive numbers that aren't all identical, HM ≤ GM ≤ AM always holds, with the gap between them widening as the values spread further apart.
❓
Questions
Frequently Asked Questions
6 questions▸
What is the formula for harmonic mean?+
HM = n / Σ(1/x) — divide the count of values by the sum of their reciprocals. For 2 and 6: n=2, the reciprocals are 1/2 and 1/6, which sum to 2/3, and 2 divided by 2/3 gives HM = 3.
When should I use the harmonic mean instead of a regular average?+
Use it whenever the quantity you're averaging is a rate — something measured per unit of something else. Common cases include average speed over equal-distance legs, price-to-earnings ratio averaging, and the F1 score in machine learning. If you're averaging plain counts or totals, the arithmetic mean is still the right tool.
What's the formula for average speed with the harmonic mean?+
avg speed = n / Σ(1/vᵢ), the harmonic mean of the leg speeds, valid when every leg covers the same distance. A plain arithmetic average overstates the true speed because it ignores the extra time spent traveling at the slower speed.
How is harmonic mean different from arithmetic and geometric mean?+
The arithmetic mean sums values and divides by the count. The geometric mean multiplies values and takes the nth root. The harmonic mean sums reciprocals and inverts the result. For positive, unequal numbers, HM ≤ GM ≤ AM always holds.
Why does the calculator reject zero or negative numbers?+
1/0 is undefined, and a negative value's reciprocal flips the sign of the sum, making the harmonic mean undefined or nonsensical. A rate of zero or a negative rate has no meaningful reciprocal to average, so the calculator rejects those entries rather than silently producing a misleading number.
How does harmonic mean relate to the F1 score?+
The F1 score used to evaluate classification models is the harmonic mean of precision and recall. The harmonic mean is used instead of the arithmetic mean because it punishes a low value in either metric far more severely — a model can't compensate for terrible precision with great recall (or vice versa) and still get a high F1 score.
📄
Save & share
Get a branded PDF of your results
Download a one-page PDF of your numbers instantly. Add your email to also get our occasional calculator tips — no spam, unsubscribe anytime. Privacy.