Advertisement

Weighted average calculator

Enter a list of values and a list of matching weights. Each value is multiplied by its weight before the total is divided by the sum of the weights.

Calculator

Separate numbers with commas, spaces or new lines.

Non-negative numbers, one for each value. At least one weight must be above zero.

Weighted average
78.3333333333
Sum of weights
6.0000000000
Unweighted mean
80.0000000000

Advertisement

How this calculator works

A weighted average gives each value a share of the final result. Multiply every value by its weight, add the products and divide by the total of the weights. A value with weight 2 counts twice as much as one with weight 1, and a weight of zero removes a value entirely. If the weights add to 1 the division changes nothing, but weights do not have to be normalised; only their relative sizes matter.

Formula

Weighted average = (w₁x₁ + w₂x₂ + ... + wₙxₙ) / (w₁ + w₂ + ... + wₙ), with at least one weight above zero.

Worked example

For values 80, 90 and 70 with weights 1, 2 and 3, the numerator is 80 + 180 + 210 = 470 and the weights total 6, so the weighted average is 470/6 ≈ 78.333. The unweighted mean is 240/3 = 80.

Advertisement

Frequently asked questions

What is the difference between a weighted average and a simple mean?

A simple mean gives every value the same weight. A weighted average lets some values count more, which is appropriate when entries come from groups of different sizes or carry different importance.

Do the weights need to add up to 1 or 100?

No. Dividing by the sum of the weights normalises them automatically. Scaling every weight by the same factor leaves the weighted average unchanged.

Can a weight be negative?

Mathematically a negative weight can be defined, but it makes short positions and odd cancellations possible and the result is no longer a weighted mean in the usual sense. This calculator accepts only non-negative weights.

When can a zero weight be useful?

A zero weight excludes a value without deleting it from the list, which is handy when a category is present but currently contributes nothing. At least one weight must remain above zero so the division is defined.

Sources

Advertisement