Lelifi·tools

Geometric Mean Calculator

The geometric mean multiplies n numbers and takes the nth root. For factors of 1.10, 0.95 and 1.20 the product is 1.254, so the cube root is 1.0784, or 7.84% a period. The arithmetic average of the same returns is 8.33%, which overstates the gain.

Paste your numbers separated by commas, spaces or line breaks. Choose plain values for positive measurements, or percent changes when each entry is a return for one period.

Paste a list of numbers or yearly returns to get the geometric mean, the arithmetic mean, the product and, for returns, the average growth rate per period.

By the Lelifi editors ·

Key takeaways

The geometric mean of 1 and 9 is 3A 1 by 9 rectangle and a 3 by 3 square hold the same area. The side of that square is the geometric mean.1 by 9, area 9area 9913 by 3area 9, side 3side = square root of 1 x 9 = 33For two numbers the geometric mean is the square root of their product, so it sits at the side of the equal area square.
A 1 by 9 rectangle and a 3 by 3 square hold the same area, and 3 is the geometric mean of 1 and 9.
Arithmetic average against geometric meanThe simple average of returns always looks better than the compounded answer.0%8.33%7.84%+10, -5, +20left: arithmeticright: geometric0.00%-13.40%+50, -50$10,000 ends at $7,500Left bars: the arithmetic average of the returns. Right bars: the geometric mean of the growth factors, minus 1.
Three returns of +10, -5 and +20 percent average 8.33 percent arithmetically and 7.84 percent geometrically.
On this page
  1. What the geometric mean is
  2. The formula, in products and in logs
  3. Geometric mean vs arithmetic mean
  4. Why percentage returns average geometrically
  5. CAGR is a geometric mean of growth factors
  6. Zero and negative numbers
  7. Where the geometric mean shows up
  8. Using this calculator and the mistakes to avoid

What the geometric mean is

The geometric mean is the middle of a set of numbers when you multiply them instead of adding them. Multiply all n numbers together and take the nth root of that product. With two numbers that means a square root, with three a cube root, with four a fourth root.

Take 1, 4 and 16. The product is 64, and the cube root of 64 is 4, so the geometric mean is 4. The arithmetic mean is 7, because 1 + 4 + 16 = 21 and 21 / 3 = 7. Both get called an average in ordinary speech, and they answer different questions.

The question the geometric mean answers is this: what single number, used n times as a multiplier, produces the same total as the numbers you started with? Four times four times four is 64, which is exactly what 1 x 4 x 16 gives. That is why the geometric mean turns up wherever quantities multiply, in growth rates, price ratios, dilution factors and bacteria counts.

The formula, in products and in logs

In symbols, GM = (x1 x x2 x ... x xn) raised to the power 1/n. The NIST Dataplot reference for the geometric mean writes it as the product of the observations raised to 1/n, which is the same statement.

Multiplying first works for small sets and gets awkward fast. Twenty growth factors of 1.10 produce a product near 6.73, and a few thousand of them would overflow the largest number a browser can hold. The log form avoids that. A product becomes a sum under a logarithm, so ln GM = (1/n) x (ln x1 + ln x2 + ... + ln xn), and GM is e raised to that average. Any base works as long as you use the same one coming back.

That form explains the name. The geometric mean is the arithmetic mean of the logs, converted back to the original scale. It is the average on a ratio scale, where doubling and halving are equal steps, and a move from 1 to 2 counts the same as a move from 100 to 200.

For 3, 7, 11 and 15 the natural logs are 1.0986, 1.9459, 2.3979 and 2.7081. They add to 8.1505, the average is 2.0376, and e to that power is 7.6723. The arithmetic mean of the same four numbers is 9, so the geometric mean sits 1.33 lower.

Geometric mean vs arithmetic mean

For positive numbers the arithmetic mean can never be smaller than the geometric mean. It is larger whenever the numbers differ, and the two are equal only when every number is identical. That is the AM-GM inequality, and it is the reason a simple average of returns always flatters the result.

NumbersArithmetic meanGeometric meanWhat drives the gap
1, 4, 167416 is far from the others on a sum scale
2, 854One value is a 4x step above the other
3, 7, 11, 1597.6723Even steps in addition, uneven steps in ratio
1.10, 0.95, 1.201.08331.0784Factors multiply, so the middle is a product

