Skip to content

Geometric & Harmonic Mean Calculator

Find the geometric and harmonic mean of a list of numbers, compare them with the arithmetic mean, and turn yearly returns into an average growth rate.

Calculator Details

Geometric mean:5.47698697See results ↓

Plain positive values, or yearly returns in % (e.g. 20, -5) to find the average growth rate

Separated by commas, spaces or new lines. Values must be above 0; returns must be above −100%.

Your Results

Geometric mean: 5.47698697

Geometric mean

5.47698697

Of 7 values

  • Harmonic mean

    5.028375962

  • Arithmetic mean

    6

  • Count

    7

Comparing the means

Arithmetic6Geometric5.476987Harmonic5.028376
Arithmetic ≥ geometric ≥ harmonic mean (equal only when all values are the same).

Breakdown

Each value with its natural log and reciprocal
#Value xln x1 / x
141.38629440.25
251.60943790.2
382.07944150.125
471.94591010.14285714
5112.39789530.090909091
641.38629440.25
731.09861230.33333333
Sum4211.9038861.3920996

For 7 values the geometric mean is 5.47699 and the harmonic mean is 5.02838, both at or below the arithmetic mean of 6.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

How This Calculator Works

How it's calculated

For n positive values x₁ … xₙ the three classical (Pythagorean) means are the arithmetic mean AM = Σx / n, the geometric mean GM = (x₁ × … × xₙ)^(1/n) = exp(Σ ln x / n) and the harmonic mean HM = n / Σ(1/x). They always satisfy AM ≥ GM ≥ HM.

With your numbers

n = 7
AM = 42 / 7 = 6
GM = exp(11.90388589 / 7) = exp(1.700555127) = 5.47698697
HM = 7 / 1.392099567 = 5.028375962

Frequently Asked Questions

What is the geometric mean?

The geometric mean of n positive numbers is the nth root of their product. For 2 and 8 it is √(2 × 8) = 4. It answers the question "what single value, multiplied by itself n times, gives the same product?", which makes it the right average for ratios, growth factors and anything that compounds.

What is the harmonic mean?

The harmonic mean is n divided by the sum of the reciprocals: HM = n / (1/x₁ + … + 1/xₙ). It is the right average for rates measured over the same amount of something, such as speeds over equal distances: driving one leg at 40 km/h and an equal leg at 60 km/h averages 48 km/h, not 50.

Why is the geometric mean always less than or equal to the arithmetic mean?

This is the AM–GM inequality: for positive numbers AM ≥ GM ≥ HM, with equality only when every value is the same. The more spread out the values, the wider the gap. For the default list 4, 5, 8, 7, 11, 4, 3 the arithmetic mean is 6, the geometric mean about 5.477 and the harmonic mean about 5.028.

Why can’t I use zero or negative numbers?

A zero makes the product zero and the reciprocal 1/0 undefined, and the root of a negative product isn’t a real number for an even count. Excel’s GEOMEAN and HARMEAN return #NUM! for the same reason. For returns that can be negative, choose the yearly returns mode: each return r% becomes a growth factor 1 + r/100, which stays positive for any loss smaller than 100%.

How do I find the average growth rate from yearly returns?

Turn each return into a growth factor (20% → 1.20, −5% → 0.95), take the geometric mean of the factors and subtract 1. For 20%, 10%, −5% and 15% the factors multiply to 1.4421, so the average growth rate is 1.4421^(1/4) − 1 ≈ 9.58% per year, below the simple average of 10%. This is the same figure a CAGR calculator gives from the start and end values.

Why does +10% then −10% lose money?

Because the loss is taken from a bigger balance. $100 grows to $110, and 10% of $110 is $11, leaving $99. The simple average of the two returns is 0%, but the geometric average is √(1.1 × 0.9) − 1 ≈ −0.50% a year, which matches the 1% total loss.

Which Excel or Google Sheets functions match this calculator?

GEOMEAN gives the geometric mean, HARMEAN the harmonic mean and AVERAGE the arithmetic mean. For returns, =GEOMEAN(1+range/100)−1 (entered as an array formula in older Excel) gives the average growth rate. This calculator uses 40-digit arithmetic and shows up to 10 significant digits.

