With this harmonic mean calculator, simply type in the numbers you want to average, and the result appears immediately. You can enter up to 30 numbers — new boxes appear as you type. 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 find the harmonic mean of 3, 4, 6, and 12:
- Type the first value into the first box: in our case it is 3.
- Enter the remaining values in the next boxes. Four boxes are available at the beginning, but you can enter up to 30 numbers — the boxes appear as you type.
- We see that the harmonic mean of 3, 4, 6, and 12 is equal to 4.8.
You can also switch the value type to a plain number, a currency (USD, RUB, EUR, GBP and 20+ more), US imperial units, or metric units — the formula works the same regardless of the unit.
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. It is especially useful when averaging rates or ratios, because it gives greater weight to smaller values and reduces the impact of large outliers.
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, the harmonic average is n / s = 3 / ¾ = 4.
Harmonic mean formula
Formally, the harmonic mean of n positive numbers x₁, x₂, …, xₙ is defined as:
H = n / (1/x₁ + 1/x₂ + … + 1/xₙ)
This can be rewritten as the reciprocal of the arithmetic mean of the reciprocals:
H = n / Σ(1/xᵢ) = 1 / [ (1/n) · Σ(1/xᵢ) ]
Because it relies on reciprocals, the harmonic mean is defined only for non-zero numbers, and in practice for strictly positive values.
Harmonic average of two or three numbers
For just two numbers a and b, the harmonic mean formula simplifies nicely to twice their product divided by their sum:
H = 2ab / (a + b)
For three numbers a, b, and c, it becomes:
H = 3abc / (ab + bc + ca)
For example, the harmonic mean of 2 and 8 is 2·(2·8)/(2+8) = 32/10 = 3.2.
Relation to other means
The three classical Pythagorean means always satisfy the same ordering for any set of positive numbers — the harmonic mean is the smallest and the arithmetic mean is the largest:
harmonic mean ≤ geometric mean ≤ arithmetic mean
They are only equal when every number in the list is identical. There is also an elegant identity: the geometric mean is the geometric mean of the harmonic and arithmetic means:
G = √(H × A)
| Harmonic mean | Arithmetic mean | |
|---|---|---|
| Definition | n divided by the sum of the reciprocals. | The sum of n values divided by n. |
| Formula | n / Σ(1/xᵢ) | (x₁ + … + xₙ) / n |
| Works with | Positive numbers only | Any real numbers |
| Best for | Rates, speeds, ratios, price/earnings-style figures | Quantities that add up, symmetric data |
Weighted harmonic mean
When each value xᵢ carries a weight wᵢ (for example, different amounts of money invested at different prices), you use the weighted harmonic mean:
H = (w₁ + w₂ + … + wₙ) / (w₁/x₁ + w₂/x₂ + … + wₙ/xₙ)
When all the weights are equal, this reduces to the ordinary (unweighted) harmonic mean that this calculator computes.
Some applications
The harmonic mean shows up whenever you average quantities defined as rates or ratios:
- Average speed over equal distances — if you drive one mile at 30 mph and another at 60 mph, your average speed is the harmonic mean, 40 mph, not the arithmetic mean of 45 mph.
- Finance — the weighted harmonic mean is used to average price-to-earnings (P/E) ratios across a portfolio.
- Machine learning — the F₁ score is the harmonic mean of precision and recall.
- Electronics and physics — the total resistance of resistors in parallel, or capacitors in series, is related to the harmonic mean of the individual values.
FAQs
What is the harmonic mean of 3, 4, 6, and 12?
Add the reciprocals: 1/3 + 1/4 + 1/6 + 1/12 = 10/12 = 5/6. There are 4 numbers, so H = 4 / (5/6) = 24/5 = 4.8.
Why must the harmonic mean use positive numbers?
The harmonic mean depends on the reciprocals 1/x of the values. A zero has no reciprocal, and mixing positive and negative numbers can make the reciprocal sum vanish or turn negative, giving a meaningless result. For that reason the harmonic mean is defined only for strictly positive values.
When should I use the harmonic mean instead of the arithmetic mean?
Use the harmonic mean when you are averaging rates or ratios that share the same numerator — such as speeds over equal distances, or prices per unit — and when you want smaller values to have more influence and large outliers to have less.
Can I compute the harmonic mean of currency or measurement values?
Yes. Choose the Currency option for 25 world currencies including USD, RUB, EUR, GBP, JPY, INR, BRL, and CAD, or pick US imperial (in, ft, lb, gal…) or metric (mm, cm, kg, L…) units. The formula works the same regardless of the unit.
How many numbers can I enter?
You can enter up to 30 numbers. New input fields appear automatically as you fill out the form, and a live preview shows the harmonic and arithmetic means as you type.