Skip to content
Zesona
Harmonic Mean CalculatorLocal

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

Runs in your browser

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. 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.

Other tools you might reach for next.