Geometric Mean Calculator
Find the geometric mean of any set of positive numbers or percentage growth rates. Switch between raw-value mode and growth-rate mode, compare arithmetic and harmonic means side by side, reverse-solve for CAGR from a start and end value, and see a live year-by-year compounding schedule.
Formula
Worked example
For 2, 8, 32: the product is 2 x 8 x 32 = 512, and n = 3, so the geometric mean is the cube root of 512 = 8. The arithmetic mean is (2 + 8 + 32) / 3 = 14, which overstates the centre because the data spans a wide range. For investment returns of 6%, 7%, 8%, -35%, 10%: convert each to factors (1.06, 1.07, 1.08, 0.65, 1.10), compute the geometric mean factor = (1.06 x 1.07 x 1.08 x 0.65 x 1.10)^(1/5) = 0.9738, so the average annual return is -2.62%. The arithmetic average of the raw percentages is -0.8%, which overstates performance.
What the geometric mean measures
The geometric mean is the nth root of the product of n positive numbers. Instead of adding values and dividing like the arithmetic mean, it multiplies them and takes a root, making it the natural centre for quantities that combine by multiplication rather than addition. Because multiplying many numbers can cause numerical overflow, the calculator uses the algebraically equivalent formula: exp(average of the natural logs). This is fast and safe for datasets with hundreds of values.
Growth-rate mode and investment returns
When your data are percentage changes, switch to growth-rate mode. The calculator converts each percentage change r into a growth factor (1 + r/100), computes the geometric mean of those factors, and converts the result back to a percentage. A 10% gain followed by a 10% loss is not a wash: the geometric mean factor is sqrt(1.10 x 0.90) = 0.9950, so the average annual return is -0.5%. That is the correct compounded rate; the arithmetic average of 0% is misleading. Five annual returns of 6%, 7%, 8%, -35%, 10% have an arithmetic average near -0.8% but a geometric mean of about -2.62%, which is what you actually earned by holding through the drawdown.
CAGR: reverse-solving the geometric mean
Compound Annual Growth Rate (CAGR) is the geometric mean of implied annual growth factors. Enable the "Reverse-solve: find CAGR from start/end value" toggle, enter a starting value, an ending value, and the number of years, and the calculator applies (end/start)^(1/n) - 1. If a 1,000 portfolio grows to 1,500 over five years, the CAGR is (1500/1000)^(1/5) - 1 = 8.45% per year. That is the single constant rate that produces the same total return, which is also the geometric mean of the implied yearly growth factors.
Three Pythagorean means side by side
For any set of positive numbers three classic means are always ordered: harmonic mean (HM) <= geometric mean (GM) <= arithmetic mean (AM), with all three equal only when every value is identical. The arithmetic mean is right for additive data such as test scores or heights. The geometric mean fits multiplicative data such as growth rates, ratios, and index numbers. The harmonic mean suits rates measured over equal intervals, such as average speed across equal distances. Comparing all three in the bar chart gives an instant read on how skewed or spread your data are.
Geometric mean in geometry and other fields
The name is literal: the geometric mean of a and b is the side of the square that has the same area as the rectangle with sides a and b. In a right triangle, the altitude drawn to the hypotenuse equals the geometric mean of the two segments the altitude creates. In display technology, the 16:9 aspect ratio was chosen as the geometric mean between the 4:3 television standard and the 2.35:1 cinema ratio. In biology and environmental science, the geometric mean averages bacterial colony counts, pollutant concentrations, and population growth rates, all of which span several orders of magnitude and would be badly distorted by an arithmetic mean.
Handling zeros and negatives
A single zero in a values dataset collapses the geometric product to zero, making the mean trivially zero. In environmental and assay data, zeros often represent measurements below the detection limit rather than true absences. The common convention is to replace each zero with half the detection limit. This calculator offers both options: ignore zeros entirely, or replace them with 0.5. Negative values are handled automatically in growth-rate mode because a -35% return becomes the factor 0.65, which is positive and computable. In values mode, negative entries are skipped because the even root of a product containing a negative number is not a real number.
Which average to use, and when
| Mean | Formula | Use when data is... | Classic example |
|---|---|---|---|
| Arithmetic | sum / n | Additive, no compounding | Test scores, heights, temperatures |
| Geometric | nth root of product | Multiplicative, compounding | Growth rates, returns, ratios, indices |
| Harmonic | n / sum(1/x) | Rates over equal intervals | Average speed, P/E ratios over equal capital |
Frequently asked questions
Why must all the values be positive in values mode?
The geometric mean relies on multiplying the values and taking a root. A single zero makes the entire product zero, and negative numbers make an even root undefined in the real numbers. This calculator ignores zeros and negative entries in values mode, or can substitute 0.5 for zeros if you select that option.
Is the geometric mean always smaller than the arithmetic mean?
For positive numbers the geometric mean is always less than or equal to the arithmetic mean (the AM-GM inequality). They are equal only when every value is identical. The more your values vary, the wider the gap. The harmonic mean is smaller still: HM <= GM <= AM.
How do I average percentage growth rates correctly?
Switch to growth-rate mode and enter each period's percentage change. The calculator converts each value to a growth factor (5% becomes 1.05, -10% becomes 0.90), computes the geometric mean factor, and converts back to a percentage. This gives the true compounded average rate, which is always less than or equal to the simple arithmetic average of the percentages.
What is CAGR and how does it relate to the geometric mean?
CAGR (Compound Annual Growth Rate) is the geometric mean of the implied annual growth factors. Enable the reverse-solve toggle, supply a starting value, ending value, and number of years, and the calculator applies (end/start)^(1/n) - 1. CAGR and the geometric mean of growth factors are mathematically identical.
What should I do if my data contains zeros?
A zero collapses the geometric product to zero. The two most common approaches are: ignore the zero entry (appropriate if it is an outlier or missing value) or replace it with half the detection limit (common in environmental and lab assay data). Use the "When a zero is encountered" dropdown to choose.
When is the harmonic mean more appropriate than the geometric mean?
Use the harmonic mean when averaging rates that apply over equal units of something other than time. The classic example is average speed: driving 60 mph for 100 miles then 40 mph for 100 miles gives a harmonic mean of 48 mph, which is the correct average. For multiplicative compounding over time, the geometric mean is the right choice.