Omni Calculator logo

Harmonic Mean Calculator

Created by Anna Szczepanek, PhD
Reviewed by Bogna Szyk and Jack Bowater
Last updated: Apr 26, 2024


To use this harmonic mean calculator, simply type in the numbers which you want to calculate the harmonic mean of, and the result will appear immediately. Keep reading if you are wondering what the harmonic mean is or how to calculate it by hand. Apart from the harmonic average definition, we also explain the relationship between the arithmetic and harmonic mean, as well as give the formula for the weighted harmonic mean.

How to calculate the harmonic mean with our calculator?

Let's try to find the harmonic mean of 3, 4, 6, and 12:

  1. Type the first value into the first box: in our case it is 3.
  2. Enter the remaining values in the next three boxes. Eight boxes are available at the beginning, but you can enter up to 30 numbers — the boxes will appear as you type.

We see that the harmonic mean of 3, 4, 6, and 12 is equal to 4.8.

What is the harmonic mean?

The harmonic mean is one of the three most popular types of average, along with the well-known arithmetic and geometric means.

How to find the harmonic mean?

  • Count the numbers - let's say there are n of them.

  • Compute the reciprocal of each number — recall the reciprocal of x is just 1/x.

  • Add those reciprocals and denote the sum by s.

  • Calculate the harmonic mean by dividing n by s.

As an example, let us calculate the harmonic average of 3, 4, and 6:

  • There are three numbers, so n = 3
  • Let's take the reciprocals: ⅓, ¼, and ⅙
  • Hence, we have s = ⅓ + ¼ + ⅙ = ¾ .
  • Finally, calculate the harmonic average:

n / s = 3 / ¾ = 4

Harmonic mean formula

Formally, the definition of the harmonic mean of n positive numbers, x₁, x₂, ..., xn is the following:

H=n1x1+1x2+1xn\small H = \frac{n}{\frac 1{x_1} + \frac 1{x_2} + \ldots \frac 1{x_n}}

This can be rewritten as:

H=ni=1n1xi=(i=1n1xin)1\small H = \frac{n}{\sum_{i=1}^n \frac 1{x_i}} = \left( \frac{\sum_{i=1}^n \frac 1{x_i}}{n} \right)^{-1}

🔎 If you want to compare this formula with formulas for other means, visit the following tools:

Harmonic average of two or three numbers

  • Two numbers

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

H = 2 × x × y / (x + y),

i.e., you need to double the product of x and y and divide it by the sum of x and y.

For instance, the harmonic mean of x = 2 and y = 8 is equal to:

H = 2 × 2 × 8 / (2 + 8) = 32 / 10 = 3.2

  • Three numbers

For three positive numbers x, y, and z, we have the following harmonic mean formula:

H = 3 × x × y × z / (x × y + y × z + z × x)

As an example, let's calculate the harmonic mean of x = 2, y = 5, and z = 10:

H = 3 × 2 × 5 × 10 / (2 × 5 + 5 × 10 + 10 * 2) = 300 / 80 = 15 / 4 = 3.75

Relation to other means

  1. The harmonic mean of x1, ... , xn is equal to the reciprocal of the arithmetic mean of 1/x1, ... , 1/xn.

  2. If there are only two numbers, you can compute the harmonic mean as the ratio of the geometric mean squared and the arithmetic mean: H = G2 / A.

  3. For any list of positive numbers, the harmonic mean exceeds neither the arithmetic and nor the geometric mean.

Weighted harmonic mean

Similarly to the weighted arithmetic average, the harmonic mean has a weighted variant. If we have a list of numbers x1, ... , xn and an associated list of weights w1, ... , wn, then the weighted harmonic mean is defined as:

H ⁣=i=1nwii=1nwixi=( ⁣i=1nwixi1i=1nwi ⁣) ⁣1\small H\! = \frac{\sum\limits_{i=1}^n w_i}{\sum\limits_{i=1}^n \frac{w_i}{x_i}} = \left(\!\frac{\sum\limits_{i=1}^n {w_i}{x_i}^{-1}}{\sum\limits_{i=1}^n w_i}\!\right)^{\!-1}

Some applications

  1. Geometry:

    • For any triangle, the radius of the incircle is one-third of the harmonic mean of the altitudes of the triangle.
  2. Finance:

    • The weighted harmonic mean is used to calculate the price/earnings ratio (P/E) of an index made of several stocks. See the price earnings ratio calculator for details.
  3. Physics:

    • Average speed: if you travel a certain distance at speed v₁, and then return (over the same distance!) at a speed v₂, then your average speed is the harmonic mean of v₁ and v₂. However, if you travel for a certain amount of time at a speed v₁ and then the same amount of time at a speed v₂, then your average speed is given by the arithmetic mean of v₁ and v₂!

    • Resistance: if you connect n resistors in parallel, then the effect is the same as if you had only one resistor, which has a resistance equal to n times the harmonic average of all of the resistor's resistances. However, if you connect those resistors in series, then the total effect is n times the arithmetic mean!

    • Capacitance: if you have capacitors connected in series — use the harmonic mean to compute the average capacitance. If you have capacitors in parallel — use the arithmetic mean.

Anna Szczepanek, PhD
Related calculators
Values (you may enter up to 30 numbers)
#1
#2
#3
#4
#5
#6
#7
#8
Check out 75 similar arithmetic calculators ➗
Absolute changeAbsolute valueAdding and subtracting fractions… 72 more
People also viewed…

Body fat

Use our free Body Fat Calculator, based on BMI, to determine your body fat percentage and explore your ideal body fat range.

Ideal egg boiling

Quantum physicist's take on boiling the perfect egg. Includes times for quarter and half-boiled eggs.

Multiplicative inverse modulo

Quickly find the inverse of modulus and learn how to find multiplicative inverse modulo with our easy-to-use calculator. What are you waiting for?

Rotation

Our rotation calculator implements this basic geometric transformation for up to ten points at the same time!
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service