How is the geometric mean calculated for a long list without overflowing?

Multiplying hundreds of large numbers can overflow, so the calculator adds the natural logs instead: GM = exp((ln x₁ + … + ln xₙ) / n). The breakdown table shows each value’s ln and reciprocal, and the how-it-works section shows the sums for your numbers.

Geometric, harmonic and arithmetic means of positive numbers, or of growth factors (1 + return) for yearly returns, computed with 40-digit decimal arithmetic and shown to 10 significant digits. Not included: weighted means, grouped data, or values of zero and below (they have no geometric or harmonic mean).

Geometric Mean Calculator: Geometric vs Harmonic vs Arithmetic Mean

By FindMySum · Last reviewed

The arithmetic mean, adding the values and dividing by how many there are, is the average most people learn first. It is the right answer when the values add up to something meaningful: total sales, total marks, total kilometres. It gives the wrong answer when the values multiply together, as growth rates and ratios do, or when they are rates measured over equal amounts of something, as speeds over equal distances are. The geometric mean and the harmonic mean cover those two cases. This calculator gives all three side by side, shows each value's logarithm and reciprocal, and has a mode that turns a run of yearly returns into a single average growth rate.

The three formulas

For n positive numbers x₁, x₂, …, xₙ:

MeanFormulaSpreadsheet function
ArithmeticAM = (x₁ + x₂ + … + xₙ) ÷ nAVERAGE
GeometricGM = (x₁ × x₂ × … × xₙ)^(1/n)GEOMEAN
HarmonicHM = n ÷ (1/x₁ + 1/x₂ + … + 1/xₙ)HARMEAN

Together they are called the Pythagorean means. Multiplying a long list of numbers can overflow a computer's number range, so the calculator works out the geometric mean through logarithms instead, which is mathematically identical:

GM = exp((ln x₁ + ln x₂ + … + ln xₙ) ÷ n)

That is why the breakdown table lists ln x for each value. It also lists 1/x, the pieces of the harmonic mean.

A worked example with the default numbers

The calculator opens with the list from Microsoft's GEOMEAN and HARMEAN help pages: 4, 5, 8, 7, 11, 4, 3.

  1. Arithmetic mean. The values add to 42, and 42 ÷ 7 = 6.
  2. Geometric mean. The product is 4 × 5 × 8 × 7 × 11 × 4 × 3 = 147,840. The seventh root of 147,840 is about 5.477. Through logs: the natural logs add to about 11.904, divided by 7 that is about 1.7006, and e^1.7006 ≈ 5.477.
  3. Harmonic mean. The reciprocals add to about 1.3921, and 7 ÷ 1.3921 ≈ 5.028.

Excel gives the same results: GEOMEAN returns 5.476986969 and HARMEAN 5.028375962. Notice the order: 6 > 5.477 > 5.028.

Why AM ≥ GM ≥ HM

For any list of positive numbers, the arithmetic mean is at least the geometric mean, which is at least the harmonic mean. All three are equal only when every value is the same; the more the values vary, the wider the gaps. A quick illustration with two numbers, 2 and 8: the arithmetic mean is 5, the geometric mean √16 = 4 and the harmonic mean 2 ÷ (0.5 + 0.125) = 3.2.

This ordering is useful as a sanity check. If someone quotes an "average" return that is higher than the simple average of the yearly returns, something has gone wrong, because the compound (geometric) figure can never be above the simple one.

When to use the geometric mean

Use it whenever the values are multiplied together to get the overall result:

  • Investment returns. A portfolio that earns 20%, 10%, −5% and 15% in four years grows by 1.20 × 1.10 × 0.95 × 1.15 = 1.4421, or 44.21% in total. The single yearly rate that produces the same growth is 1.4421^(1/4) − 1 ≈ 9.58%. The simple average of the returns is 10%, which overstates what the money actually did.
  • Growth of anything. Population, revenue, prices, bacteria: if each period's change is a percentage of the last period's level, the geometric mean of the factors is the typical change.
  • Ratios and normalised scores. When comparing items scored relative to a baseline, the geometric mean gives the same ranking whichever item is chosen as the baseline; the arithmetic mean does not.

