# Harmonic Mean Calculator

URL: https://speedycalculator.com/calculators/math/harmonic-mean/
Last updated: 2026-10-30

> The harmonic mean calculator finds the reciprocal of the average of the reciprocals of up to 30 positive numbers – the correct average for rates such as speeds and prices per unit.

## Inputs

- Values (positive numbers)

## Results

- Harmonic mean
- Arithmetic mean
- Geometric mean

## Formula

```
H = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)
```

## Explanation

If you drive to work at 60 km/h and back at 40 km/h, your average speed is not 50 km/h but the harmonic mean, 48 km/h, because you spend longer at the slower speed. The harmonic mean is also used for P/E ratios and the F1 score in machine learning.

### How to use the Harmonic Mean Calculator

- Type the numbers separated by commas, spaces or new lines.
- Read the result – it updates as you type.

Results update as you type, and everything is calculated in your browser.

### How it works

The calculator takes the reciprocal of each value, averages them and takes the reciprocal of the result. All values must be positive.

### What each result means

- **Harmonic mean** = hmean([Values (positive numbers)])
- **Arithmetic mean** = mean([Values (positive numbers)])
- **Geometric mean** = gmean([Values (positive numbers)])

## Worked example

Inputs — Values (positive numbers): 60, 40.

Results — **Harmonic mean = 48**; Arithmetic mean = 50; Geometric mean = 48.98979486.

## Key terms

- **Harmonic mean**: The reciprocal of the mean of the reciprocals.

## FAQ

**When should I use the harmonic mean?**
When averaging rates over equal distances or amounts, such as speeds over equal distances.

**Why is the average speed 48 km/h, not 50?**
You spend 1.5 times as long at 40 km/h as at 60 km/h.

**Can the harmonic mean be larger than the arithmetic mean?**
No, it is always less than or equal to it.

**What is the harmonic mean of two numbers?**
2ab/(a + b).


## Sources

- [OpenStax – Prealgebra 2e](https://openstax.org/details/books/prealgebra-2e)
- [Wolfram MathWorld – Harmonic mean](https://mathworld.wolfram.com/HarmonicMean.html)
