Compute a weighted mean exactly, with weights on any scale.
Harmonic Mean Calculator
Compute the harmonic mean exactly - the right average for rates measured against a fixed numerator.
- Free
- No sign-up
- Runs in your browser
Input
6 characters
Separate with commas, spaces or new lines. A column pasted from a spreadsheet works. Processed in your browser.
Ready
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Enter the values. The harmonic mean is exact, since it involves no roots.
Questions about Harmonic Mean Calculator
When is the harmonic mean the right average?
For rates over a fixed numerator. Driving two equal distances at 30 and 60 km/h averages 40 km/h, not 45 - because you spend twice as long on the slow stretch. The harmonic mean gives 40. The same applies to averaging prices per unit when spending equal amounts, and to the F1 score in machine learning, which is the harmonic mean of precision and recall.
Why does it penalise small values so heavily?
Because it works with reciprocals, and a small value has a large reciprocal that dominates the sum. That is usually the point: the F1 score uses it so that a model with 99% precision and 1% recall scores about 2%, not 50%.
Why are zero and mixed signs refused?
The reciprocal of zero is undefined, so a zero makes the mean undefined. Mixing positive and negative values lets the reciprocals cancel, producing a result outside the range of the data - which is not an average.
Is my data sent anywhere?
No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.
Does the Harmonic Mean Calculator work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Harmonic Mean Calculator keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Compute the geometric mean - the right average for growth rates and ratios - reported exactly where it is exact.
Find the arithmetic mean of a list of numbers exactly, with no floating-point drift in the sum.
Evaluate an expression with exact fraction arithmetic, trigonometry, logarithms and factorials, reporting whether the result is exact.
Reduce a fraction to lowest terms, with its mixed number and exact decimal form including any repeating block.
Add two fractions exactly, showing the common denominator step and reducing the result.
Subtract one fraction from another exactly, showing the common denominator step.
Multiply two fractions exactly, multiplying across and reducing the result.