Harmonic Mean Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: harmonic means for rates and speeds

The harmonic mean averages positive rates, speeds, and ratios by working with their reciprocals rather than adding the values directly. It is one of the three classical means, alongside the arithmetic mean and geometric mean, and is useful for measures such as km/h, items per hour, and cost per unit.

For a list of positive rates, the harmonic mean gives more influence to smaller values than to larger ones. That behavior reflects a practical reality: a slow portion of a trip or process can consume substantially more time than an equally sized fast portion saves.

Common harmonic-mean uses include:

This harmonic mean calculator applies the reciprocal-average calculation to the comma-separated positive values you enter, then displays one result for your list.

Harmonic mean formula for positive values

For harmonic-mean inputs consisting of n positive numbers:

x1, x2, …, xn

The harmonic mean H is defined as:

H = n / (1/x1 + 1/x2 + … + 1/xn)

To calculate a harmonic mean, you:

  1. Take the reciprocal of each value (for example, turn 40 into 1/40).
  2. Add all those reciprocals together.
  3. Divide the number of values, n, by that sum.

This is the formal expression used by the harmonic mean calculation:

H = n i = 1 n 1 x i

In this harmonic mean formula:

How to use this harmonic mean calculator

To calculate the harmonic mean of your rates, speeds, or other positive values with this tool:

  1. Enter your positive numbers into the input box, separated by commas. For example:
    40, 60, 80
  2. Use a dot for decimal values, such as 10.5 or 3.25.
  3. Do not include thousands separators; instead of 1,000, enter 1000.
  4. Click the button to compute the harmonic mean.
  5. Read the result, which is shown as a single number. You can copy this value for use in other tools or documents.

The harmonic mean calculator requires strictly positive inputs. A zero, negative value, or nonnumeric entry does not produce a meaningful harmonic mean; verify the list if the tool shows an error or an unexpected result.

Worked example: harmonic mean speed over equal distances

A harmonic mean gives the correct average speed when a trip covers equal distances at different speeds.

Imagine you drive:

Many people might think the average speed is just the arithmetic mean:

(40 + 60) / 2 = 50 km/h

However, this is incorrect for average speed when distances are the same but speeds differ, because you spend more time traveling at the lower speed. The correct measure is the harmonic mean:

H = 2 / (1/40 + 1/60)

Compute the reciprocals and sum:

Now divide n = 2 by this sum:

H = 2 / 0.0416667 ≈ 48 km/h

So the average speed across the full equal-distance trip is 48 km/h, not 50 km/h. The harmonic mean captures the extra time spent at 40 km/h.

Interpreting a harmonic mean result

A harmonic mean result is most informative when you compare it with the arithmetic and geometric means of the same positive values. If the values are not all equal, their ordering is:

harmonic mean ≤ geometric mean ≤ arithmetic mean

For harmonic-mean data, this ordering has practical meaning:

For appropriately weighted rates and ratios, the harmonic mean describes performance across repeated equal portions. An arithmetic mean can look overly favorable because it treats every listed rate equally instead of accounting for the greater reciprocal effect of slower rates.

Comparison of harmonic, geometric, and arithmetic means

This comparison places the harmonic mean alongside the other common means for positive data, helping you choose the average that matches the relationship in your data.

Type of mean Formula (for x1, …, xn > 0) Best suited for Effect of small values
Harmonic mean H = n / (1/x1 + … + 1/xn) Averaging rates, speeds, and ratios when the underlying quantity (like distance or quantity purchased) is held equal. Small values have a strong effect and pull the mean down sharply.
Geometric mean G = (x1 × x2 × … × xn)^(1/n) Averaging growth factors, returns, or multiplicative effects (e.g., investment returns over time). Small values influence the mean, but less strongly than with the harmonic mean.
Arithmetic mean A = (x1 + x2 + … + xn) / n Simple averages of quantities that add directly, like test scores or total amounts. Each value contributes linearly; small values do not receive any extra weight.

Another related measure is the root mean square (RMS), also known as the quadratic mean. It is always greater than or equal to the arithmetic mean and is used when magnitude matters, such as RMS voltage or statistical errors. RMS does not answer the same reciprocal-averaging question as the harmonic mean, but comparing these measures clarifies how the choice of average emphasizes different features of a data set.

Harmonic mean assumptions and limitations

The harmonic mean calculator is useful only when its reciprocal-average assumptions fit the values you provide. Keep these harmonic-mean limitations in mind:

Before using a harmonic mean result, confirm that the entries are positive rates or ratios with an equal underlying amount. If they are not, an arithmetic mean, geometric mean, or a weighted calculation may be a better fit.

Practical tips for using a harmonic mean result

When applying the harmonic mean shown by this calculator to your own rates or speeds:

When the equal-portion condition is satisfied, the harmonic mean offers a realistic summary of rates and ratios by reflecting the influence of slower or lower-rate observations.

Enter numbers separated by commas.

Status messages will appear here.

Arcade Mini-Game: Harmonic Mean Calculator Calibration Run

Use this quick arcade run to distinguish valid comma-separated harmonic-mean values from bad assumptions before relying on a reciprocal-average result.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch valid harmonic-mean inputs and avoid unsuitable assumptions.