Using the Harmonic Mean Calculator

Input your numbers into the calculator boxes provided. Start with the first value; additional input fields appear automatically as you type, supporting up to 30 entries. For example, to find the harmonic mean of 3, 4, 6, and 12, enter each number sequentially. The result displays immediately without needing to press a button.

This approach is especially useful when working with large datasets or when you need rapid recalculation as values change. The calculator handles the reciprocal arithmetic internally, eliminating manual computation errors.

The Harmonic Mean Formula

The harmonic mean is defined as the reciprocal of the arithmetic mean of reciprocals. For n positive numbers, the formula is:

H = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)

H = (∑ᵢ₌₁ⁿ 1/xᵢ / n)⁻¹

  • H — The harmonic mean
  • n — Total count of numbers in the dataset
  • x₁, x₂, ..., xₙ — Individual values in the dataset

Harmonic Mean for Two and Three Numbers

Two numbers: For simplicity, the formula reduces to H = (2 × x × y) ÷ (x + y). If x = 2 and y = 8, then H = 32 ÷ 10 = 3.2.

Three numbers: The relationship becomes H = (3 × x × y × z) ÷ (xy + yz + zx). For x = 2, y = 5, and z = 10, the result is H = 300 ÷ 80 = 3.75.

These simplified formulas allow mental or quick manual calculation without needing the general n-term formula.

How It Compares to Other Means

Three primary averages exist: arithmetic, geometric, and harmonic. For any positive dataset, the harmonic mean is always the smallest, followed by the geometric mean, then the arithmetic mean. This ordering reflects how each type weights smaller values—the harmonic mean weights them most heavily.

The harmonic mean equals the reciprocal of the arithmetic mean of the reciprocals. For two numbers only, you can also express it as H = G² ÷ A, where G is the geometric mean and A is the arithmetic mean.

Key Considerations When Using Harmonic Mean

Avoid common pitfalls when selecting the harmonic mean for your analysis.

  1. Zero or negative values invalidate the harmonic mean — The harmonic mean requires all positive numbers. A single zero makes the calculation undefined, and negative values produce mathematically inconsistent results. Always verify your dataset contains strictly positive values.
  2. Harmonic mean weights small values disproportionately — If your dataset includes outliers or very small numbers, the harmonic mean can become unexpectedly low. This isn't a bug—it's the intended behaviour. Use it deliberately when small values matter most, such as in averaging rates.
  3. Use weighted harmonic mean for non-uniform importance — When dataset entries carry different significance, apply weights to each value. The weighted formula allocates influence proportionally, making it essential for financial indices and portfolio averages where components have different magnitudes.

Frequently Asked Questions

When should I use the harmonic mean instead of the arithmetic mean?

The harmonic mean is ideal for datasets involving rates, speeds, ratios, or reciprocal quantities. Classic examples include calculating average speed over a fixed distance (not time), price-to-earnings ratios in finance, and efficiency ratings. If your data represents 'per unit' measurements—miles per hour, earnings per dollar invested—the harmonic mean provides the correct average. The arithmetic mean would give a misleading result in these contexts.

How does the harmonic mean differ from the geometric mean?

Both the harmonic and geometric means are less influenced by extreme values than the arithmetic mean, but they rank differently. The harmonic mean is always smallest or equal, followed by the geometric mean, then the arithmetic mean. The harmonic mean emphasizes smaller values most strongly, making it suited for rates. The geometric mean is preferable for data with multiplicative relationships, such as investment returns across periods or exponential growth rates.

Can the harmonic mean be greater than the arithmetic mean?

No. For any set of positive numbers, the harmonic mean is always less than or equal to the arithmetic mean. Equality occurs only when all numbers in the dataset are identical. This relationship is a fundamental mathematical property and helps you verify calculations: if your harmonic mean exceeds the arithmetic mean, an error has occurred.

What is the weighted harmonic mean and when is it used?

The weighted harmonic mean assigns different importance levels to each value via weights. The formula divides the sum of weights by the sum of weight-divided-by-value terms. It's essential in finance for computing index P/E ratios when constituent stocks have different market capitalizations, and in any scenario where data points represent aggregated groups of unequal size. Unweighted means treat all entries equally, which is incorrect when underlying populations differ.

Why is the harmonic mean important in physics?

Average speed calculations illustrate its necessity. If you drive 60 km at 30 km/h and then 60 km at 60 km/h, your overall average speed is the harmonic mean of 30 and 60, which equals 40 km/h—not 45 km/h. The arithmetic mean fails because you spend different amounts of time at each speed. Conversely, if you travel for equal time periods at both speeds, the arithmetic mean is correct.

How do I calculate the harmonic mean manually for a small dataset?

For n numbers, follow three steps: (1) Find the reciprocal of each number (1 ÷ value). (2) Sum all reciprocals. (3) Divide n by that sum. Example: harmonic mean of 3, 4, and 6 is 3 ÷ (1/3 + 1/4 + 1/6) = 3 ÷ 0.75 = 4. This method works well for 2–4 numbers; beyond that, a calculator becomes practical.

More math calculators (see all)