Which one to use comes down to how the numbers combine. Lengths, weights, temperatures and test scores add, so the arithmetic mean is right for them. Ratios, percentages, growth factors and prices over time multiply, so the geometric mean is right for those. Averaging a set of ratios with the arithmetic mean overstates the middle, and the more the ratios differ, the larger the overstatement.

The size of the gap is a rough measure of spread. When the means for 3, 7, 11 and 15 land 1.33 apart, that set is wide on a ratio scale. When the geometric and arithmetic means are within a hundredth of each other, as they are for the three growth factors, the set is tight and either summary will do.

Why percentage returns average geometrically

A gain of 10 percent turns $1 into $1.10. A loss of 5 percent turns $1 into $0.95. Over three periods of +10 percent, -5 percent and +20 percent the money goes 1.00 to 1.10 to 1.045 to 1.254. The product of the three factors is 1.254, so the geometric mean is the cube root of 1.254, which is 1.0784. That is 7.84 percent a period.

The arithmetic average of the same returns is (10 - 5 + 20) / 3 = 8.33 percent. It is higher, and it is the wrong answer for growth: $10,000 at 8.33 percent for three years would end at $12,714, while the actual path ends at $12,540. The gap of about half a percentage point is volatility drag, and it grows with the size of the swings.

The extreme case makes the point. A gain of 50 percent followed by a loss of 50 percent has an arithmetic average return of 0 percent, as if nothing happened. The factors are 1.5 and 0.5, the product is 0.75, and the geometric mean is 0.866, which is a loss of 13.40 percent a period. $10,000 becomes $7,500. Adding the returns hid a quarter of the money.

So the rule for returns is multiply, do not add. Turn each percentage into a factor of 1 + r / 100, multiply the factors, take the nth root, then subtract 1 to get back to a percentage. The calculator does that conversion for you when you pick the percent mode.

CAGR is a geometric mean of growth factors

A compound annual growth rate is the geometric mean of the yearly growth factors, minus 1. Nothing more. If the yearly factors are 1.10, 0.95 and 1.20, the CAGR is 1.0784 - 1 = 7.84 percent, which is the number the calculator prints in percent mode.

When only a start value and an end value are known, the same figure comes from the endpoints: CAGR = (end / start) raised to 1/years, minus 1. $10,000 growing to $19,000 in three years gives 1.9 raised to 1/3, which is 1.2386, so 23.86 percent a year. The shortcut works because the product of the unknown yearly factors has to equal 1.9.

Two limits belong with the number. Deposits and withdrawals break the identity, since the formula cannot see money moving in or out. And a CAGR says nothing about the path: the same 23.86 percent covers a smooth climb and a violent ride equally well.

Zero and negative numbers

The geometric mean is built for positive numbers, and it stops making sense outside them. A single zero makes the product zero, so the geometric mean is zero, and the log form fails because the log of zero is undefined. Reporting zero as the typical value of 0 and 5 tells you nothing about the data; a zero usually means a missing reading or a total loss, not an average.

Negative values are worse. With an even count the product is positive and a real root exists, but the answer describes a set that has no ratio scale. With an odd count the root is negative, which is a real number and still a poor summary: -2, -8 and -4 multiply to -64, and the cube root is -4, a value in the middle of nothing.

CaseExampleWhat happens
All values positive2, 8Product 16, geometric mean 4
One value is zero0, 5Product 0, geometric mean 0, log form undefined
Negative values, even count-2, -8Product 16, root 4, sign of the data lost
Negative values, odd count-2, -8, -4Product -64, root -4, no useful meaning
Return of -100 percent-100, 10Factor 0, geometric mean 0, total loss

Three fixes cover most real cases. Shift the data by adding a constant until every value is positive, and say so when you report the result. Take the geometric mean of the absolute values and discuss the sign separately. Or use the median or the arithmetic mean, which handle zero and negative values without complaint. The calculator on this page accepts positive values and reports a message when it meets a negative one, which is why the table above explains the arithmetic without printing a result. For returns, a period of -100 percent is a total loss: the factor is zero, the geometric mean is zero, and the honest answer is -100 percent a period for the whole stretch, whatever the other periods did.

Where the geometric mean shows up

The Bureau of Labor Statistics CPI uses a geometric mean index formula for most of its item strata, because a price index averages price ratios and ratios belong on a ratio scale. The EPA's 2012 recreational water quality criteria express bacteria limits as a geometric mean over a 30 day window, so one bad sample after a storm does not swamp the standard the way it would with an arithmetic mean. In both cases the quantity being averaged is a factor, not a total.

