Inputs
Weighted average5.67
Ready
A plain mean treats every number as one vote. A weighted average lets a vote count more than once. Multiply each value by its weight, add those products, and divide by the sum of the weights. For 2, 4, 6, and 8 with weights 1, 1, 2, and 2 the products are 2, 4, 12, and 16. They sum to 34. The weights sum to 6. 34 / 6 is 5.67. The unweighted mean of the same four numbers is 5, so the heavier 6 and 8 pulled the result up.
The two lists have to be the same length, in the same order. Weights cannot be negative, and they cannot sum to zero. A weight of 0 drops that value out. Equal weights reproduce the ordinary mean, which is a useful check: weights 1, 1, 1, 1 on this list return 5.
Grades are the classic case, and so are prices bought at different volumes. The weight is credits, or shares, or kilograms, not a second copy of the value unless you mean the value to count that many times. Percent weights are fine if they describe the mix you intend. They do not have to sum to 100, because the page divides by whatever total you gave it.
Values 2, 4, 6, 8. Weights 1, 1, 2, 2.
Weighted average 5.67. The products 2 + 4 + 12 + 16 equal 34, and 34 / 6 is 5.67.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
Sum of (value × weight), divided by the sum of the weights. (2×1 + 4×1 + 6×2 + 8×2) / 6 = 34 / 6 = 5.67.
5 is the unweighted mean, where every value has the same weight. Here 6 and 8 each count twice, so they pull the average up to 5.67.
No. The page divides by the actual total. Weights 1, 1, 2, 2 and weights 25, 25, 50, 50 describe the same mix.
Zero drops that value. Negative weights are rejected. The total weight has to be greater than zero.
The lists must match in length and order. An extra weight, or a missing one, is an error rather than a silent shift.