Harmonic Mean Calculator

Type or paste positive numbers to get their harmonic mean. The result updates as you type.

Separate with commas, spaces or new lines

What you can type:

  • Lists: 4, 7 10; 12 is four numbers. Commas, spaces, new lines, tabs and semicolons all separate numbers.
  • Pasted columns: 4 ↵ 7 ↵ 10 pasted as a column from Excel, Google Sheets or a CSV file is three numbers.
  • Fractions: 7/10, 3/4 is 0.7 and 0.75. Write a mixed number such as 1 1/2 as 3/2 or 1.5.
  • Decimal commas: 1,5; 2,5 is 1.5 and 2.5. A comma is read as a decimal comma when the numbers are separated by spaces, semicolons or new lines and none uses a decimal point.
  • Thousands: 1,200, 1,500 is 1200 and 1500. Commas before groups of three digits are thousands separators when the numbers are also separated some other way.
  • Percent and currency signs: 12%, $40, €3.50 is 12, 40 and 3.5.
  • Exponents and minus signs: 1e3, −4 is 1000 and -4.
  • Anything else: Score: 4, 7 reads 4 and 7 and names “Score:” as ignored. Words, a header row or a date are never dropped silently: the line under the field names everything that was ignored.

↵ is a new line and ⇥ a tab.

Values used: 4, 7, 10, 8, 5, 9

4, 7, 10, 8, 5, 9

Harmonic mean 6.4588, 6 values.

Worked example for 4, 7, 10, 8, 5, 9.

Harmonic mean 6.4588

Arithmetic mean
7.1667
Geometric mean
6.822
Minimum
4
Maximum
10
Count
6
4710859410Harmonic mean 6.46471085941068▲ 6.46
Each dot is a value.
Show the steps

In the steps, “=” marks a result that is exact for the numbers shown, “≈” a rounded one.

  1. Add the reciprocals: 1/4 + 1/7 + 1/10 + 1/8 + 1/5 + 1/9 ≈ 0.928968
  2. Count the values: 6
  3. Divide the count by that sum: 6 ÷ 0.928968 ≈ 6.4588

Report a problem

Harmonic mean formula

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

The harmonic mean is the number of values divided by the sum of their reciprocals.

How to calculate the harmonic mean, for a drive to a town at 40 km/h and back along the same road at 60 km/h:

  1. Take the reciprocal of each value, 1 divided by the value: 1/40 and 1/60.
  2. Add the reciprocals: 1/40 + 1/60 = 3/120 + 2/120 = 5/120 = 1/24.
  3. Divide the number of values by that sum: 2 ÷ (1/24) = 48 km/h.

Example: average speed

The drive in the formula above, out at 40 km/h and back at 60 km/h, averages 48 km/h for the round trip, not 50, because the slower leg takes more time. Say the town is 120 km away:

120 km
Distance from home over time. The slow leg takes 3 of the 5 hours, so it counts for more in the average.

Example: average price per unit

You spend $60 on fuel at $2 a gallon and another $60 at $3 a gallon:

  1. The gallons you bought: 60 ÷ 2 = 30 and 60 ÷ 3 = 20, so 50 in all.
  2. The average price: $120 ÷ 50 = $2.40 a gallon.
  3. That is the harmonic mean of 2 and 3: 2 ÷ (1/2 + 1/3) = 2 ÷ (5/6) = 2.4, not the arithmetic mean of $2.50.

When to use the harmonic mean

If the distances or amounts are not equal, weight each rate by its distance or amount (a weighted harmonic mean), or simply divide the total distance by the total time.

Harmonic mean vs arithmetic mean vs geometric mean

The harmonic mean is pulled towards the smallest values, which is exactly right for rates: the slow leg of a journey takes the most time. The chart in the calculator marks all three means for your numbers; for speeds of 40 and 60 over equal distances:

The three means of 40 and 60
MeanWorked outResult
Arithmetic mean(40 + 60) ÷ 250
Geometric mean√(40 × 60)48.9898
Harmonic mean2 ÷ (1/40 + 1/60)48

Only the harmonic mean, 48 km/h, is the true average speed for the round trip. See how to choose the right mean for a side-by-side comparison.

Related calculators

For ordinary averages use the mean calculator; for growth rates use the geometric mean calculator.

Common questions

When should I use the harmonic mean?

Use it to average rates measured over the same amount of the thing in the numerator: speeds over equal distances, prices per unit for equal spend, or P/E ratios for equal investments.

Why is the average speed not the ordinary mean of the speeds?

Because you spend longer travelling at the slower speed, so it counts for more. Over equal distances the true average speed is the harmonic mean of the speeds, which is below their ordinary mean whenever the speeds differ.

Can the harmonic mean handle zero or negative numbers?

No. It uses the reciprocal of each value, and 1 ÷ 0 is undefined, so every value must be greater than zero.

Why is my harmonic mean smaller than expected?

The harmonic mean gives more influence to small values: one slow speed pulls the average down more than one fast speed pulls it up. For rates over equal distances or amounts that is the correct answer, because the slow parts take the most time.

How do I calculate this in Excel or Google Sheets?

Use =HARMEAN(A1:A10) with your own range; Google Sheets has the same function. Every value must be greater than zero: Excel returns the #NUM! error for a zero or a negative number.

How does the harmonic mean compare with the other means?

For positive numbers the harmonic mean is never larger than the geometric mean, which is never larger than the arithmetic mean. All three are equal only when the values are identical.

Cite this page

Harmonic Mean Calculator. https://meancalculator.com/harmonic-mean.html