Author: Oscar Cronquist Article last updated on May 10, 2023

How to use the HARMEAN function

What is the HARMEAN function?

The HARMEAN function lets you calculate the harmonic mean in Excel. The harmonic mean is a measure of the average rate of change.

How is the harmonic mean calculated?

It is calculated by is calculated by dividing the number of values by the reciprocal of each value

For example, calculating the harmonic mean from numbers 2, 4, and 8 equals approx. 3.429

Here is how: 1/(1/2+1/4+1/8) equals approx. 3.429

To calculate the harmonic mean by hand use this formula:

How to calculate the harmonic mean by hand

H - harmonic mean
x1, x2, ..., xn - are the numbers
n is the number of values

What is the difference between the harmonic mean and the arithmetic mean (average)?

The difference between the harmonic mean and the arithmetic mean is that the harmonic mean is calculated by dividing the number of values by the reciprocal of each value, whereas the arithmetic mean is calculated by dividing the sum of all values by the number of values.

Divide 1 by the number to get the reciprocal of a number. Example the reciprocal of 4 is 1/4.

The AVERAGE function lets you calculate the arithmetic mean in Excel.

When to calculate the harmonic mean?

The harmonic mean is often the most useful measure for rates and ratios. It gives greater weight to smaller values in a given data set.

1. HARMEAN Function Syntax

HARMEAN(number1, [number2], ...)

2. HARMEAN Function Arguments

Argument Description
number1 Required. A single numerical value or a cell reference to multiple numerical values.
[number2] Optional. Up to 254 additional arguments.

Text, logical values and empty cells are ignored.

The HARMEAN function returns

  • #NUM! error value if number is less than or equal to 0 (zero).

3. HARMEAN Function Example - weighted harmonic mean

Weighted harmonic average

A car travels at 10 mph (miles per hour) for 1 mile, 30 mph for 5 miles, and 50 mph for 2 miles. The total distance is 8 miles. What is the average speed?

The formula for calculating the distance:
Distance = Speed x Time

This gives us:
Speed = Distance / Time

The total distance is 1 + 5 + 2 equals 8.

The time it takes to travel a distance is calculated like this:
Time = Distance / Speed

The harmonic weighted average is (1+5+2)/(1/10 + 5/30 + 2/50)

becomes

8/(23/75)

becomes

600/75

equals approx. 26.09 mph.

Back to top