Geometric Mean Calculator

Your values

Calculate

Separate values with spaces, commas, semicolons or line breaks. Every value must be greater than 0.

One weight per value, in the same order. Leave empty to weight all values equally.

Result

Geometric mean

Arithmetic mean
Harmonic mean
Count (n)
5

The arithmetic mean is larger than the geometric mean, which is larger than the harmonic mean. This holds for any positive values that are not all equal.

Step by step

  1. Multiply the values and take the n-th root.
    G=1×3×9×27×815G=\sqrt[5]{1\times3\times9\times27\times81}
    =590495=9=\sqrt[5]{59049}=9
  2. Arithmetic mean for comparison.
    A=∑xin=24.2A=\frac{\sum x_i}{n}=24.2
  3. Harmonic mean: the count divided by the sum of reciprocals.
    H=n∑1/xi≈3.347107H=\frac{n}{\sum 1/x_i}\approx3.347107
  4. Compare the three means.
    A≥G≥HA\ge G\ge H
    24.2≥9≥3.34710724.2\ge9\ge3.347107

About this tool

The geometric mean is the n-th root of the product of n positive numbers. It is the right average for quantities that combine by multiplication: growth rates, investment returns, ratios, index numbers and measurements that span several orders of magnitude. For 2 and 8 it is 2×8=4\sqrt{2 \times 8} = 4, whereas the arithmetic mean is 5.

For any positive numbers the arithmetic mean is at least the geometric mean, which is at least the harmonic mean, with equality only when all values are the same. The calculator shows all three and works with logarithms, so even long lists of very large or very small values do not overflow.

How it works

In the geometric mean mode, type or paste positive numbers. The calculator shows the geometric mean together with the arithmetic and harmonic means, so you can compare the three. To weight the values, enter one weight per value in the same order; leave the weights empty for an ordinary mean.

In the growth rate mode, enter returns or growth rates for equal periods in percent, such as 10, −5, 20 for three years. The calculator multiplies the growth factors 1 + r and takes the n-th root, which gives the constant rate per period that produces the same total growth. It also shows the simple arithmetic average for comparison.

G=x1x2⋯xnn=exp⁡(1n∑i=1nln⁡xi)G=\sqrt[n]{x_1x_2\cdots x_n}=\exp\left(\frac{1}{n}\sum_{i=1}^{n}\ln x_i\right)

Example

For 1, 3, 9, 27, 81 the product is 59049, and 590495=9\sqrt[5]{59049} = 9, so the geometric mean is 9. The arithmetic mean is 121/5=24.2121/5 = 24.2 and the harmonic mean is about 3.347, which confirms A≥G≥HA \ge G \ge H.

An investment that returns +10%, −5%, +20% and +8% in four years grows by the factor 1.1×0.95×1.2×1.08=1.354321.1 \times 0.95 \times 1.2 \times 1.08 = 1.35432. The average annual return is 1.354324−1≈7.88\sqrt[4]{1.35432} - 1 \approx 7.88%, while the simple average of the four returns, 8.25%, overstates the growth.

Assumptions and limits

The geometric and harmonic means are defined here for positive values only; a zero or negative value is rejected with a message instead of being skipped. For growth rates, each period's return must be above −100%, and the periods should be of equal length. Weights must be zero or positive and are applied to the logarithms (weighted geometric mean).

Average returns describe the past and are not a forecast. This calculator is for learning and planning, not investment advice, and it ignores fees, taxes, inflation and the timing of deposits and withdrawals.

Frequently asked questions

When should I use the geometric mean instead of the arithmetic mean?

Use the geometric mean when values multiply rather than add: growth rates, returns, ratios, or data such as bacteria counts and concentrations that span orders of magnitude. Use the arithmetic mean when values add up to a meaningful total, such as heights or prices.

Why can't the geometric mean include zero or negative numbers?

A single zero makes the product zero, and with negative values the root may not be a real number. For returns, convert them to growth factors first: a return of −20% becomes 0.8, which is positive. The growth rate mode does this for you.

What is the AM–GM–HM inequality?

For positive numbers, the arithmetic mean A, the geometric mean G and the harmonic mean H always satisfy A≥G≥HA \ge G \ge H, with equality only when all values are equal. The more the values vary, the larger the gaps.

Is the average growth rate the same as CAGR?

Yes, when the periods are years. The compound annual growth rate is (Vn/V0)1/n−1(V_n/V_0)^{1/n} - 1, where V0V_0 is the starting value and VnV_n the value after n years, and the ratio of the two equals the product of the yearly growth factors 1 + r. Both give the constant yearly rate that turns the starting value into the ending value.

When is the harmonic mean used?

The harmonic mean averages rates over equal amounts, such as average speed over equal distances or the average price per share when you invest the same sum each month. For 60 km/h out and 40 km/h back over the same distance, the average speed is the harmonic mean, 48 km/h.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
modeCalculateone of: mean, growthdefault mean
valuesPositive numbersvalues separated by commas: 2,4,4,6; allowed > 0; used with mode = meanrequired
weightsWeights (optional)values separated by commas: 2,4,4,6; used with mode = meanoptional
returnsReturns per period (%)values separated by commas: 2,4,4,6; allowed > -100; used with mode = growthrequired

Examples

  • ?values=2,8,32
  • ?values=1.05,1.2,0.9&weights=1,2,1
  • ?returns=12,-8,15,4,-3

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="geometric_mean_calculator"]