FieldWhat gets multipliedWhat the geometric mean answers
InvestingYearly growth factorsThe average yearly return, the same figure as the CAGR
PricesPrice relatives from period to periodThe middle price change across the sample
Water qualityBacteria counts per sampleThe typical count over a 30 day window
Laboratory workDilution factors in a seriesThe single dilution that would replace the chain

In personal finance the same math answers the question of what an account earned. In a lab, a dilution series is a chain of multipliers, and the geometric mean is the one step that would replace the chain. In demography and economics, average growth rates over multi-year windows are geometric by construction, whether or not the report uses the word geometric.

Using this calculator and the mistakes to avoid

Paste the numbers into the box, separated by commas, spaces or line breaks. Pick plain values for a set of positive measurements, or percent changes when each entry is a period return such as 10, -5 or 20. The result panel shows the count, the product, the geometric mean, the arithmetic mean and, in percent mode, the average return per period and the total growth.

Four mistakes account for most wrong answers. Averaging percentages by adding them, which gives 8.33 instead of 7.84 on the example above. Mixing decimals and percentages in one list, so a 10 percent return typed as 0.10 counts as a tenth of a percent instead. Leaving a zero in by accident, which collapses the result to zero. And reaching for the geometric mean on data that adds, such as heights or temperatures, where the arithmetic mean is the correct summary and the geometric mean has no meaning.

One last check is worth ten seconds: compare the geometric mean to the arithmetic mean. If they are far apart, the data is spread widely on a ratio scale and the geometric mean is the number to quote for growth. If they are almost equal, the set is tight and either summary will do.

Frequently asked questions

What is the geometric mean of 4 and 9?

Six. Multiply 4 x 9 = 36 and take the square root, which is 6. The arithmetic mean of the same two numbers is 6.5.

How do I calculate the geometric mean of three numbers?

Multiply them and take the cube root. For 1, 4 and 16 the product is 64 and the cube root is 4, so the geometric mean is 4.

Why is the geometric mean lower than the ordinary average?

Because multiplication punishes small values more than addition does. The arithmetic mean of 1, 4 and 16 is 7 and the geometric mean is 4, and the gap widens as the numbers spread out.

What is the geometric mean of 10%, -5% and 20%?

7.84 percent. The factors are 1.10, 0.95 and 1.20, their product is 1.254, and the cube root is 1.0784, which is 7.84 percent a period.

Can I average returns by adding them and dividing?

Not if you want the growth rate. Adding gives 8.33 percent for the example above, and $10,000 growing at 8.33 percent for three years would reach $12,714 instead of the $12,540 the account ends with.

What happens if one of the numbers is zero?

The product becomes zero, so the geometric mean is zero and the log form is undefined. A zero in a data set usually means a missing value or a total loss, so check it before trusting the result.

Can the geometric mean be negative?

With an even count of negative numbers the root is positive, but the sign information is gone. With an odd count the root is negative: -2, -8 and -4 multiply to -64 and the cube root is -4, which is not a useful summary.

How do I handle a -100% return?

The factor is zero, so the geometric mean is zero and the answer is -100 percent a period. The money is gone and no later return brings it back, which is exactly what a zero factor means.

Is the CAGR the same as the geometric mean?

It is the geometric mean of the growth factors minus 1. $10,000 growing to $19,000 in three years gives 1.9 raised to 1/3, which is 1.2386, so the CAGR is 23.86 percent.

What if every number in the set is identical?

Then the geometric mean equals the arithmetic mean. Five, five and five give 5 either way, which is the only case where the AM-GM inequality becomes an equality.

Why does the log formula give the same answer?

Because a logarithm turns a product into a sum. Averaging the logs and converting back is the same operation as multiplying the numbers and taking the nth root, just in a form that does not overflow.

How many numbers can I enter?

Two is the minimum, since a single number has no average. The box accepts up to 200 numbers separated by commas, spaces or line breaks.

Does the geometric mean work on prices in dollars?

Only as a ratio or an index. A geometric mean of two house prices is a number between them, but a median price is the usual way to describe a market.

What is the geometric mean of 2 and 8?

Four. The product is 16 and the square root is 4, while the arithmetic mean is 5.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.