Advertisement
Descriptive Statistics

Harmonic Mean Calculator

Use this calculator to find the harmonic mean of a set of positive values. Enter your data values and click Calculate to get instant results with a clear step-by-step solution.

Enter positive numbers only. Separate values using commas, spaces, tabs, or line breaks.

How to Use the Harmonic Mean Calculator

This calculator provides a quick way to find the harmonic mean for a set of positive values. To use the calculator:

  1. Enter your data values in the input box. Make sure to separate the values using commas, spaces, tabs, or line breaks. You can also paste values directly from Excel, Google Sheets, or text documents
  2. Click Calculate.

The calculator will instantly return the harmonic mean for your data and show you exactly how the value was obtained using this data. Therefore, this tool ensures you not only get the correct answer but also learn how to find the harmonic mean manually.

What Is Harmonic Mean?

The harmonic mean is a type of average that is based on reciprocals. It is defined as the reciprocal of the arithmetic mean of the reciprocals of a given set of values.

The harmonic mean is useful when the values are rates, ratios, or quantities where “per unit” matters. For example, it is often used with speeds, rates of work, densities, financial ratios, and similar data.

Therefore, you should use the harmonic mean when you want to find the average for smaller values, which are assumed to have more influence on the final results.

Harmonic Mean Formula

For a dataset containing (n) values (where every value (x > 0)), the harmonic mean formula is:

Harmonic mean formula

Where:

  • HM is the harmonic mean.
  • xᵢ is each positive data value.
  • n is the total number of values.
  • Σ(1 / xᵢ) is the sum of the reciprocals of all values.

Sometimes, the Σ(1 / xᵢ) is written in expanded form. In this case, the formula becomes:

expanded harmonic mean formula

Note. This calculator uses the classical harmonic mean formula defined above. As such, all the data values should be non-zero and positive.

How to Calculate the Harmonic Mean

To calculate the harmonic mean manually:

  1. Count the number of values to get n
  2. Find the reciprocal of each value.
  3. Add the reciprocals.
  4. Apply the harmonic mean formula

Example 1

Find the harmonic mean of the following values:

12, 16, 18, 22, 17, 14, 8

Solution

To find the harmonic mean of the above data by hand, follow these steps:

Step 1: Count the number of values

From the dataset, there are 7 observations. Hence, n = 7

Step 2: Find the reciprocal of each value

The corresponding reciprocal for all the values in the dataset is:

1/12, 1/16, 1/18, 1/22, 1/17, 1/14, 1/8

Step 3: Add all the reciprocals

The sum of all the reciprocals is: Σ(1 / xᵢ) = 1/12 + 1/16 +1/18 +1/22 + 1/17 + 1/14 + 1/8

= 0.502096

Step 4: Apply the harmonic mean formula

By definition, the harmonic mean formula is: HM = n / Σ(1 / xᵢ)

Since n = 7 and Σ(1 / xᵢ) = 0.502096, we need to substitute the values into the formula and solve.

Substituting the values and solving, we get:

HM = 7/0.502096

= 13.94

Therefore, the harmonic mean for the data is HM = 13.94.

Want to confirm this result using the calculator? Just follow these steps:

  • Copy and paste the above values into the data input field
  • Click Calculate

The calculator instantly returns the harmonic mean as HM = 13.94157. It also provides a step-by-step solution, showing you exactly how this value was obtained.

Harmonic Mean for Two Numbers

For two positive numbers, x and y, the harmonic mean simplifies to:

HM = 2xy / (x + y)

For example, if the two values are 20 and 30, we can find the harmonic mean as follows:

HM = 2(20)(30) / (20 + 30)

= 1200 / 50

= 24

You can also confirm this result using the calculator. This shortcut method is only appropriate when working with two values. If working with more than two observations, use the general harmonic mean formula.

When to Use the Harmonic Mean?

The harmonic mean is commonly used for problems involving:

  • Average speeds over equal distances
  • Rates of work
  • Price-to-earnings ratios
  • Cost per unit
  • Population density
  • Parallel resistance-style calculations
  • Other “per unit” quantities

Tip. You should only use the harmonic mean when the values are rates and the denominator of the rate is the quantity being averaged over. If you have an ordinary dataset and want to find either the sample mean or the population mean, use the mean calculator.

You may also find these tools useful:

Frequently Asked Questions

What does this harmonic mean calculator do?

This calculator finds the harmonic mean of a set of positive values and shows the step-by-step solution.

What is the harmonic mean?

The harmonic mean is a type of average found by dividing the number of values by the sum of the reciprocals of the values.

What is the harmonic mean formula?

The formula is: HM = n / Σ(1 / xᵢ), where n is the number of values and xᵢ represents each data value.

Is harmonic mean the same as arithmetic mean?

No. The arithmetic mean adds values and divides by the number of values. The harmonic mean uses reciprocals.

Is the harmonic mean always smaller than the arithmetic mean?

For positive values, the harmonic mean is usually less than or equal to the arithmetic mean.

Can I enter negative numbers?

This calculator focuses on the classical harmonic mean used in introductory statistics. As such, it only works for positive values.

Advertisement
Joseph Mburu

About This Calculator

Prepared by Joseph Mburu · Updated on

Joseph is an applied statistician and data analyst with over 6 years of experience helping students, researchers, and professionals solve statistics and data analysis problems. He holds a degree in Applied Statistics and a Master’s degree in Data…

We aim to keep our calculators accurate, easy to use, and helpful for learning. Always check that your inputs match the assumptions of the method you are using.