Logo

MonoCalc

/

Geometric Mean Calculator

Math

Quick presets:

About This Tool

🔢 Geometric Mean Calculator – Multiplicative Average for Growth & Ratios

The geometric mean is the central measure of choice whenever values combine through multiplication rather than addition. Investment returns compound, population grows by a percentage each year, and pH values are logarithmic — in all these situations the geometric mean gives a more truthful "typical" value than the arithmetic mean.

What Is the Geometric Mean?

For n positive numbers x₁, x₂, … xₙ, the geometric mean is the nth root of their product:

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

The calculator uses the mathematically equivalent log-domain formula to avoid overflow with large or very small datasets:

GM = exp( (1/n) × Σ ln(xᵢ) )

For weighted inputs, each logarithm is scaled by its weight before averaging:

GM_w = exp( Σ(wᵢ × ln(xᵢ)) / Σwᵢ )

When to Use the Geometric Mean

📈

Investment Returns

Compound annual growth rate (CAGR) is the geometric mean of yearly return factors. A portfolio that returns +50% then −50% has an arithmetic mean of 0% but a geometric mean of −13.4% — reflecting the actual loss.

🌱

Biological & Population Growth

Bacterial doubling times, species population changes, and cell-division rates all involve multiplicative scaling. The geometric mean of growth factors gives the average per-generation multiplier.

📊

Index & Ratio Data

Financial indices like the CPI sometimes use geometric means to prevent high-priced items from dominating. Price relatives, speed ratios, and normalized scores benefit from the same property.

🔬

Logarithmic Scales

Sound intensity (decibels), earthquake magnitude (Richter), and acidity (pH) are logarithmic. The geometric mean of values on such scales corresponds to the arithmetic mean of the underlying log values.

Geometric Mean vs. Arithmetic Mean

The AM–GM inequality guarantees that the arithmetic mean is always greater than or equal to the geometric mean, with equality only when all values are identical. The gap between the two grows with the variance of the dataset — this is precisely why volatile asset returns look better as arithmetic averages than as compounded (geometric) ones.

💡 Worked Example

Returns of +10%, −5%, +20% become factors 1.10 × 0.95 × 1.20 = 1.254. Geometric mean of factors ≈ 1.0798, so the equivalent constant rate ≈ 7.98% per period. The arithmetic mean of the raw returns is 8.33% — an overestimate because it ignores compounding drag.

Calculation Modes

Raw Dataset: Enter a plain list of positive numbers. Each value is treated as equally important.
Weighted Dataset: Assign a continuous importance factor to each value. Useful for portfolio weights, credit hours, or survey scores with unequal sample sizes.
Frequency Table: Enter each distinct value once and specify how many times it appears. Ideal for summarized datasets from spreadsheets.
Growth Rate Chain: Enter percentage returns directly (e.g. 10, -5, 20). The tool converts them to growth factors, computes the geometric mean, and reports the equivalent constant per-period rate.

Why Zero and Negative Values Are Excluded

A product containing zero collapses to zero, and any root of zero is zero — a useless average for the multiplicative context. Negative values produce a complex (imaginary) result for even roots; the geometric mean is only defined over the positive real numbers. If your dataset contains zeros or negatives, consider shifting values or switching to the arithmetic mean.

Log-Domain Computation for Numerical Stability

Multiplying hundreds of numbers directly risks floating-point overflow (Infinity) or underflow (0). By summing logarithms instead, the calculator remains accurate for datasets of any size. The precision slider (0–10 decimal places) controls how results are displayed, while internal calculations always use full IEEE 754 double-precision.

Tips for Accurate Results

  • Paste values directly from a spreadsheet — commas, spaces, and newlines are all recognized.
  • For percentage returns, use Growth Rate Chain mode rather than entering decimal factors manually.
  • Enable Compare with Arithmetic Mean to see the impact of variance on the two averages.
  • Turn on Show Steps to inspect individual log contributions and verify your dataset.
  • Use the Copy Results button to paste a summary into reports or spreadsheets.

Frequently Asked Questions

Is the Geometric Mean Calculator free?

Yes, Geometric Mean Calculator is totally free :)

Can I use the Geometric Mean Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Geometric Mean Calculator?

Yes, any data related to Geometric Mean Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is the geometric mean and when should I use it?

The geometric mean is the nth root of the product of n positive values. Use it for multiplicative data — investment returns, population growth rates, ratios, and index values — where compounding or relative change matters. It is always less than or equal to the arithmetic mean, and it naturally dampens the impact of extreme outliers.

How does this geometric mean calculator work?

Enter your positive values (comma, space, or newline-separated). The calculator uses log-domain math: it computes the average of the natural logarithms of your values and then applies the exponential function to return to the original scale. This avoids overflow and underflow with very large or very small datasets. Optional weights or frequencies let you compute a weighted geometric mean.

Why can't I enter zero or negative values?

The geometric mean requires taking the nth root of the product of all values. A product containing zero is zero, making the root undefined as a useful average. Negative values produce a complex (imaginary) result. For growth-rate mode, the tool converts percentages to factors (1 + r), so a rate of −100% would produce a factor of 0, which is still excluded.

What is the difference between weighted and frequency modes?

Frequency mode repeats each value a whole-number count of times before computing the mean — useful for summarized datasets. Weighted mode assigns a continuous importance factor to each value, allowing fractional weights such as portfolio allocations or credit-hour totals. Both use the same log-weighted formula; only the interpretation of the second column differs.

How is the growth-rate equivalent calculated?

Each percentage return r is converted to a growth factor (1 + r/100). The geometric mean of those factors is computed, then 1 is subtracted and the result is multiplied by 100 to give the equivalent constant per-period percent rate. For example, returns of +10%, −5%, and +20% yield factors 1.10, 0.95, and 1.20; their geometric mean minus 1 gives the constant rate that produces the same compounded result.

How accurate are the results for very large datasets?

The calculator uses JavaScript's native Math.log and Math.exp for all computations, which provides IEEE 754 double-precision accuracy (about 15–16 significant digits). Log-domain arithmetic means the tool handles products of hundreds of values without overflow, and the precision setting (0–10 decimal places) controls how results are displayed.