Skip to content

Geometric Mean Calculator

Calculate the geometric mean of a set of positive numbers.

By CalcGenius Editorial TeamLast reviewed August 28, 20253 min read
Geometric Mean Calculator

Enter strictly positive numbers. Zeros and negatives are filtered out. For growth rates, enter as decimal factors (1.10 = +10%, 0.95 = −5%).

📊
Enter your values and click Calculate

About

The geometric mean of n positive numbers is the n-th root of their product: GM = (x₁ × x₂ × … × xₙ)^(1/n). Equivalently, GM = exp((Σ ln xᵢ) / n) — averaging the logarithms and exponentiating back. The log form is numerically stable: it sums logs instead of multiplying values, which avoids overflow when n is large (the product of 100 values near 10 is 10^100 — well beyond IEEE 754 range, but the sum of 100 logs is bounded).

The geometric mean is the correct average for data that compounds multiplicatively. Investment returns, growth rates, inflation, interest rates, population biology, and ratios all fall in this category. The arithmetic mean of multiplicative data systematically overstates the realized compound rate — a 50% gain followed by a 50% loss returns you to 75% of the start, not 100%, and only the geometric mean (1.5 × 0.5)^(1/2) − 1 ≈ −13.4% per period captures this correctly.

The AM–GM inequality is a foundational result: GM ≤ AM, with equality if and only if all values are equal. The gap measures how unequal the data is — large gaps indicate the arithmetic mean overstates the typical multiplicative value. For two values, the geometric mean equals the arithmetic mean of the values after taking square roots: √(ab) = (a + b) / 2 when a = b. For n values, the inequality becomes a powerful tool in optimization, information theory, and statistics.

Compound Annual Growth Rate (CAGR) is exactly the geometric mean of yearly growth factors. If an investment grows by 10%, then falls 5%, then grows 20%, the cumulative factor is 1.10 × 0.95 × 1.20 = 1.254. CAGR = 1.254^(1/3) − 1 ≈ 7.84% per year — not the arithmetic average of 8.33%. This is why mutual fund literature is required to report CAGR (geometric) rather than average annual return (arithmetic) — the geometric mean is the return an investor would actually realize.

The geometric mean requires strictly positive values. Zeros make the product (and thus the GM) zero; negatives break the logarithm. For data with zeros or negatives — like percentage changes that include negative returns — convert to growth factors first (e.g., +10% → 1.10, −5% → 0.95) so every factor is positive, then compute the geometric mean and subtract 1 to recover the average percentage change. This is the correct way to compute the "average annual return" of a volatile investment.

How to Use

  1. 1
    Enter your data values
    Type positive numbers separated by commas or spaces (e.g., 1.05, 1.10, 0.95, 1.20). Growth rates as decimals work well; you can also enter percentages like 105, 110, 95, 120.
  2. 2
    All values must be positive
    The geometric mean requires strictly positive numbers. The calculator filters out zeros and negatives; if you have such data, the geometric mean is not applicable.
  3. 3
    Read the geometric mean
    The hero shows the geometric mean computed as exp((Σ ln x) / n) for numerical stability. Below: the arithmetic mean (for comparison), count, and product.
  4. 4
    Compare AM vs GM
    The breakdown shows both means side by side. For unequal positive values, AM > GM; the gap measures inequality. For rates of return, AM overstates the realized compound rate.
  5. 5
    Apply to your use case
    For investment returns, GM − 1 gives the true CAGR. For percentage growth factors like 1.10 (10% growth), GM − 1 gives the average annual growth rate. For raw values, GM is the typical multiplicative midpoint.

Formula

Geometric mean (direct form):

GM = (x₁ × x₂ × … × xₙ)^(1/n) = (Π xᵢ)^(1/n)

Numerically stable (log form, used here):

GM = exp((Σ ln xᵢ) / n) = antilog((Σ log x) / n)

AM–GM inequality:

GM ≤ AM with equality iff x₁ = x₂ = … = xₙ
For two values: √(ab) ≤ (a + b) / 2

CAGR (compound annual growth rate):

Given growth factors r₁, r₂, …, rₙ:
Cumulative = Π rᵢ
CAGR = (Π rᵢ)^(1/n) − 1 = GM(rᵢ) − 1

Worked Example

Example 1 — Three-year investment returns:

  • Annual returns: +10%, −5%, +20% → growth factors 1.10, 0.95, 1.20.
  • Cumulative factor = 1.10 × 0.95 × 1.20 = 1.254.
  • Geometric mean = 1.254^(1/3) ≈ 1.0784.
  • CAGR = 1.0784 − 1 ≈ 7.84% per year.
  • Arithmetic mean of factors = (1.10 + 0.95 + 1.20) / 3 = 1.0833 → 8.33% (overstated).

Example 2 — Geometric vs arithmetic mean of 2 and 8:

  • AM = (2 + 8) / 2 = 5.
  • GM = √(2 × 8) = √16 = 4.
  • HM = 2 / (1/2 + 1/8) = 2 / 0.625 = 3.2.
  • Note the ordering: AM (5) ≥ GM (4) ≥ HM (3.2). Equality would require 2 = 8.

Example 3 — Population growth 2% per year for 10 years:

  • Growth factor per year = 1.02. Over 10 years: 1.02^10 ≈ 1.2190.
  • Geometric mean of 10 factors (all equal) = 1.02 → 2% per year.
  • When all factors are equal, GM = AM = any one factor. ✓

Tips

  • Use the geometric mean for rates of return, growth rates, and percentages that compound. The arithmetic mean overstates the realized compound rate — for a 50% gain then 50% loss, AM = 0% but GM = (1.5 × 0.5)^(1/2) − 1 ≈ −13.4%.
  • The geometric mean is defined only for strictly positive values. Zeros make it zero; negatives break the logarithm. For data with zeros or negatives, use the arithmetic mean or transform the data first.
  • By the AM–GM inequality, GM ≤ AM with equality only when all values are equal. The gap measures inequality — for unequal returns, the arithmetic mean systematically overstates the typical multiplicative value.
  • Compute GM as exp((Σ ln x) / n) rather than (Π x)^(1/n) to avoid overflow. The product of 100 values near 10 is 10^100 — beyond IEEE 754 range. Summing logs is bounded.
  • For percentage returns like +10%, −5%, +20%: enter as growth factors 1.10, 0.95, 1.20. GM − 1 gives the true CAGR ≈ 7.84%, not the arithmetic average of 8.33%.

Common Mistakes

Warning

The most common mistake is using the arithmetic mean for rates of return. The arithmetic mean of +50% and −50% is 0%, but the realized total is 1.5 × 0.5 = 0.75 — a 25% loss. Only the geometric mean (0.75^(1/2) − 1 ≈ −13.4% per period) captures this. A second error is including zero or negative values, which break the logarithm. A third is forgetting to convert percentage returns to growth factors before averaging (e.g., entering 10, −5, 20 instead of 1.10, 0.95, 1.20). Finally, do not confuse the geometric mean of returns with the arithmetic mean of log returns — they are the same only if you exponentiate correctly.

Frequently Asked Questions

What is the geometric mean?
The geometric mean of n positive numbers is the n-th root of their product: GM = (x₁ × x₂ × … × xₙ)^(1/n). Equivalently, GM = exp((Σ ln xᵢ) / n). Unlike the arithmetic mean, it gives equal weight to multiplicative (proportional) changes, so it is the correct average for rates, ratios, and percentages that compound.
When should I use the geometric mean instead of the arithmetic mean?
Use the geometric mean when the data represents rates of change, ratios, or anything that compounds multiplicatively. Examples: investment returns, population growth rates, inflation, interest rates, bacterial growth, the HDI index. Use the arithmetic mean when the data represents additive quantities — heights, weights, counts, temperatures.
Why is the geometric mean always less than or equal to the arithmetic mean?
By the AM–GM inequality, GM ≤ AM with equality if and only if all values are equal. The gap measures how unequal the values are: large gaps indicate the arithmetic mean overstates the typical value. For rates of return, the arithmetic mean overstates the realized compound growth rate — the geometric mean is the truth.
Can the geometric mean be used with negative or zero values?
No — the geometric mean is defined only for strictly positive values. Zero would make the product (and thus the GM) zero. Negative values break the logarithm. For data with zeros or negatives, use the arithmetic mean instead, or transform the data so all values are positive (e.g., shift by adding a constant).
How is the geometric mean related to CAGR?
CAGR (Compound Annual Growth Rate) is exactly the geometric mean of yearly growth factors. If an investment grows by factors 1.10, 0.95, 1.20 over three years, the cumulative growth is 1.10 × 0.95 × 1.20 = 1.254, and the CAGR = 1.254^(1/3) − 1 ≈ 7.84% per year — not the arithmetic average (1.10 + 0.95 + 1.20) / 3 − 1 = 8.33%.
Why does the geometric mean use logarithms?
Computing GM = (Π xᵢ)^(1/n) directly overflows for moderate n (e.g., 100 values around 10 give a product of 10^100). The equivalent form GM = exp((Σ ln xᵢ) / n) sums logarithms — bounded, no overflow. This is how this calculator computes the geometric mean robustly for any input size.

