MathsStatistics & Probability

Geometric Mean
calculator.

The geometric mean is the right average for returns, growth rates and skewed data.

How it's worked out

It answers one question: what single factor, applied every time, gives the same result as the real factors? NIST defines it as the nth root of the product of n values.

G\displaystyle G=(x1x2⋯xn)1n\displaystyle {}= \left(x_1 x_2 \cdots x_n\right)^{\frac{1}{n}}

Multiplying a long list can overflow a computer’s number range, so the tool takes the same route through natural logs. It averages the log of each value, then raises e to that power.

G\displaystyle G=exp⁡(ln⁡x1+⋯+ln⁡xnn)\displaystyle {}= \exp\left(\frac{\ln x_1 + \cdots + \ln x_n}{n}\right)

For growth, each percent change r becomes a factor of 1 plus r over 100. A rise of 12% is 1.12 and a fall of 8% is 0.92. Take the geometric mean of the factors, then subtract 1 for the rate per period.

rate\displaystyle \text{rate}=G(1+r1100,…)−1\displaystyle {}= G\left(1 + \frac{r_1}{100}, \ldots\right) - 1

With weights, the logs are averaged with those weights, so a value with a weight of 3 counts as three copies of that value.

Gw\displaystyle G_w=exp⁡(∑wiln⁡xi∑wi)\displaystyle {}= \exp\left(\frac{\sum w_i \ln x_i}{\sum w_i}\right)

The geometric standard deviation is e raised to the standard deviation of the logs. It works as a factor and not an amount: you divide and multiply by it. Limpert and Stahel show that the range from the mean divided by that factor to the mean times it holds about two thirds of log-normal data.

Worked examples

Five years of fund returns

A fund returns 12%, −8%, 15%, 4% and 9%. The plain average is 6.4% a year, but $100 only grows to $134.33, a total change of 34.33%.

The geometric rate is 6.08% a year, and five years at that steady rate reach the same $134.33. The plain average would have promised $136.37, which never existed.

To bring the average up to 8% a year over six years, year six would have to return 18.14%.

Open this example in the tool

Testing a beach for E. coli

Bacteria counts run from low to very high, and EPA’s 2012 recreational water criteria use geometric means for that reason. One recommended limit for fresh water is 126 cfu per 100 mL of E. coli, as a geometric mean over any 30 days. A cfu is a colony forming unit, a count of live bacteria.

Five samples read 40, 120, 300, 90 and 150. The geometric mean is 114.2, under 126. The plain average is 140, over it, because the single 300 pulls it up.

The spread factor here is 2.09, so the typical range is about 55 to 238. EPA also sets a second limit of 410 for the same 30 days, which no more than 10% of samples should pass. These numbers are guidance for states, and your state’s standard may differ.

Open this example in the tool

A fund that grew at two different rates

A fund grew 5% a year for 3 years, then 12% a year for 2. Enter the factors 1.05 and 1.12, with the years as weights. The weighted mean factor is 1.0775, or 7.75% a year.

A weighted plain average of the factors gives 1.078, a little higher. Over only two rates the gap is small, because 1.05 and 1.12 sit close together.

Open this example in the tool

Reading your result

The gap is the point. A gain of 100% and a loss of 50% have a plain average of 25%, and a geometric rate of 0%, because you end where you started. An article on the CFA Institute’s site makes the same point about real fund returns: the geometric mean is the one to use on a product.

Expect it below the plain average. For positive numbers the arithmetic mean is at least the geometric mean, which is at least the harmonic mean. All three agree only if every value is equal, and they drift apart as the spread widens.

The arithmetic (A), geometric (G) and harmonic (H) means for a few lists
ValuesAGH
10, 10, 10, 10101010
5, 10, 15, 2012.511.079.6
1, 10, 100, 1000277.7531.623.6
1, 1, 1, 10025.753.161.33

Read the spread as a factor. Limpert and Stahel give an insulin example with a geometric mean of 256 and a factor of 1.71, for a range of about 150 to 438. Unlike a plain mean with a plus or minus, that range can never drop below 0.

It shows up in real scores. The Human Development Index is the geometric mean of three normalized indices. For a start and end value with no steps between, use the CAGR calculator. It gives the same rate as this tool does for the changes between them.

Common mistakes

  • Averaging returns with a plain average. Returns of +50% and −50% average 0%, but $100 ends at $75.
  • Typing percent changes into Numbers mode. A −8 has no real log, so that mode refuses it. Percent changes mode turns −8 into a factor of 0.92, and the mean then works.
  • Quietly dropping a zero. If a list has a 0, the mean is 0, and the tool says so. Throwing out the zero, or adding a small constant, changes the question. If you do either, report it.
  • Reading it as a forecast. The rate says what happened. It says nothing about next year, or about the swings along the way.
  • Using it on rates over a set distance. Average speed over equal distances calls for the harmonic mean.

Questions people ask

For what your money actually did over several years, use the geometric mean. For a guess at any one year's return, the plain average is the usual figure. In the five-year example they are 6.08% and 6.4%, and the gap grows as returns swing more.

Sources