Averages

How to Calculate a Weighted Average: Formula and Examples

Calculate a weighted average with percentage, frequency, credit, price, or portfolio weights and handle edge cases correctly. This guide explains the reasoning, not just the keystrokes.

Published · Updated · 6 min read

Why weights change an average

An ordinary arithmetic mean gives each listed value one equal vote. A weighted average gives a value influence in proportion to an associated weight. The weight may represent a course percentage, number of units, credit hours, sample count, money invested, or another nonnegative measure of importance or exposure. The formula is weighted mean = Σ(value × weight) ÷ Σweights. The numerator is the weighted sum; the denominator is total weight.

A weight does not have to be a percentage. Weights of 1, 2, and 3 produce the same result as 10, 20, and 30 or 1/6, 2/6, and 3/6 because multiplying every weight by the same positive factor changes numerator and denominator equally. This rescaling is normalization. What matters is the relative size of weights and that all weights use one coherent scale.

A reliable weighted-sum workflow

Create one row per value. Confirm what its weight means and that it covers the same unit and period as other weights. Multiply value by weight for each row, add the products to obtain the weighted sum, add the weights to obtain total weight, then divide. Retain full precision until the final result. For nonnegative weights with positive total weight, the result must lie between the smallest and largest values carrying positive weight.

If weights are percentages that sum to 100%, dividing the weighted sum by 100 produces the result. Decimal percentage weights such as 0.6 and 0.4 sum to 1, so no visible final scaling is needed—but the general formula still applies. Never mix 60 and 0.4 in the same table: one is a whole-percent scale and the other is a decimal proportion scale. Convert all weights consistently before calculation.

Worked example: a course grade

Input: exam score 70 with weight 60%, project score 90 with weight 40%. Formula: weighted mean = Σ(score × weight) ÷ Σweights. Calculation: (70 × 60 + 90 × 40) ÷ (60 + 40) = (4,200 + 3,600) ÷ 100 = 7,800 ÷ 100 = 78. Result: the weighted course score is 78. Interpretation: the lower exam score has more influence because it represents 60% of the grade.

The ordinary mean would be (70 + 90) ÷ 2 = 80, which incorrectly gives the exam and project equal influence. Using decimal weights gives the same result: 70 × 0.60 + 90 × 0.40 = 42 + 36 = 78, with total weight 1. Before interpreting the number as an official grade, check the course’s actual policy for categories, dropped work, rounding, and minimum requirements; this example demonstrates only the mathematics.

Worked example: weights that do not total 100

Input: quality scores 82, 91, and 76 with importance weights 2, 5, and 3. Formula: Σ(value × weight) ÷ Σweights. Calculation: (82 × 2 + 91 × 5 + 76 × 3) ÷ (2 + 5 + 3) = (164 + 455 + 228) ÷ 10 = 847 ÷ 10 = 84.7. Result: the weighted average is 84.7. Interpretation: the score of 91 has half of the total influence because its weight is 5 out of 10.

The weights total 10, not 100, and remain valid. Normalizing them gives 0.2, 0.5, and 0.3; then 82 × 0.2 + 91 × 0.5 + 76 × 0.3 = 84.7. A common error is to assume the products already form the final answer even when weights total 10 or 75. Always divide by total weight unless the weights were deliberately normalized to sum to 1.

Worked example: quantity-weighted purchase price

Input: 10 items bought at $4 each and 30 items bought at $6 each. Formula: average unit price = Σ(price × quantity) ÷ Σquantity. Calculation: ($4 × 10 + $6 × 30) ÷ (10 + 30) = ($40 + $180) ÷ 40 = $220 ÷ 40 = $5.50. Result: the average purchase price is $5.50 per item. Interpretation: more units were purchased at $6, so the result is nearer $6 than $4.

Simply averaging the two prices gives $5 and ignores quantity. This example is also a frequency-weighted mean: price $4 occurs for 10 units and price $6 for 30 units. Costs such as taxes or shipping belong in the calculation only if the requested definition includes them, and quantities must use comparable units. Ten cases and thirty individual items cannot be combined until cases are converted to an item count.

Credits and portfolio exposure

Input: course marks 88 for 3 credits, 74 for 4 credits, and 92 for 2 credits. Formula: credit-weighted mean = Σ(mark × credits) ÷ Σcredits. Calculation: (88 × 3 + 74 × 4 + 92 × 2) ÷ 9 = (264 + 296 + 184) ÷ 9 = 744 ÷ 9 ≈ 82.67. Result: the credit-weighted mark is about 82.67. Interpretation: the four-credit course has the greatest influence.

The same arithmetic can summarize portfolio returns by capital exposure. For a purely mathematical illustration, $6,000 returning 4% and $4,000 returning −2% give (4% × 6,000 + −2% × 4,000) ÷ 10,000 = 1.6%. This is not investment advice and may not represent time-weighted performance, cash flows, fees, risk, or taxes. Use weights that match the analytical question rather than assuming every financial summary is a simple weighted mean.

Zero, negative, and inconsistent weights

A zero weight makes a row’s product zero and gives it no influence; keeping the row may document an excluded component, but removing it does not change the result. If every weight is zero, total weight is zero and the weighted mean is undefined. Do not display zero as the answer. A blank weight is ambiguous and should be corrected rather than silently treated as either zero or one.

The ordinary Weighted Average Calculator is designed for nonnegative weights. Negative weights can arise in specialized models, hedged positions, contrasts, or corrections, but they break the familiar “share of importance” interpretation and can place a result outside the input range. They are outside this tool’s intended scope. Weight scales also cannot be mixed: credit hours, percentages, and item counts express different denominators unless a documented model first converts them to one common influence scale.

Calculator limits, checks, and related methods

The Weighted Average Calculator accepts paired values and weights, displays the weighted sum and total weight, and calculates their quotient. It can handle weights that do not total 100 and zero-weight rows when positive total weight remains. It cannot decide what weights should be, reconcile inconsistent scales, validate institutional grading rules, model specialized negative weights, or rescue a zero total weight. Inputs must encode a defensible model before the numerical result is meaningful.

Common mistakes are averaging products without dividing by total weight, pairing a weight with the wrong value, mixing 40 with 0.6, and averaging group means without their group sizes. A combined average is precisely a weighted average in which each group mean is weighted by its count. Use the arithmetic-average guide when every individual value has equal influence, and inspect the misleading-average guide when selection, missing observations, or hidden subgroups could make even a correctly weighted result unrepresentative. As a final audit, list every pair, recompute each product, confirm that displayed total weight equals the sum of rows, and multiply the reported mean by total weight to recover the weighted sum. A result outside the range of positive-weight values signals an entry, sign, scale, or arithmetic error. If weights were rounded percentages, note that they may total 99.9 or 100.1; the general division by their actual total handles that small discrepancy more honestly than silently altering one category. Keep source values and weights at full precision until the quotient is checked, then round according to the purpose of the report rather than the calculator display alone.

Frequently asked questions

Do weights have to add up to 100?

No. Any consistent nonnegative scale works because the weighted sum is divided by total weight. Weights of 2, 5, and 3 are valid.

What does a zero weight do?

It gives that value no influence. The row contributes zero to both the weighted sum and effective total influence.

What happens when total weight is zero?

The result is undefined because the formula would divide by zero.

How is a weighted average different from an ordinary average?

An ordinary mean gives every listed observation equal influence; a weighted mean assigns influence in proportion to stated weights.

Does the calculator support negative weights?

Negative weights are outside the ordinary tool's intended scope because they require a specialized interpretation and can put the result outside the input range.