Audited 25 May 2026·Last updated 27 Jul 2026·5 citations·Tier 1·0 uses

Geometric Mean Calculator

Calculate the geometric mean of a data set. Useful for growth rates, ratios, and log-normal distributions in statistics.

Geometric Mean Calculator

Comma-separated positive numbers
Geometric Mean
4
nth root of the product of n values
Count
2
Arithmetic Mean
5

Background.

The geometric mean is the multiplicative analogue of the arithmetic mean, designed for data that grow or combine through multiplication rather than addition. It is the central tendency measure of choice for investment returns, bacterial growth rates, radioactive decay constants, and any domain where percentages or ratios compound over time. While the arithmetic mean adds values and divides by their count, the geometric mean multiplies values and takes the nth root. This distinction is not pedantic: using the arithmetic mean to average investment returns over multiple periods produces an upwardly biased estimate that overstates actual portfolio growth.

Finance professionals search for geometric mean calculators when computing the compound annual growth rate, or CAGR. If a stock rises 100 percent in year one and falls 50 percent in year two, the arithmetic mean return is 25 percent, but an investor who held the stock for both years has exactly zero net growth. The geometric mean return is (2.0 × 0.5)^0.5 − 1 = 0 percent, correctly reflecting the break-even outcome. This property makes the geometric mean essential for backtesting trading strategies, comparing mutual fund performance, and calculating time-weighted returns that neutralize the effect of cash flows.

In the natural sciences, the geometric mean appears wherever data follow log-normal distributions. Particle sizes in aerosols, pollutant concentrations in environmental monitoring, and blood-titer levels in immunology all tend to be right-skewed with a long tail of extreme values. The arithmetic mean is pulled upward by these outliers and no longer represents the typical observation. The geometric mean, because it compresses the scale through logarithms, yields a more robust central estimate that aligns with the median in log-normal data. Fleming and Wallace (1986) demonstrated that the geometric mean is the only correct summary statistic for normalized benchmark results in computer science, a finding now standard in performance engineering.

The computational challenge is numerical stability. The product of 100 values, each near 100, exceeds 10^200 and overflows standard floating-point registers. Conversely, the product of 100 probabilities near 0.01 underflows to zero. The solution is to compute in the logarithmic domain: take the natural logarithm of each value, average those logarithms, and exponentiate the result. This converts multiplication into addition and roots into division, keeping intermediate values within the representable range of IEEE-754 doubles. The calculator implements this log-domain algorithm automatically, producing accurate results for data sets of arbitrary length within memory constraints.

Historical use of the geometric mean dates to ancient Greek mathematics, where it appeared as the mean proportional between two numbers. In a right triangle, the altitude to the hypotenuse is the geometric mean of the two segments it creates. This geometric construction gives the mean its name, even though modern applications are overwhelmingly algebraic and statistical. Today, the geometric mean is one of the three classical Pythagorean means—alongside arithmetic and harmonic—and satisfies the fundamental inequality AM ≥ GM ≥ HM for any set of positive numbers. Its invariance under reference changes makes it indispensable for normalized comparisons across disparate systems and benchmark suites alike. Modern data scientists rely on it whenever multiplicative processes dominate.

What is geometric mean calculator?

The geometric mean of n positive real numbers is the nth root of their product. It is defined only for positive inputs because the product of non-positive numbers may be negative or zero, and the nth root of a negative number is not real when n is even. The formula is GM = (Π x_i)^(1/n), where Π denotes the product over all i from 1 to n. An equivalent and computationally preferable form is GM = exp( (1/n) Σ ln(x_i) ), where ln is the natural logarithm and exp is its inverse. The geometric mean is always less than or equal to the arithmetic mean, with equality holding if and only if all values are identical. This relationship, known as the AM-GM inequality, is one of the most important results in mathematical analysis and has applications in optimization, information theory, and geometry. The geometric mean shares the same units as the input data—percentages, dollars, meters—but its interpretation differs: it represents the constant rate that would produce the same cumulative product as the observed varying rates. When data are log-normally distributed, the geometric mean coincides with the median of the underlying normal distribution, providing a robust central estimate that resists the upward bias of extreme outliers.

How to use this calculator.

  1. Enter your data values as comma-separated positive numbers in the text area.
  2. Ensure every value is greater than zero; the geometric mean is undefined otherwise.
  3. Include at least two values to compute a meaningful mean.
  4. Click calculate to display the geometric mean.
  5. Review the count and arithmetic mean shown for comparison.
  6. Use the result for CAGR calculations, ratio averaging, or log-normal data summary.

The formula.

GM = (x₁ × x₂ × ⋯ × xₙ)^(1⁄n)

The product definition GM = (x_1 × x_2 × ... × x_n)^(1/n) is intuitive but computationally fragile. In JavaScript, the maximum finite double-precision value is approximately 1.798e308. The product of 100 numbers each equal to 100 is 10^200, which fits safely, but the product of 200 such numbers is 10^400 and overflows to Infinity. Underflow is equally problematic: the product of 200 probabilities of 0.01 is 10^-400, which rounds to zero. Once the product is zero or Infinity, the nth root cannot recover the correct mean. The logarithmic transformation solves both problems. Because ln(a × b) = ln(a) + ln(b), the product becomes a sum: ln(GM) = (1/n) Σ ln(x_i). Exponentiating both sides yields GM = exp( (1/n) Σ ln(x_i) ). Sums of logarithms stay within the representable range far longer than products of raw values. For 200 values of 100, the sum of logs is 200 × 4.605 = 921, well within double limits. For 200 values of 0.01, the sum is 200 × (-4.605) = -921, also safe. The division by n and final exponentiation return a finite, accurate result. The AM-GM inequality states that for any set of positive numbers, the arithmetic mean is greater than or equal to the geometric mean. A short proof uses Jensen's inequality applied to the convex function −ln(x). Because −ln is convex, the average of the function values is at least the function of the average: −ln(AM) ≤ average(−ln(x_i)) = −ln(GM). Multiplying by −1 reverses the inequality, yielding AM ≥ GM. Equality holds only when all x_i are identical. This inequality explains why the arithmetic mean of investment returns always overstates growth: it is systematically larger than the geometric mean unless every period returns exactly the same rate. Dimensional analysis confirms that GM carries the same units as the inputs. The logarithm is dimensionless only when applied to dimensionless ratios; when applied to dimensional quantities, the result retains implicit units. In practice, geometric means are applied to ratios, growth factors, or normalized quantities where the dimensionless interpretation is natural. The calculator accepts any positive real numbers and returns a geometric mean in the same numerical scale.

A worked example.

Example

Consider an investment that doubles in value during the first year and then loses half its value during the second year. The growth factors are 2.0 and 0.5. The arithmetic mean of these factors is (2.0 + 0.5) / 2 = 1.25, which naively suggests a 25 percent average growth rate. However, an investor who held this asset for both periods would have exactly the same amount at the end as at the beginning: $1.00 becomes $2.00 after year one, then falls back to $1.00 after year two. The geometric mean correctly captures this break-even outcome: GM = (2.0 × 0.5)^(1/2) = 1.0^0.5 = 1.0. The average growth factor is therefore 1.0, implying zero net growth. To express this as a percentage return, subtract 1: 1.0 − 1 = 0 percent. This example, adapted from introductory finance textbooks, demonstrates why regulators such as the SEC require that mutual fund returns be reported as geometric (time-weighted) averages rather than arithmetic averages. Using the arithmetic mean would mislead investors into believing their portfolios grew when they merely oscillated.

values2, 0.5

Frequently asked questions.

When should I use geometric mean instead of arithmetic mean?
Use the geometric mean when the data represent multiplicative processes, compounded growth rates, or ratios. Investment returns, population growth rates, and bacterial doubling times are classic examples. The arithmetic mean is appropriate for additive processes such as total sales, heights, or temperatures. A practical rule is to ask whether the product of the values has a meaningful interpretation. If it does—as with growth factors over successive periods—the geometric mean is the correct summary. If the sum is meaningful, use the arithmetic mean. Mixing these contexts produces biased estimates: arithmetic means overstate growth, and geometric means understate additive totals.
Can geometric mean handle negative numbers?
No. The geometric mean is undefined for non-positive numbers in the real number system because the product may be negative and the nth root of a negative number is not real when n is even. When n is odd, a single negative value yields a negative nth root, but the interpretation as a central tendency becomes nonsensical for most applications. Financial returns below −100 percent are impossible for standard long-only investments but can occur with leveraged positions. In such cases, analysts typically add 1 to convert returns to growth factors, which are positive by construction, compute the geometric mean, and then subtract 1. The calculator enforces positivity by rejecting any input less than or equal to zero.
How is geometric mean used in finance?
The geometric mean is the basis for compound annual growth rate calculations. To compute CAGR over T years from an initial value V_0 to a final value V_T, the formula is (V_T / V_0)^(1/T) − 1, which is equivalent to the geometric mean of the annual growth factors minus one. Portfolio managers use geometric mean returns to compare strategies because the geometric mean represents the constant annual return that would produce the same terminal wealth as the observed sequence of varying returns. The SEC mandates that mutual funds report average annual returns as geometric means. Academic studies in asset pricing, such as those underlying the Fama-French model, rely on geometric mean returns to estimate long-term equity risk premiums.
What is the relationship between GM and logarithms?
The geometric mean is the arithmetic mean in log space, transformed back to the original scale. Taking natural logs converts multiplication into addition: ln(GM) = average of ln(x_i). This property makes the geometric mean the natural center for log-normal distributions, where the logarithms of the data are normally distributed. In such distributions, the geometric mean equals the median, while the arithmetic mean is larger and pulled toward the right tail. The log transformation also provides numerical stability, preventing overflow and underflow when computing the mean of large data sets. Engineers and scientists therefore compute GM through logarithms even when the product would fit in memory.
Is geometric mean always less than arithmetic mean?
For any finite set of positive numbers that are not all identical, the geometric mean is strictly less than the arithmetic mean. This is the AM-GM inequality, a cornerstone of analysis proved by Cauchy in 1821. Equality holds if and only if every number in the set is the same. The gap between AM and GM increases with the variance of the logarithms of the data. In investment contexts, the difference between arithmetic and geometric mean returns is approximately half the variance of returns. For highly volatile assets, this difference can be several percentage points per year, making the choice of mean economically significant.
How do I calculate geometric mean of percentages?
Convert percentages to growth factors by adding 1 before computing the geometric mean, then subtract 1 afterward. For example, returns of 10 percent, −5 percent, and 20 percent become factors 1.10, 0.95, and 1.20. The geometric mean factor is (1.10 × 0.95 × 1.20)^(1/3) = 1.253^(1/3) = 1.0782. Subtracting 1 yields 7.82 percent. If you compute the geometric mean of the raw percentages (−5, 10, 20) without conversion, the result is meaningless because negative values are invalid and the scale is wrong. The calculator accepts only positive raw numbers, so users must perform the conversion manually.
What is the geometric standard deviation?
The geometric standard deviation measures multiplicative dispersion around the geometric mean. It is computed as exp( sqrt( Σ (ln(x_i) − ln(GM))² / (n − 1) ) ). A geometric standard deviation of 1.5 means that 68 percent of values fall within a multiplicative factor of 1.5 above or below the geometric mean, analogous to the arithmetic standard deviation in normal distributions. It is only meaningful when data are approximately log-normal. The calculator does not compute geometric standard deviation because it requires a different formula and interpretation, but users can derive it from the same log-transformed values used for the geometric mean.
Can I compute geometric mean with zeros in the data?
No. If any value is zero, the product of all values is zero, and the nth root of zero is zero regardless of the other values. This collapses the geometric mean to zero, destroying all information about the non-zero values. In practice, analysts replace zeros with small positive constants or use alternative summary statistics such as the median or arithmetic mean. The calculator rejects zero inputs because a geometric mean of zero is usually an artifact of data coding rather than a meaningful summary. Users with data containing zeros should consider whether zero represents a true absence or a censored measurement before selecting a summary statistic.
Why is GM used for benchmark scores?
Fleming and Wallace (1986) proved that the geometric mean is the only correct way to summarize normalized benchmark results. When multiple benchmark programs are run on different machines and their execution times are normalized to a reference machine, the arithmetic mean of the normalized ratios depends on which machine is chosen as the reference. The geometric mean is reference-independent: normalizing by any reference machine and then taking the geometric mean yields the same relative performance ranking. This invariance property makes the geometric mean the industry standard for SPEC CPU benchmark reporting and for academic computer architecture research.
How does GM handle missing data?
The calculator does not handle missing data implicitly. If a user enters an empty string or an unparsable token, the calculator throws an InvalidInputError on the values field. Analysts with incomplete data must decide whether to omit missing values and compute the geometric mean on the complete cases, or to impute values using statistical models. Omitting values is valid under missing-completely-at-random assumptions but can bias results if missingness depends on the unobserved values. The calculator operates only on complete, comma-separated lists of positive numbers.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon