Math

Harmonic Mean Calculator

Calculate the harmonic mean of a set of numbers, the correct average for rates and ratios. Compares it with the arithmetic and geometric means.

Last reviewed by the Radiatus Cloud team

Find the harmonic mean, the right average for rates like speed and price-to-earnings ratios.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Calculate the harmonic mean

The harmonic mean is a type of average best suited to rates and ratios. It is calculated as the number of values divided by the sum of their reciprocals. Unlike the ordinary arithmetic mean, the harmonic mean gives more weight to smaller values, which makes it the correct choice when you are averaging quantities expressed as something per unit, such as speeds over equal distances or prices per share.

This calculator requires all values to be positive, since reciprocals of zero or negative numbers would break the formula, and it displays the arithmetic and geometric means alongside for comparison.

When to use the harmonic mean

A classic example is average speed over a round trip: if you drive one way at forty and back at sixty over the same distance, the true average speed is the harmonic mean, forty-eight, not the arithmetic mean of fifty. Finance uses the harmonic mean to average valuation ratios, and some performance metrics, such as the F1 score, are harmonic means by design.

For any set of positive numbers the harmonic mean is always less than or equal to the geometric mean, which is in turn less than or equal to the arithmetic mean, a relationship the tool notes. All calculation runs locally in your browser.

Related tools

  • Percentage Calculator — Calculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
  • Statistical Calculator — Calculate mean, median, mode, standard deviation, and more.
  • Probability Calculator — Calculate probabilities for single and combined events, including conditional probability and Bayes' theorem.
  • Scientific Calculator — Perform advanced mathematical operations including trig, log, and exponents.

Frequently Asked Questions

What is the harmonic mean?

It is the count of the values divided by the sum of their reciprocals. It is the right average for rates and ratios over equal units.

When should I use it instead of a normal average?

Use it when averaging rates measured over the same base, such as speeds over equal distances, where the arithmetic mean would overstate the result.

Why must all numbers be positive?

The formula sums the reciprocals of the values. Zero has no reciprocal and negatives make the result meaningless, so only positive numbers are allowed.

How does it compare to the arithmetic mean?

The harmonic mean is always less than or equal to the geometric mean, which is less than or equal to the arithmetic mean, with equality only when all values are the same.

Is the F1 score a harmonic mean?

Yes. The F1 score used in statistics and machine learning is the harmonic mean of precision and recall.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Enter positive numbers separated by commas, spaces or new lines.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.