Formula & Calculator

Harmonic Mean

Calculates the central tendency of a dataset by averaging the reciprocals, most appropriate for rates like speed over fixed distances.

StatisticsDescriptive StatisticsCentral Tendency

Harmonic Mean CalculatorHM = n / Σ(1/xᵢ)

HM = n / Σ(1/xᵢ)
HM = harmonic mean  ·  n = number of values  ·  Σ(1/xᵢ) = sum of reciprocals
⟹ SolveHM, n, Σ(1/x)
Please fix the errors above.
Solve for:
Presets:
Harmonic Mean
HM: n: S:
✓ Copied!
Harmonic Mean Gauge
Small (< 5) Medium (5–50) Large (> 50)
HM = n / Σ(1/xᵢ)  ·  Valid for positive values; used for rates and averages.

Interpretation

HM = n / Σ(1/xᵢ). Used for rates and averages of ratios (e.g., speed, efficiency). Favours small values. Used in physics and finance.

HM = n / Σ(1/xᵢ)
Harmonic Mean

Variables

SymbolQuantityUnit
HMHarmonic mean
nNumber of values
xᵢEach data value

What it means

The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the data. It is used when averaging rates (e.g., speed, price‑earnings ratios). It is always less than or equal to the geometric mean. It is particularly useful for averaging ratios with different denominators. In finance, it is used for P/E ratios; in physics, for parallel resistances; in geometry, for calculating average speed over equal distances. Understanding the harmonic mean is important for proper averaging in contexts where arithmetic mean would be misleading.

Worked example

Harmonic Mean – Two Examples

Real‑World
Scenario: A car travels at 60 km/h for half the distance and 40 km/h for the other half. Find the average speed (harmonic mean).
ParameterValue
Data60, 40
n2
1HM = 2 / (1/60 + 1/40) = 2 / (0.01667 + 0.025) = 2 / 0.04167 = 48.0 km/h
Result 48.0 km/h ✓ Average speed
Scenario: Three resistors of 10, 20, 30 Ω are in parallel. Find equivalent resistance (harmonic mean of 3 numbers, but note formula for parallel is not exactly HM; here we illustrate HM).
ParameterValue
Data10, 20, 30
n3
1HM = 3 / (1/10 + 1/20 + 1/30) = 3 / (0.1+0.05+0.03333) = 3 / 0.18333 = 16.36 Ω
Result 16.36 Ω ✓ Equivalent resistance
Insight: Harmonic mean is used for averaging rates or ratios. It is the reciprocal of the arithmetic mean of reciprocals.

Common mistakes

  • Harmonic mean: Used for rates and averages of ratios.
  • All data non‑zero: The harmonic mean requires all values to be non‑zero.
  • Positive values: Typically used with positive values.
  • Reciprocals: Sum the reciprocals of the data, then divide n by that sum.
  • Comparison: For the same data, HM ≤ GM ≤ AM (arithmetic mean).

Applications

The harmonic mean is the reciprocal of the arithmetic mean of reciprocals. It is used when averaging rates, ratios, or quantities that are inversely proportional to the variable of interest. Engineers use it for average speeds (when distances are equal), for hydraulic conductivity, and for parallel resistances in electronics. In finance, it helps in averaging price‑to‑earnings ratios. By using the harmonic mean, professionals can avoid over‑ or under‑estimation that would occur with arithmetic means in such contexts. It is particularly useful when the data involve rates or frequencies. Understanding the harmonic mean ensures that averages are computed appropriately for the problem at hand, improving the accuracy of engineering and financial analyses.

  • Average speed when distances are equal
  • Parallel circuit equivalent resistance
  • Hydraulic conductivity averaging (vertical flow)
  • Portfolio valuation – averaging price‑earnings ratios
  • Average rates of production or throughput

Frequently Asked Questions

Q01What is the harmonic mean and how is it computed?
A01

HM = n / Σ(1/xᵢ). It is the reciprocal of the arithmetic mean of the reciprocals. It is used for rates and ratios where the average of the rates is desired.

Q02When should you use the harmonic mean?
A02

Use it for average rates such as speed (distance/time), or when averaging per‑unit quantities like miles per gallon, or in finance for average price of multiple purchases.

Q03What is the harmonic mean of speeds for equal distances?
A03

If you travel the same distance at speeds v₁ and v₂, the average speed is the harmonic mean: 2 / (1/v₁ + 1/v₂). This is less than the arithmetic mean.

Q04How does the harmonic mean compare to the arithmetic mean?
A04

For positive data, the harmonic mean ≤ geometric mean ≤ arithmetic mean. The harmonic mean is the smallest of the three.

Q05Can the harmonic mean be used for zero values?
A05

No, if any value is zero, the reciprocal is infinite, making the harmonic mean undefined. All values must be positive.

Q06How is the harmonic mean used in finance?
A06

It is used to compute the average price when buying a fixed dollar amount of a stock at different prices (cost averaging). The harmonic mean gives the correct average cost per share.

Q07What is the harmonic mean of 4 and 6?
A07

HM = 2 / (1/4 + 1/6) = 2 / (0.25 + 0.1667) = 2 / 0.4167 = 4.8.

Q08How is the harmonic mean related to the F‑score in machine learning?
A08

The F1‑score is the harmonic mean of precision and recall: F1 = 2·(precision·recall)/(precision+recall). It balances both metrics.

Q09What are common pitfalls when using the harmonic mean?
A09

It is very sensitive to small values (since reciprocals are used). A single small value can drastically reduce the harmonic mean. It should only be used when the context calls for it.

Q10How do you compute the weighted harmonic mean?
A10

HM_w = (Σ wᵢ) / Σ (wᵢ / xᵢ). This generalises the harmonic mean to weighted data.