To use the yearly returns mode, enter the returns as percentages, for example 20, 10, -5, 15. The calculator converts each to a factor, finds the geometric mean, and reports the average growth rate, the simple average and the total growth.

Why gains and losses don't cancel

A 10% gain followed by a 10% loss leaves $100 at $99, not $100: the loss comes off a larger balance. The simple average says 0%, but the geometric average is √(1.10 × 0.90) − 1 ≈ −0.50% a year, which correctly reproduces the 1% total loss. The bigger the swings, the bigger this "volatility drag": a 50% loss needs a 100% gain to get back to even, and the geometric average of −50% and +100% is exactly 0%.

When to use the harmonic mean

Use it for rates when each rate applies to the same amount of the thing in the denominator:

  • Speed over equal distances. Drive 60 km at 40 km/h (1.5 hours) and 60 km at 60 km/h (1 hour): 120 km in 2.5 hours is 48 km/h. The harmonic mean of 40 and 60 is 48; the arithmetic mean, 50, is wrong because you spent longer at the slower speed.
  • Dollar-cost averaging. If you invest the same dollar amount each month, the average price you paid per unit is the harmonic mean of the monthly prices.
  • Price-earnings ratios. The harmonic mean of P/E ratios gives the P/E of an equally weighted portfolio, and is less distorted by one company with tiny earnings.

If the amounts differ (trips of different lengths, different sums invested), use a weighted harmonic mean instead.

Values the calculator rejects

Both means need positive numbers. A zero makes the product zero and the reciprocal 1/0 undefined; a negative value can make the root of the product imaginary. Excel's functions return #NUM! for the same inputs. In the yearly returns mode, a return of −100% or below is rejected, because the factor 1 + r/100 would be zero or negative: an investment cannot lose more than everything and keep compounding.

Reading the results

  • If the three means are close, the values are tightly grouped.
  • If the geometric mean is well below the arithmetic mean, the values are spread out, often over several orders of magnitude. For 1, 10, 100 and 1,000 the arithmetic mean is 277.75 but the geometric mean is about 31.6: a "typical" value on a multiplicative scale.
  • For returns, the gap between the simple average and the average growth rate is roughly half the variance of the returns. Steady returns have almost no gap; volatile returns have a large one.

Limits

The calculator gives unweighted means of the numbers as typed, to 10 significant digits. It does not handle weighted or grouped data, and it does not adjust returns for inflation, fees or contributions. For money added or withdrawn along the way, a money-weighted return (internal rate of return) is the better measure.

More questions

Is the geometric mean the same as CAGR?

Yes, when the inputs are yearly growth factors. The compound annual growth rate from a start value to an end value over n years is (end ÷ start)^(1/n) − 1, and the product of the yearly factors is exactly end ÷ start. So the geometric mean of the factors minus 1 and the CAGR are the same number; the CAGR calculator just starts from the two balances instead of the yearly returns.

Can I average percentages with the geometric mean?

Only after turning them into factors. Taking the geometric mean of 20, 10, −5 and 15 directly is meaningless (and impossible, because of the negative). Convert each to 1 + r/100 first, average the factors, then subtract 1. The calculator's yearly returns mode does this for you.

What is the weighted harmonic mean, and when do I need it?

When the amounts behind each rate differ, each reciprocal is weighted: HM = Σw ÷ Σ(w/x). For fuel economy over trips of different lengths, the weights are the distances. This calculator gives the unweighted mean, which is right when every value covers the same amount (the same distance, the same money invested each time).

Why do index providers use the geometric mean?

Because it treats ratios symmetrically. A price that doubles (×2) and a price that halves (×0.5) average to exactly 1 under the geometric mean, meaning no change on balance, while the arithmetic mean of the ratios is 1.25. Several consumer price indexes, including the elementary aggregates of Canada's CPI for many items, are built from geometric means of price ratios for this reason.

How many decimal places should I report?

Match the precision of your data. The calculator works internally to 40 significant digits and shows up to 10, which is more than any measured input justifies. For returns quoted to one decimal place, report the average growth rate to one or two decimals as well.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy