Harmonic Mean Calculator

Written by:

Here is a harmonic mean calculator or harmonic average calculator, which will calculate the harmonic mean of a list of numbers you input. Enter any numbers – including decimals, negatives, and fraction – and the tool will return the average.

Harmonic Mean Calculator

What is the Harmonic Average or Harmonic Mean?

The harmonic mean or average of a set of numbers is a number which represents or describes the central tendency of the group by dividing the length of the number list by the sum of the reciprocals of the list. It's sometimes (rarely) also called the subcontrary mean.

The harmonic mean is useful when there is a fixed container or quantity, and things are described with various rates. The canonical useful example is a fixed distance with various speeds over a trip and its return.

However, many other problems work in a similar way: the rate to fill or empty a container, for example. Relevant to this site's concentration on investing, you also use the harmonic mean when averaging ratios (such as Price to Earnings or Price to Book) over a fixed portfolio size.

Formula for Harmonic Mean

The formula for the arithmetic mean is:

harmonic\ mean = \frac{n}{\frac{1}{x_1}+\frac{1}{x_2}+\frac{1}{x_3}...+\frac{1}{x_{n}}}

Or written in another way (with reciprocals):

harmonic\ mean = (\frac{x_1^{-1}+x_2^{-1}+x_3^{-1}...+x_n^{-1}}{n})^{-1}

In the formula:

  • n: The length of your list of numbers
  • x_1, x_2, etc.: The terms/numbers you're averaging

Example Harmonic Mean Calculation: Speed

Let's say you took a trip to a city 50 miles away. On the way there, you drove 53 miles per hour the entire time. On the way back, you drove 31 miles per hour the whole way. What was your average speed?

average\ speed=\frac{2}{\frac{1}{53}+\frac{1}{31}}\\\approx\frac{2}{0.018867+0.032258}\\\approx\frac{2}{0.051126}\approx39.12

You averaged 39.12 miles per hour on your trip. If you took the arithmetic average – (53+31)/2 – you would have gotten a misleading average speed of 42.

Example Harmonic Mean Calculation: Investment Ratio

Let's say that you invest in 3 companies in your portfolio:

  • 20% in a company with a 200 Price to Sales Ratio
  • 40% in a company with a 20 Price to Sales Ratio
  • 40% in a company with a 4 Price to Sales Ratio

Now, note that you have "1" portfolio; everything in this problem are scaled to "1" as a whole. Here's the math:


Your average Price to Sales ratio exposure is around 8.26. Let's look at the wrong result using the (weighted to 1) geometric average now:

wrong\ price/sales\ average=(.2*200)+(.4*20)+(.4*4)\\wrong\ price/sales\ average=49.6

So if you used the geometric average incorrectly, you'd calculate your price to sales exposure at 49.6.

Using the Harmonic Average Calculator

In the text box at the top, enter a list of numbers to average using the harmonic mean. When done, hit the Compute Harmonic Mean button below and we'll find the harmonic average.

Next, try the geometric mean calculator. Next, visit our other calculators and tools.



PK started DQYDJ in 2009 to research and discuss finance and investing and help answer financial questions. He's expanded DQYDJ to build visualizations, calculators, and interactive tools.

PK lives in New Hampshire with his wife, kids, and dog.

Don't Quit Your Day Job...

DQYDJ may be compensated by our partners if you make purchases through links. See our disclosures page. As an Amazon Associate we earn from qualifying purchases.
Sign Up For Emails
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram