TapCub is live — analytics, insights and live chat, free on one platform
Glossary

Geometric mean: formula for growth rates and ratios

The geometric mean is the n-th root of a product. See why the arithmetic mean overstates compound growth, how ratios flip with the baseline, and what to do with zeros and negative values.

Lucas Hayes Reviewed by Chen Yu Also called geometric average Last updated Dec 3, 2026 Glossary

Quick answer

The geometric mean is the n-th root of the product of n positive numbers. It is the right average for values that multiply, such as period growth factors and ratios, and it is never higher than the arithmetic mean of the same positive values.

Formula: GM = (x1 × x2 × … × xn)^(1/n) = exp(mean of ln x); average growth = GM of (1 + rate) − 1

What is the geometric mean?

The geometric mean is the n-th root of the product of n positive numbers. Multiply all the values together, then take the root that matches how many there are. For 2 and 8 it is √(2 × 8) = 4, whereas the ordinary arithmetic mean is (2 + 8) ÷ 2 = 5.

The idea behind it is simple. The arithmetic mean answers "what single value, added n times, gives the same total?" The geometric mean answers "what single value, multiplied n times, gives the same product?" So it is the natural average whenever values combine by multiplication: growth from one period to the next, ratios such as new time divided by old time, and index changes.

A convenient way to compute it uses logarithms: average the natural logs of the values, then apply the exponential function. That is how the SciPy documentation writes the formula, and it avoids the overflow you get from multiplying hundreds of numbers together. For positive values that are not all equal, the geometric mean is always lower than the arithmetic mean.

Worked example: average growth rate

A campaign page's monthly visitors start at 10,000 and then change by +60%, −40%, +30% and −20% over four months (sample data).

MonthChangeGrowth factor (1 + change)Visitors at month end
Start10,000
1+60%1.6016,000
2−40%0.609,600
3+30%1.3012,480
4−20%0.809,984

The arithmetic mean of the four changes is (60 − 40 + 30 − 20) ÷ 4 = +7.5% per month. Apply 7.5% four times to 10,000 and you would expect about 13,355 visitors. The real figure is 9,984, slightly below the start.

The geometric mean works on the growth factors:

  1. Product: 1.60 × 0.60 × 1.30 × 0.80 = 0.9984.
  2. Fourth root: 0.9984^(1/4) = 0.99960.
  3. Subtract 1: −0.04% per month.

Apply −0.04% four times to 10,000 and you land on 9,984, exactly where the traffic ended. The same result through logs: the four natural logs are 0.4700, −0.5108, 0.2624 and −0.2231, their mean is −0.0004, and e^(−0.0004) = 0.99960.

Why does the arithmetic mean overstate? A 40% loss applies to the larger base that the 60% gain created, so percentages of different bases cannot simply be added. The gap widens as the swings get bigger. When only the first and last values matter, the same calculation is a compound rate; see compound monthly growth rate and how to calculate growth rate.

Worked example: averaging ratios

A rebuild changes load times on three pages (sample data):

PageOld (s)New (s)New ÷ oldOld ÷ new
Home2.01.00.502.00
Search1.02.02.000.50
Checkout4.03.20.801.25
Arithmetic mean1.101.25
Geometric mean0.9281.077

Read the arithmetic means and you get a contradiction. With the old version as the baseline, the new one averages 1.10 times the time, "10% slower". With the new version as the baseline, the old one averages 1.25 times the time, which says the new one is faster. The conclusion depends on which column you divided by.

The geometric means agree with each other: 0.928 and 1.077 are reciprocals (1 ÷ 0.928 = 1.077). Whichever baseline you choose, the new version comes out at about 93% of the old time on a per-page ratio basis. On benchmark scores, Fleming and Wallace argued in 1986 that summarizing normalized results with the arithmetic mean leads to mistaken conclusions, and recommended the geometric mean instead.

Be clear about the question, though. The total of the three pages fell from 7.0 to 6.2 seconds, a ratio of 0.886, because the checkout page is long and carries more weight in a sum. If users experience the total, report the total. If each page counts equally as a case, report the geometric mean of ratios. If pages have very different traffic, you need weights.

Zeros and negative values

The geometric mean is only meaningful for positive numbers.

