# How to use the HARMEAN function

*What is the HARMEAN function?*

The HARMEAN function lets you calculate the harmonic mean in Excel.

**What is the harmonic mean?**

The harmonic mean is a type of average that is useful for rates and ratios. It is calculated by taking the reciprocals of the values, averaging them, and reciprocating the result.

It gives more weight to smaller values compared to the arithmetic mean. The harmonic mean is useful when averaging rates and ratios instead of direct values.

The harmonic mean is always less than or equal to the arithmetic mean for a dataset. It is sensitive to small values which can skew or bias the average. Applications for the harmonic mean are averaging speed, fuel efficiency, ratios, and rates.

*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:

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.

### Table of contents

## 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

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.

### Functions in 'Statistical' category

The HARMEAN function function is one of 74 functions in the 'Statistical' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form