statcompute

Descriptive statistics

Weighted Average Calculator

An average where some items count more than others — grades, portfolios, price indices.

Also called weighted mean calculator, weighted average calculator.

Updated August 2026Runs in your browser — nothing is uploadedVerified against R
One value per line, or separated by commas, tabs or spaces. A header row is ignored.
One weight per value, in the same order. They do not have to add up to 1 or to 100.

The calculation runs in your browser, so this box needs JavaScript. The formula, the worked example and the interpretation below do not.

01

How to read this result

To compute a weighted average, multiply and then divide — in that order. Multiply each value by its weight, add those products up, and divide by the sum of the weights. Doing it the other way round — averaging the values and then applying a weight — gives a different and wrong answer whenever the weights differ.

Weights are relative, not absolute. They do not need to sum to 1 or to 100, because the formula divides by their total. Weights of 2, 3, 5 behave exactly like 20%, 30%, 50%.

Compare against the unweighted mean. The gap between them tells you how much the weighting is doing. If they are nearly identical, the weights are not earning their complexity.

Watch which items carry the weight. The contributions table shows each item's share of the total. An average dominated by one item with 60% of the weight is really that item plus noise, and it is worth knowing that before quoting the number.

This is the same calculation as a course grade, a portfolio return and a price index. So it is also the same calculation as Simpson's paradox: aggregating groups of different sizes can reverse a comparison, and the weights are where that happens.

02

The formula

x¯w=wixiwi
xi
each value
wi
its weight

With equal weights this reduces to the ordinary mean. The denominator is why the weights need no particular scale.

03

Worked example

A course grade from four assessments

Four pieces of assessment, worth 20%, 30%, 10% and 40% of the final mark. The scores are 85, 92, 78 and 95.

  1. Multiply each score by its weight.
    85 × 0.2 = 17.0 92 × 0.3 = 27.6 78 × 0.1 = 7.8 95 × 0.4 = 38.0
  2. Add the products.
    17.0 + 27.6 + 7.8 + 38.0 = 90.4
  3. Divide by the total weight.
    90.4 / 1.0 = 90.4
  4. Compare with the plain average of the four scores.
    (85+92+78+95)/4 = 87.5
weighted average 90.4unweighted mean 87.5total weight 1.0largest contributor the 40% assessment

The weighted average is three points higher because the best two scores carry 70% of the weight between them. The weakest score, at 10%, barely registers.

Checked against R's weighted.mean.

The calculator above is loaded with these numbers by the Load the worked example button.

04

Assumptions, and when to use something else

Weights must be non-negative and must not all be zero. Beyond that the calculation makes no assumptions — but the interpretation does: the weights have to mean something. Weighting by sample size gives a pooled estimate; weighting by importance gives a score; weighting by an arbitrary judgement gives an arbitrary number.

Negative weights are refused rather than computed, because an average that can fall outside the range of its inputs is almost always a mistake in the input.

  • All items count equallyArithmetic meanWith equal weights the weighted average is just the mean.
  • The values are growth rates or ratiosGeometric meanMultiplicative quantities need a multiplicative average.
  • You are combining group meansOne-way ANOVAWhen comparing rather than combining groups, a test is the right tool.
05

Questions people ask

Do the weights have to add up to 1?

No. The formula divides by their sum, so only the relative sizes matter. Weights of 1, 2, 3 give exactly the same answer as 10%, 20%, 30%.

How do I calculate a GPA?

Weight each course's grade point by its credit hours, add the products, and divide by the total credit hours — which is exactly this calculation with credits as weights.

What is a weighted average cost of capital?

The same arithmetic applied to financing: each source's cost weighted by its share of total capital. Enter the costs as values and the proportions as weights.

Can weights be negative?

This calculator refuses them. A negative weight lets the average fall outside the range of the values, which almost always means the weights have been entered wrongly rather than that a genuinely negative weight was intended.