Top Leaderboard
Markets

Harmonic Mean

Ad — article-top

The harmonic mean is a type of average used especially for rates, ratios and other quantities expressed as “per unit” (for example, price-to-earnings (P/E) ratios or speeds). It is defined as the reciprocal of the arithmetic mean of the reciprocals of a data set. In symbols, for n positive numbers x1, x2, …, xn

Harmonic mean (H) = n / (1/x1 + 1/x2 + … + 1/xn)

Source: Investopedia — “Harmonic Mean” (Joules Garcia).

Key takeaways
– Use the harmonic mean when averaging ratios or rates (e.g., P/E ratios, speeds across equal distances).
– It gives more weight to smaller values and is the reciprocal of the arithmetic mean of reciprocals.
– A weighted harmonic mean exists: WH = (sum of weights) / (sum of weights divided by values).
– Cannot compute if any value = 0 (division by zero). Negative values are possible but interpretation may be problematic.
– The harmonic mean will always be ≤ geometric mean ≤ arithmetic mean (for positive data).

Formula and calculation (step-by-step)
1. List the n values x1, x2, …, xn you want to average.
2. For each value xi compute its reciprocal: 1/xi.
3. Sum the reciprocals: S = Σ (1/xi) for i = 1..n.
4. Divide the count n by that sum: H = n / S.

Worked example (simple numbers)
Values: 1, 4, 4
Step 1: reciprocals are 1/1 = 1, 1/4 = 0.25, 1/4 = 0.25
Step 2: sum of reciprocals = 1 + 0.25 + 0.25 = 1.5
Step 3: harmonic mean = 3 / 1.5 = 2

Weighted harmonic mean (practical formula)
If you have weights w1, w2, …, wn (positive), the weighted harmonic mean is

WH = (Σ wi) / (Σ wi/xi)

Often weights sum to 1; if so WH = 1 / (Σ wi/xi).

Practical example — averaging P/E ratios for an index
Two companies:
– Company A: P/E = 25, weight = 0.10 (10%)
– Company B: P/E = 250, weight = 0.90 (90%)

Weighted arithmetic mean (WAM): 0.1×25 + 0.9×250 = 2.5 + 225 = 227.5
Weighted harmonic mean (WHM): WHM = (0.1 + 0.9) / (0.1/25 + 0.9/250) = 1 / (0.1/25 + 0.9/250)
Compute denominators: 0.1/25 = 0.004; 0.9/250 = 0.0036; sum = 0.0076
WHM = 1 / 0.0076 ≈ 131.58

Interpretation: The weighted arithmetic mean severely overstates the “typical” P/E in this construction; the weighted harmonic mean reduces bias toward very large P/E values and is often preferred for averaging multiples.

When to use the harmonic mean
– Averaging rates or ratios when each observation corresponds to the same-sized “unit” (e.g., speeds for equal-distance trips, P/E ratios across companies when you want to equal-weight companies’ ratios).
– Averaging multiples like P/E across firms — many practitioners use the harmonic mean because it gives each company equal weight relative to the reciprocal (e.g., earnings yield).
– Situations where the quantity being averaged is of the form “quantity per unit” and you want to avoid overweighting large denominators.

When not to use it
– If the data include a zero (H is undefined).
– If values are negative and interpretation is unclear — negatives are mathematically possible but often indicate the mean is not meaningful.
– If you’re averaging raw values (use arithmetic mean) or multiplicative growth rates over time (use geometric mean).

What affects the calculation of the harmonic mean
– Presence of zeros: any xi = 0 makes the harmonic mean undefined (division by zero).
– Very small values: a small xi (close to 0) drives the harmonic mean down drastically because reciprocals become large.
– Negative values: can be included mathematically but may give nonsensical results for the intended interpretation; proceed with caution.
– Weights: choice of weights (equal vs market-cap, etc.) strongly changes the weighted harmonic mean result.

Comparing harmonic, arithmetic and geometric means
– Arithmetic mean: sum(values)/n — appropriate for averaging raw quantities.
– Geometric mean: (Π xi)^(1/n) — appropriate for average rates of return or multiplicative processes.
– Harmonic mean: n / Σ(1/xi) — appropriate for averaging ratios/rates (“per unit” quantities).

Fast fact
For any set of positive numbers: Harmonic mean ≤ Geometric mean ≤ Arithmetic mean. Equality occurs only when all numbers are equal.

Advantages and disadvantages
Advantages
– Proper for averaging rates and ratios.
– Gives equal effective weight to observations expressed as “per unit.”
– Weighted harmonic mean lets you emphasize certain observations.

Disadvantages
– Undefined if any value is zero.
– Sensitive to very small values (high influence from small denominators).
– Requires working with reciprocals, which can be unintuitive.
– Can be misused if the data-generating process does not justify a harmonic average.

Practical steps for computing in tools
– Excel / Google Sheets:
• Harmonic mean (unweighted): =HARMEAN(range)
• Weighted harmonic mean: =SUM(weights)/SUM(weights / values) — enter as array-aware expression or compute column of (weights/values) and sum.
– Python (numpy/pandas):
• Unweighted: H = n / np.sum(1.0 / arr)
• Weighted: WH = np.sum(weights) / np.sum(weights / arr)
– Manual: follow the step-by-step calculation above.

Worked application: averaging speeds
If you drive 60 km at 60 km/h and another 60 km at 120 km/h, average speed over the total 120 km is harmonic mean of the two speeds (because distances are equal):
H = 2 / (1/60 + 1/120) = 2 / (0.0166667 + 0.0083333) = 2 / 0.025 = 80 km/h

Important practical notes
– Before using the harmonic mean, confirm that your problem involves averaging “rates” or “ratios” where the denominator represents the consistent base (e.g., earnings per share, price per earnings).
– Decide whether you want equal weighting across observations or a weighting scheme (and choose weights carefully).
– Check for zeros or near-zero values; if present, consider data-cleaning, trimming, or using a different mean depending on context.

The bottom line
The harmonic mean is a powerful averaging tool for ratios and rates that appropriately downweights very large values and upweights small ones. It is especially useful in finance for averaging multiples (like P/E) and in physics/transport for averaging speeds when distances are equal. Use it when the underlying data structure supports a “per unit” interpretation; otherwise prefer arithmetic (raw values) or geometric (growth rates) means.

Source
Investopedia — “Harmonic Mean” (Joules Garcia)

– Provide an Excel sheet template or formula examples for your dataset.
– Compute harmonic and weighted harmonic means for a set of data you supply.

Ad — article-mid