StatGardenREF. DESK
Calculators/Statistics/Weighted average
Statistics

Weighted average calculator

Average where each value carries its own weight.

What this calculator does

A weighted average lets some values count for more than others. It is the right tool whenever the items being averaged are not equally important: assessments worth different percentages, portfolio holdings of different sizes, or prices across products selling in different volumes.

The gap between the weighted and unweighted average is often the interesting part. When they diverge substantially, it means the heavily weighted items differ systematically from the lightly weighted ones, which is usually worth investigating on its own.

The formula

Formulax̄w = Σ(wᵢxᵢ) / Σwᵢ

Each value is multiplied by its weight, the products are summed, and that total is divided by the sum of the weights. When every weight is equal this reduces exactly to the ordinary mean, which is why the plain average is just a weighted average with uniform weights.

TermMeaning
Weighted averageΣ(wᵢxᵢ) ÷ Σwᵢ.
WeightHow much each value counts.
Weighted totalThe sum of value × weight before dividing.

The inputs explained

FieldWhat to enter
Values (comma separated)The values, separated by commas.
Weights (comma separated)The weights, in the same order. They need not sum to 100 or to anything in particular: only their relative sizes matter.

When to use it

Calculating a course grade

Assessment marks with their percentage weightings. A 90 on a task worth 10 per cent moves the final grade far less than a 70 on one worth half.

Portfolio returns

Each holding’s return weighted by the amount invested. The unweighted average would treat a $500 position the same as a $50,000 one.

Average price across products

Prices weighted by units sold gives the true average transaction value. This is how price indices are constructed.

Combining survey results

When subgroups are sampled at different rates, weighting by their true population share corrects the bias that simple averaging would introduce.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the weights change the answer

The same four values with different weighting schemes applied.

Values 85, 72, 90, 68
WeightsWeighted averageUnweighted averageSum of weights
25, 25, 25, 2578.75078.750100.000
10, 20, 30, 4077.10078.750100.000
40, 30, 20, 1080.40078.750100.000
70, 10, 10, 1082.50078.750100.000
10, 10, 10, 7072.30078.750100.000
Equal weights reproduce the plain average exactly. The last two rows show how far a single dominant weight pulls the result toward that one value.

A typical course grade calculation

A fixed weighting scheme applied to different sets of marks.

Weights 20, 30, 30, 20
MarksWeighted averageUnweighted average
85, 72, 90, 6879.20078.750
60, 60, 60, 6060.00060.000
95, 50, 50, 9568.00072.500
50, 95, 95, 5077.00072.500
40, 80, 80, 4064.00060.000
Rows three and four contain the same four marks in a different order. The weighted results differ while the unweighted ones do not: which is the whole point of weighting.

Questions

Do weights have to add up to 100?

No. Only the ratios matter, since the calculation divides by the sum of the weights. Weights of 1, 2, 3 give exactly the same result as 10, 20, 30.

What if I have more values than weights?

The calculator uses as many pairs as it has, ignoring any extras. Check that both lists are the same length, since a mismatch usually means a typo.

Can a weight be zero?

Yes: that value is then excluded from the average entirely, which is a convenient way to drop an item without deleting it from your list.

When is a weighted average the wrong tool?

When the quantities are rates that need combining over different bases: average speed over two legs of a journey, for instance, must be weighted by time rather than by distance. Choosing the wrong weighting variable is the most common error.

How is this different from GPA?

It is the same calculation. GPA weights grade points by credit hours, which is exactly a weighted average with credits as the weights.

For unweighted summaries, see descriptive statistics. For academic grades specifically, use the GPA calculator.