DataWhat happensWhat to do
A negative valueIt has no logarithm; spreadsheet GEOMEAN returns an errorCheck whether you should average growth factors instead
Growth of −25%Factor 0.75, perfectly fineConvert every rate to 1 + rate first
Growth of −100%Factor 0, so the product is 0Report that the series went to zero
Zeros such as non-buyersMicrosoft's GEOMEAN returns #NUM!Report the share of zeros and the geometric mean of the rest, separately

A popular workaround adds 1 to every value, takes the geometric mean and subtracts 1. Be careful: the answer depends on the unit. Take revenue per visitor of $0, $9 and $99. In dollars, ∛(1 × 10 × 100) − 1 = $9.00. Convert to cents (0, 900, 9,900) and the same recipe gives ∛(1 × 901 × 9,901) − 1 ≈ 206 cents, or $2.06. Nothing about the visitors changed. For data with many zeros, split it into "how many bought" and "how much buyers spent".

Very small positive values are another trap. A single value near zero drags the geometric mean down hard, so check whether a tiny number is real or a rounding or tracking artifact.

Geometric mean vs arithmetic mean vs median

AverageCombines values byUse it forWeakness
Arithmetic meanAddingTotals: revenue per order, minutes per ticketPulled by large values; wrong for compounding
Geometric meanMultiplyingGrowth factors, ratios, skewed positive dataNeeds positive values; harder to explain
MedianPositionThe typical case in skewed dataIgnores how large the extremes are

For the values 1, 2, 4, 8 and 16, the arithmetic mean is 6.2, while the median and the geometric mean are both 4. Data that is roughly symmetric on a log scale behaves like this, and many durations and amounts lean that way. For the choice between the first and third rows, see mean vs median. Growth over several years is compared in annual growth rate.

How to calculate it in practice

  • Spreadsheet: =GEOMEAN(C2:C5) on a column of growth factors, then subtract 1. For the ratio table, point it at the ratio column.
  • By hand: take ln of each value, average, then take e to that power.
  • Python: scipy.stats.gmean accepts weights, which gives a weighted geometric mean.
  • Report it with: the number of periods, the first and last values, and the range of individual changes. "−0.04% a month" alone hides swings from −40% to +60%.

Do not average geometric means of unequal periods directly. Combine the underlying factors, or weight each log by its number of periods.

Using it with TapCub data

TapCub's metric formulas are basic arithmetic, so plan to finish a geometric mean in a spreadsheet.

  1. Get the series. In All-platform analytics › Behavior › Event analysis, chart unique visitors or an event count with monthly granularity over complete months, then use Export in the ⋯ menu to download CSV.
  2. Turn counts into factors. In the spreadsheet, divide each month by the month before. Leave out the current, unfinished month, which would otherwise enter as a large false drop.
  3. Apply GEOMEAN to the factor column and subtract 1. Check it: starting value × (1 + result)^n should reproduce the ending value.
  4. Mark the causes. Use Configuration › Annotations to note launches and campaigns on the chart, so a month with a factor of 1.6 is not mistaken for ordinary growth.

For per-page load time ratios, take the same percentile for each page before and after from Monitoring › Performance with a page breakdown, then compute the ratios outside.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Lucas Hayes

Data Engineer

Writes about event design, data quality, and collection workflows, with verifiable implementation methods for reliable analytics.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

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

Use it when values combine by multiplication: growth rates over successive periods, ratios to a baseline, or index changes. Use the arithmetic mean when values add up to a meaningful total, such as revenue or minutes. In the sample, +7.5% arithmetic hides a slight decline.

How do you calculate the geometric mean of percentages?

Convert each percentage change to a growth factor by adding 1, so −40% becomes 0.60. Multiply the factors, take the n-th root, then subtract 1. Never feed negative percentages directly into the formula.

Can the geometric mean be calculated with zero or negative numbers?

Not usefully. One zero makes the product zero, and negative values have no logarithm; spreadsheet GEOMEAN returns an error. For data with many zeros, report the share of zeros and the geometric mean of the positive values separately.

Is the geometric mean always lower than the arithmetic mean?

For positive numbers it is lower unless all values are identical, in which case the two are equal. The gap grows with the spread: for 2 and 8 the geometric mean is 4 against an arithmetic mean of 5.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics