Weighted average calculator
Values on the left, how much each one counts on the right. The weights do not have to add up to anything in particular, which matters, because the shortcut everybody learns — multiply each value by its weight and add — is correct only when they total exactly 1. Nothing you type here leaves your browser — it is worked out on your own device, so there is nothing to send and nothing to log.
The shortcut is right in every textbook and almost nowhere else
A weighted mean is the sum of value × weight, divided by the sum of the weights:
mean = ( x₁w₁ + x₂w₂ + … ) ÷ ( w₁ + w₂ + … )
The division is the part that gets dropped, because in every worked example the weights add up to 1 and dividing by 1 changes nothing:
| 80, 90, 100 weighted 0.2, 0.3, 0.5 | shortcut 93, correct 93 |
|---|---|
| … weighted 2, 3, 5 | shortcut 930, correct 93 |
| … weighted 20, 30, 50 | shortcut 9,300, correct 93 |
Same three values, same proportions, three answers an order of magnitude apart. This page always divides, and tells you what your weights came to, so you can see whether it mattered.
A negative weight moves the answer outside the data
Weights are usually shares of something and cannot be negative. Sometimes they genuinely are — a short position, a correction term, an extrapolation — and then the result stops behaving like an average at all:
| 10 and 20, weighted 3 and −1 | 5 — below both values |
|---|---|
| 10 and 20, weighted 1 and −3 | 25 — above both |
| 10 and 20, weighted 3 and 1 | 12.5 — between them, as an average should be |
With every weight positive, a weighted mean is always between the smallest and largest value. That guarantee is the only thing making it an average, and one negative weight removes it. Nothing in the arithmetic objects, so this page does: when the answer falls outside your data, the reading says so.
Why the sums are compensated
Both sums here — the products and the weights — are added with Neumaier compensation rather than a plain running total, which keeps the part an ordinary addition discards. On two thousand values near 1 with one large outlier, adding plainly gives 1.0000000005501901 and compensating gives 1.000000000550189. The difference is small and it is free to avoid.
If your weights are exam marks and course percentages, the weighted grade calculator asks the question in those words and works out what you need on the rest. This page is the same arithmetic without the assumption that the numbers are marks.
Where to go next
- Percentage difference calculator
- Geometric mean calculator
- Proportion calculator
- Weighted grade calculator — the same arithmetic, asked in exam marks.
- Mean, median and standard deviation
- Every tool on the site