Weighted Geometric Mean Calculator
Average positive values when each one carries a different weight.
What it does
The weighted geometric mean extends the ordinary geometric mean by letting each value contribute by a different amount. It is the exponential of the weighted average of the logarithms, which makes it the natural choice when inputs combine multiplicatively.
This tool takes a list of positive values and a matching list of weights. It returns the weighted result, the unweighted geometric mean for comparison, and the total weight used.
Index numbers and composite indicators often use this mean because a doubling in one component has the same proportional effect regardless of scale. The weights decide how much each component matters, and only their relative sizes count.
A zero or negative value cannot be used because the logarithm is undefined. Zero weights are allowed and simply remove a value from the calculation. If all weights are zero there is nothing to average and the tool returns an error.
How to use
- Enter positive values separated by commas or spaces.
- Enter one weight for each value, in the same order.
- Read the weighted geometric mean in the main result.
- Compare it with the unweighted geometric mean.
- Check the total weight that was used.
- Rescale the weights to confirm the answer does not change.
Formula
- x(i)
- The ith value, strictly positive.
- w(i)
- The weight of the ith value, non-negative.
- ln
- The natural logarithm.
Multiplying every weight by the same constant leaves the result unchanged, so weights do not need to sum to one. The equivalent power form raises the product of each value to its weight and then takes the root whose degree is the total weight. The unweighted geometric mean shown for comparison uses equal weights of one. Because the calculation works in logarithms, the tool rejects zero and negative values rather than returning a complex number.
Worked example
Example: 2, 8 and 32 with weights 1, 1 and 2
Values 2, 8, 32 and weights 1, 1, 2.
- Total weight = 1 + 1 + 2 = 4.
- Weighted log sum = 1 x ln2 + 1 x ln8 + 2 x ln32.
- That is 0.693147 + 2.079442 + 6.931472 = 9.704061.
- Divide by the total weight: 9.704061 / 4 = 2.426015.
- Exponentiate: exp(2.426015) = 11.313708.
- The unweighted geometric mean of the three values is 8.
Reference table
| Values | Weights | Weighted mean | Unweighted mean |
|---|---|---|---|
| 2, 8 | 1, 1 | 4 | 4 |
| 2, 8 | 1, 3 | 5.656854 | 4 |
| 2, 8, 32 | 1, 1, 2 | 11.313708 | 8 |
| 1, 4 | 1, 1 | 2 | 2 |
| 3, 12 | 1, 2 | 7.559526 | 6 |
Limits
- Values must be positive; zero and negatives are rejected.
- The result is meaningless if the values have different units.
- Very large values can lose precision in the log sum.
- All zero weights produce an error rather than a result.
Common mistakes
- Entering weights in a different order from the values.
- Using zero or negative values and expecting a number.
- Assuming weights must sum to one.
- Confusing this with the weighted arithmetic mean.
- Forgetting that equal weights recover the ordinary geometric mean.
Try it yourself
Quick checks. Answers sit tucked under each question.
Values 2 and 8 with equal weights. Weighted geometric mean?
sqrt(16) = 4.
Values 2, 8, 32 with weights 1, 1, 2?
exp(9.704061 / 4) = 11.313708.
Do the weights need to add to one?
No. Only their relative sizes matter.
Questions
What is a weighted geometric mean?
The exponential of the weighted average of the logarithms of the values.
When should I use it?
When values combine multiplicatively and carry unequal importance.
Can a value be zero?
No. The logarithm is undefined there.
Can a weight be zero?
Yes. That value is then ignored.
Must the weights sum to one?
No. Scaling all weights leaves the result the same.
How does it differ from the arithmetic version?
It uses logs and products, so it is pulled less by large values.