Skip to content
Calcipedia
Harmonic Mean Calculator instructional illustration

Harmonic Mean Calculator

Calculate the harmonic mean of positive rates or per-unit values with reciprocal steps, formula substitution.

Last updated

Use this harmonic mean calculator when you need the right average for rates, ratios, or “per unit” values. It is the correct average for equal-distance speeds, equal-size unit prices, equal-capital valuation multiples, and other cases where each value is measured against the same denominator. The result includes step-by-step reciprocals plus harmonic, geometric, and arithmetic mean comparisons.

Enter only positive values. If the quantities are weighted unequally, this page gives you the plain harmonic mean, not the weighted harmonic mean.

Common use cases

Reading tip

The harmonic mean is right when each observation is a rate over the same denominator. If you are averaging equal times instead of equal distances, or unequal portfolio weights instead of equal capital, switch to a weighted method rather than using this result directly.

Average speed over the same outbound and return distance.

Harmonic mean

48

Across 2 positive values, the harmonic mean is 48.0000. It lands 4% below the arithmetic mean because smaller values contribute more heavily through their reciprocals.

50

Arithmetic mean

48.99

Geometric mean

2

Gap below arithmetic mean

2

Values

Dataset summary

Rate context

Minimum value40
Maximum value60
Reciprocal sum0.04
Average reciprocal0.02

Interpretation

There is a noticeable spread between the rates. Slower or smaller values are starting to dominate the real-world average, which is why the harmonic mean is lower than the arithmetic mean.

Scope

Use the harmonic mean when each observation is a rate or ratio over the same denominator, such as equal distance, equal quantity, or equal dollar allocation. If the weights differ, use a weighted average or weighted harmonic mean instead.

Mean comparison

For positive values, harmonic mean <= geometric mean <= arithmetic mean. Here that gives 48.0000 <= 48.9898 <= 50.0000, so the harmonic mean is the most conservative rate average.

Formula substitution

Calculator steps

HM = 2 / (1/60 + 1/40) = 48.0000

The same result is 1 divided by the average reciprocal: 1 / 0.02 = 48.

Reciprocal breakdown

Step by step

ValueReciprocalShare of reciprocal sum
600.0240.0%
400.0360.0%
← All Statistics calculators

Means & Rates

Harmonic mean calculator for rates, ratios, and per-unit averages

A harmonic mean calculator gives the right average when each input is a rate or ratio measured against the same denominator. Use it for average speed over equal distances, cost per unit across equal pack sizes, fuel economy over equal trips, or equal-dollar valuation multiples such as P/E ratios. This page also compares the harmonic mean with the arithmetic mean so you can see when smaller values are pulling the effective average down.

What this harmonic mean calculator tells you

The harmonic mean is the reciprocal of the arithmetic mean of reciprocals. In plain language, it finds the single steady rate that would produce the same total outcome as a collection of unequal rates. That makes it the correct average for many 'per unit' questions where each observation is tied to the same distance, quantity, or allocation base.

This harmonic mean calculator does more than return one number. It also shows the arithmetic mean for comparison, the reciprocal sum, the average reciprocal, and a reciprocal-by-reciprocal breakdown so you can see exactly why smaller values dominate the result.

Harmonic mean formula and reciprocal steps

For n positive values x1, x2, ..., xn, the formula is HM = n / (1/x1 + 1/x2 + ... + 1/xn). Each input is converted into a reciprocal first. That reciprocal step is what makes the harmonic mean sensitive to slower speeds, higher cost-per-unit values, or lower-efficiency observations.

Another way to view the same calculation is HM = 1 / average(1/x). The calculator shows that reciprocal average directly. If the reciprocals are large, the final harmonic mean must be smaller, which is why one slow trip segment or one expensive unit price can drag the effective average down so sharply.

HM = n / (1/x1 + 1/x2 + ... + 1/xn)

The standard harmonic mean formula for n positive values.

HM = 1 / average(1/x)

Equivalent form that emphasises the reciprocal-average interpretation.

HM(a, b) = 2ab / (a + b)

Two-value shortcut used in equal-distance speed examples and other two-rate problems.

Worked example: average speed over equal distances

The classic use case is average speed over the same outbound and return distance. If you travel one leg at 60 mph and the return leg at 40 mph, the arithmetic mean would be 50 mph, but that is not the true average speed. You spend more time travelling at 40 mph, so the slower segment deserves more weight.

Using the harmonic mean gives HM(60, 40) = 2 / (1/60 + 1/40) = 48 mph. That is the correct answer because the calculation is really based on total time for a fixed total distance. This is also the main reason many users search for a harmonic mean calculator after seeing an 'average speed' result that looks too high.

The opposite case is a common mistake: if you average rates across equal time blocks instead of equal distances, the arithmetic mean may be the right tool. The denominator matters. The harmonic mean is right only when each observation refers to the same base quantity.

Rates, ratios, and weighted harmonic mean use cases

The same logic applies beyond transport. If three products all contain the same quantity, their cost per unit should be averaged with the harmonic mean rather than the arithmetic mean. Fuel economy over equal-distance trips works the same way: the slower, less efficient leg takes more of the total resource budget, so it should have more influence.

In finance, analysts often use the harmonic mean for equal-dollar valuation multiples such as P/E ratios. The plain harmonic mean works when the capital allocation is equal across observations. If the weights are not equal, the correct extension is the weighted harmonic mean, given by sum(w) / sum(w/x). This calculator intentionally stays with the unweighted version, so it is best used when the denominators or allocations are equal.

Weighted HM = sum(w) / sum(w/x)

Use this form when the observations do not carry equal weights.

How to interpret the result and when not to use it

The harmonic mean is always less than or equal to the arithmetic mean, with equality only when all the inputs are identical. A small gap between the two means tells you the rates are fairly similar. A large gap tells you the smaller values are doing most of the work in the reciprocal sum, which usually means they dominate the real-world constraint you care about.

Do not use the harmonic mean for arbitrary measurements just because it returns a number. If the values are not rates or ratios over a common denominator, the arithmetic mean or geometric mean may be the correct summary instead. Zero and negative values are also outside scope because the reciprocal step breaks down or loses the physical interpretation the harmonic mean relies on.

The harmonic mean also appears in machine learning through the F1 score, where it balances precision and recall. That is another example of the same core idea: the final score stays low unless both component rates are high.

Harmonic mean vs arithmetic mean vs geometric mean

A common search question is whether to use a harmonic mean calculator, an arithmetic average, or a geometric mean calculator. The short answer is that the data type decides the average. Use the arithmetic mean for additive measurements, the geometric mean for multiplicative growth factors, and the harmonic mean for rates or ratios tied to the same denominator.

For positive values, the three means follow the order harmonic mean <= geometric mean <= arithmetic mean. Seeing all three beside the harmonic mean result helps you judge how much the slower, smaller, or more expensive observations are controlling the effective rate. When the three means are nearly identical, the dataset is balanced. When the harmonic mean sits much lower, the reciprocal-average effect is important.

This is why a harmonic average calculator can be more useful than a plain average calculator for per-unit questions. It does not simply describe the middle of the entered numbers; it estimates the steady rate that would produce the same total effect under equal-distance, equal-quantity, or equal-allocation assumptions.

How to calculate harmonic mean by hand

To calculate harmonic mean by hand, first count the positive values. Next, convert each value to its reciprocal, add those reciprocals together, and divide the count by that reciprocal sum. For 60 and 40, the reciprocal sum is 1/60 + 1/40, so the harmonic mean is 2 divided by that sum.

The calculator mirrors those steps in the reciprocal breakdown table. The 'share of reciprocal sum' column is especially useful because it shows which input is driving the final result. In rate problems, the smaller rate usually owns the largest reciprocal share and therefore pulls the harmonic mean downward.

Frequently asked questions

Why is the harmonic mean lower than the arithmetic mean?

The harmonic mean gives more weight to smaller values because it works through reciprocals. In a speed example, the slower leg takes more time, so it deserves more influence over the true average than the faster leg. That is why the harmonic mean usually lands below the arithmetic mean unless every value is identical.

When should I use the harmonic mean?

Use the harmonic mean when averaging rates or ratios over the same denominator. Common examples include average speed over equal distances, equal-size unit prices, fuel economy across equal-distance trips, and equal-dollar P/E comparisons. If the observations carry different weights, unequal distances, or unequal quantities, move to a weighted average or weighted harmonic mean instead of using this unweighted calculator directly.

Why can the harmonic mean not include zero or negative values?

A zero value makes the reciprocal 1/x undefined, so the formula breaks immediately. Negative values are also problematic because they usually do not fit the physical interpretation of rates, prices, efficiencies, or quantities being averaged, and they can make the reciprocal sum mathematically misleading even when a numeric answer exists. In practice, a harmonic mean calculator should only be used with strictly positive inputs.

What is the F1 score and why does it use the harmonic mean?

In machine learning, the F1 score balances precision and recall using the harmonic mean: F1 = 2PR / (P + R). That choice is deliberate because the score stays low unless both component rates are high. A model with excellent precision but weak recall should not look strong overall, and the harmonic mean punishes that imbalance more appropriately than the arithmetic mean would.

What is the difference between harmonic mean and geometric mean?

The harmonic mean averages rates or ratios over a shared denominator by using reciprocals. The geometric mean averages multiplicative values such as growth factors or investment returns. For positive inputs, the harmonic mean is always less than or equal to the geometric mean, and the geometric mean is less than or equal to the arithmetic mean.

Can I use the harmonic mean calculator for average speed?

Yes, when each speed covers the same distance. For example, an outbound trip at one speed and a return trip over the same distance should use the harmonic mean because the slower leg takes more time. If each speed applies for the same amount of time instead, use the arithmetic mean.

How do I calculate the weighted harmonic mean?

Use the weighted harmonic mean formula sum(w) / sum(w/x), where x is each positive rate and w is its weight. This page calculates the unweighted harmonic mean, so it is best for equal-distance, equal-quantity, or equal-allocation cases. Use a weighted method when distances, quantities, exposure times, or investment weights differ.

Also in Statistics

You may also need

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.