Geometric mean

The geometric mean of n positive numbers is the n-th root of their product: GM = (x₁ × x₂ × … × xₙ)^(1/n). Equivalently, GM = exp((Σ ln x) / n) — averaging the logs and exponentiating back. The log form is numerically stable: it sums logs instead of multiplying values, avoiding overflow for large n.

When to use (rates, percentages)

Use the geometric mean for rates, ratios, and percentages that compound multiplicatively — investment returns, population growth, inflation, interest rates, biological growth, the HDI index. Use the arithmetic mean for additive quantities — heights, weights, counts, temperatures. The rule of thumb: if a 10% increase followed by a 10% decrease does not return you to start, you want the geometric mean.

Vs arithmetic mean

The AM–GM inequality states GM ≤ AM, with equality if and only if all values are equal. The gap measures dispersion: larger gaps indicate the arithmetic mean overstates the typical multiplicative value. For investment returns, the arithmetic mean overstates the realized compound growth rate — the geometric mean is the truth investors actually experience.

Real-world examples (CAGR)

Compound Annual Growth Rate (CAGR) is the geometric mean of yearly growth factors. If an investment grows by 10%, then falls 5%, then grows 20%, the cumulative factor is 1.10 × 0.95 × 1.20 = 1.254. CAGR = 1.254^(1/3) − 1 ≈ 7.84% per year — not the arithmetic average of 8.33%. The geometric mean captures the compounding effect that the arithmetic mean misses.

Datasets illustrating the AM ≥ GM ≥ HM inequality. When all values are equal, the three means coincide.
DatasetArithmetic meanGeometric meanHMNotes
2, 8543.2AM > GM > HM
1, 3, 94.33333.00002.0769Powers of 3
1.10, 0.95, 1.201.08331.0784—Investment returns
100, 100, 100100100100All equal → AM = GM = HM
1, 2, 4, 8, 166.24.0000—Geometric progression
Info

The geometric mean is the multiplicative analog of the arithmetic mean — it averages values that compound, just as the arithmetic mean averages values that add. The three Pythagorean means (arithmetic, geometric, harmonic) are ordered AM ≥ GM ≥ HM, with equality only when all values are identical. The harmonic mean is the right choice when rates are averaged (e.g., speed over a fixed distance), the geometric mean for multiplicative growth (returns, inflation), and the arithmetic mean for additive quantities (heights, weights).

Pro tip

For very large datasets, compute GM as exp((Σ ln x) / n). The direct product (Π x)^(1/n) overflows quickly — 200 values of size 10 give a product of 10^200, beyond IEEE 754 range. The log form sums bounded values, so it is numerically stable for any input size. This is the implementation used by this calculator.

Authoritative References

  • Wikipedia — Geometric mean— wikipedia.org
    Comprehensive treatment of the geometric mean, including the AM–GM inequality, the log-form computation, and applications to growth rates, finance, and the Human Development Index.
  • Khan Academy — Geometric mean— khanacademy.org
    Khan Academy unit on summarizing quantitative data, including the geometric mean, the arithmetic mean, and the median.
  • Wolfram MathWorld — Geometric Mean— wolfram.com
    Eric Weisstein's reference on the geometric mean with formal definitions, the relationship to the arithmetic and harmonic means, and the AM–GM inequality.

Try our other free calculators

CalcGenius has 1,200+ free, ad-free, browser-based calculators for finance, health, math, science, and everyday life. No sign-up required.

How Fast Does Geometric Mean? Grow? Instant Formula Check