Weighted Average Calculator
A weighted mean from two comma-separated lists, with the plain mean beside it for comparison.
What this page computes
Type the values and the weights as two comma-separated lists, one weight per value. The weighted mean is Σwx / Σw; the page prints it with Σwx, Σw, the count and the unweighted mean, so a reader can see how much the weights moved the answer. Weights are not normalised, since only the ratio matters. Figures print to six significant figures.
A weight of zero or below is refused rather than skipped, because silently dropping a value is a different calculation. The two lists must be the same length; a mismatch is refused with both counts, and a non-numeric item is refused by its position.
Everything runs in the browser. The same two lists produce the same mean after any reload.
The page computes a weighted mean: Σwx/Σw, with the unweighted mean printed beside it for comparison. Values 80, 90 and 70 with weights 1, 2 and 1 give 82.5 against an unweighted 80, and the sums Σwx = 330 and Σw = 4 are shown so the division can be checked. Every weight must be above zero, because a zero weight would silently drop a value the visitor entered.
Average a list with weights, and see the unweighted mean beside it. Both lists are comma-separated.
How to use it
Type the values as a comma-separated list and the weights the same way. The two lists must be the same length, and unequal lengths are refused with both counts named. Every weight must be greater than zero; a negative or zero weight is refused rather than quietly removing that value from the average.
Weights are relative, and zero is refused
Weights are relative, not percentages: 1, 2 and 1 means the middle value counts twice as much, and the same answer comes from 10, 20 and 10. The unweighted mean is printed beside the weighted one because the gap between them is the whole effect of the weighting, and Σwx and Σw are printed so the arithmetic is auditable rather than asserted. A weight of zero is refused because dropping a value is a decision the page should not make silently.
What to Expect
Best for
- Averaging values that do not all count equally
What this tool keeps
- Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.
Sample output
weighted mean = 82.5 Σwx = 330, Σw = 4 unweighted mean = 80 (for comparison) n = 3 values
Frequently asked questions
Do the weights have to add up to 1?
No. They are relative, so 1, 2 and 1 gives the same answer as 10, 20 and 10. The printed Σw shows the total that was divided by.
Why is a zero weight refused?
Because a zero weight would silently drop that value from the average, and dropping an entered value is a decision for you rather than the page. Negative weights are refused for the same reason.
Is anything uploaded?
No. Both sums and the weighted mean are computed in this page, and nothing is posted to a server or stored.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.