Weighted Average Calculator
Calculate a weighted arithmetic mean from value,weight rows, allowing zero weights but rejecting negative weights. The result includes total weight, total rows, and positive-weight rows so you can check which observations actually influence the answer.
By Dr. Hassan Khames EliwaLast updated
Result
- Total weight
- 6
- Rows
- 3
- Positive-weight rows
- 3
How it works
Give each value its intended influence
A weighted average is sum(value × weight) / sum(weight). Each weight describes relative influence: frequency, exposure, credit hours, or another relevant quantity. The weights need not total one or one hundred. Multiplying every weight by the same positive constant leaves the weighted average unchanged because that constant cancels between numerator and denominator.
Enter one pair per line, with a comma between the value and weight. For example, 80, 2 assigns twice as much influence to 80 as a weight of one would. Values may be negative, but weights must be nonnegative. At least one weight must be positive; otherwise there is no total influence to distribute and the denominator would be zero.
Match the weight to the question
An average price across purchases should normally use quantities purchased, not the number of receipts. An overall course grade can use assessment percentages if the assessments are already scored on compatible scales. Combining scores out of ten with scores out of one hundred without normalization produces an answer that reflects incompatible units rather than academic performance.
This implementation normalizes each weight by the total before multiplying by its value, reducing unnecessary intermediate growth. It accepts at most 1,000 rows and bounds both weight and absolute value at 1e100. Blank entries, malformed pairs, negative weights, and an all-zero weight column return validation messages. There is no silent assumption that an omitted weight means one.
Understand zero-weight records
A zero-weight row remains visible in the total row count but does not affect the mean. This is useful when an excluded observation should remain in an audit trail. The positive-weight count reveals the effective number of contributing rows, although it is not a statistical effective sample size.
Worked example
Combine three assessment results
A student scores 80 points on an assessment weighted 2, 90 points on one weighted 3, and 70 points on one weighted 1. Enter the default three rows exactly as shown in the form.
The weighted numerator is 80 × 2 + 90 × 3 + 70 × 1 = 500 point-weight units. Total weight is 2 + 3 + 1 = 6. The weighted average is 83.333333 points, with 3 rows and 3 positive-weight rows. The plain unweighted average would be 80 points, which gives the smaller assessments too much influence relative to the stated weighting scheme.
Adding a fourth row of 100, 0 leaves the weighted average at 83.333333 points and total weight at 6. Total rows becomes 4 while positive-weight rows stays 3. This illustrates why the calculator reports both counts rather than calling every pasted line an influential observation.
Expert tips
Common mistakes
- Do not average subgroup averages equally when subgroup sizes differ. If the intended result is the overall per-person mean, use the underlying subgroup counts as weights.
- Do not replace a missing observation with zero unless zero is the actual measured value. Excluding a row and giving it a genuine zero value answer different questions.
- Do not mix percentage weights and fractional weights in one column accidentally. A weight of 30 is one hundred times a weight of 0.30, not an equivalent entry.
Frequently asked questions
Must weights sum to 100?
No. Counts, proportions, and percentages all work if they are used consistently. The total is explicitly divided out rather than assumed to equal a preset amount.
Are negative values allowed?
Yes. A value such as a negative temperature or return is supported. The restriction applies to weights, which must be zero or positive.
Why are negative weights rejected?
They can move the answer outside the observed range and represent a different mathematical construction. This tool intentionally implements the ordinary nonnegative weighted mean.
Can every weight be zero?
No. Their sum would be zero, so division is undefined. Include at least one contributing observation or reconsider why all rows were excluded.
Is this a weighted median?
No. A weighted median uses cumulative weight to locate a central value. This calculator multiplies and sums values to obtain an arithmetic mean.
How should I compare with an ordinary average?
Use the average calculator with the same values. If every weight is equal and positive, the ordinary and weighted means agree; unequal weights generally change the answer.
Related calculators
Related guides
MathWeighted averages: where simple averages misleadChoose weights that match the question, combine rates from their denominators, and avoid misleading averages of prices, speeds and percentages.16 November 2026 · 8 min read
MathStandard deviation without the jargonThe average tells you the centre. Standard deviation helps describe the spread, provided you know what the data represents.14 November 2026 · 7 min read
MathPercentages people get wrong: change, difference and pointsThe denominator determines the answer. Learn to distinguish percentage change, symmetric difference and percentage-point movements.14 November 2026 · 7 min readAbout the author
Dr. Hassan Khames Eliwa holds a PhD in Construction & Built Environment and has more than 20 years of international project controls experience. He is Director of Eliwa Project Controls Limited in Auckland and founder of PMMilestone.org and PMMilestone.com.
Buy me a coffee