Skip to content
Math & Scientific

Weighted Mean Calculator

Weighted Mean Calculator

Compute the weighted average of up to eight value-and-weight pairs. Fill in as many rows as you need — empty rows are simply ignored.

Value Weight

Weights must be positive numbers — zero and negative weights are rejected. Values may be any number, including negatives. If a row has a value, it must also have a weight.

Not every number in an average deserves an equal vote. A final exam should count more than a weekly quiz. A thousand customer ratings should outweigh thirty. Whenever some observations matter more than others, the ordinary average gives the wrong answer — and the weighted mean gives the right one.

The Weighted Mean Calculator handles exactly this situation. Enter up to eight value-and-weight pairs — exam scores with their percentage weights, share prices with share counts, ratings with review counts — and it returns the weighted mean, the total weight, and the sum of value × weight, with each pair's contribution shown on its own row.

This guide explains what a weighted mean is, how it differs from a simple average, the exact formula the calculator uses, and four fully worked examples whose numbers you can verify by hand.

What Does the Weighted Mean Calculator Do?

The calculator multiplies each value by its weight, adds those products together, and divides by the sum of the weights. The result is the weighted mean: the average that respects the relative importance of each input.

The result panel breaks the calculation into labeled rows. You see each pair's contribution — for example, "Pair 1: 90 × 0.3 = 27" — followed by the count of pairs used, the sum of value × weight, the total weight, and the final weighted mean. That row-by-row layout makes it easy to audit every step.

How to Use the Weighted Mean Calculator

Type each value in the left column and its weight in the right column, one pair per row. There are eight rows, but you only need to fill in the ones you have — completely empty rows are ignored automatically.

Weights must be positive numbers: exam percentages, share counts, review counts, or any measure of importance. Values can be any number, including decimals and negatives. If a row has a value, it must also have a weight — a half-filled row triggers an error message naming the row.

Press Calculate to see the weighted mean and its full breakdown. Press Reset to clear all eight rows and start over. If every row is empty, the calculator tells you that at least one value-weight pair is required.

Weighted Mean vs Simple Average

A simple average divides every number's influence equally. Take exam scores of 90, 80, and 70: the simple average is 80. But if the 90 was a final exam worth 50% of the grade and the 80 was a quiz worth 20%, the equal split misrepresents reality.

The weighted mean fixes this by giving each value a proportional voice. With weights 0.3, 0.2, and 0.5, the scores become 27, 16, and 35 — contributions of 78 total over a weight of 1.0, giving 78, not 80. The student who aced the final is rewarded accordingly.

When every weight is equal, the weighted mean collapses to the simple average. The simple average is therefore just a special case — the weighted mean with all weights set to one. Knowing both keeps you honest about which one a situation calls for.

The Weighted Mean Formula

The idea is straightforward: scale each value by its weight, add the scaled values up, then divide by the total weight to bring the result back to the original scale. Dividing by the total weight is what keeps the answer in the same units as the values.

The formula is:

Weighted mean = (sum of value × weight) ÷ (sum of weights)

In symbols, for values x₁, x₂, …, xₙ with weights w₁, w₂, …, wₙ, the weighted mean is (x₁w₁ + x₂w₂ + … + xₙwₙ) ÷ (w₁ + w₂ + … + wₙ). The calculator evaluates exactly this expression, and the result rows show the numerator, the denominator, and the quotient separately.

Why Weights Must Be Positive

A weight of zero would mean "this value does not count at all" — which is the same as leaving the row blank, so the calculator simply rejects it. A negative weight would mean "this value counts against the average", which breaks the logic of averaging entirely.

Behind the scenes, the division step is the reason. Dividing by the sum of weights only produces a sensible average when that sum is positive. Negative weights could make the denominator zero or negative, producing nonsense like an average outside the range of the values.

Values, on the other hand, are free to be negative. A weighted mean of profits and losses, or of temperature anomalies, routinely includes negative values. The restriction applies to weights only, and the calculator enforces it with a per-row error message.

Worked Example: Course Grades

First: a student's scores are 90 on homework, 80 on quizzes, and 70 on the final exam, with weights 0.3, 0.2, and 0.5. Enter 90 with 0.3, 80 with 0.2, and 70 with 0.5 in the first three rows.

Then: the calculator multiplies each pair — 90 × 0.3 = 27, 80 × 0.2 = 16, 70 × 0.5 = 35 — and shows each contribution as its own row.

Next: the sum of value × weight is 27 + 16 + 35 = 78, and the total weight is 0.3 + 0.2 + 0.5 = 1.0.

Finally: 78 ÷ 1.0 = 78, so the course grade is 78. Compare that with the simple average of 80 — the low final-exam score pulled the grade down because it carried the most weight.

Worked Example: Average Price per Share

First: an investor buys 4 shares at $12 and later 6 shares at $18. Enter 12 with weight 4 and 18 with weight 6.

Then: the contributions are 12 × 4 = 48 and 18 × 6 = 108, shown as two rows.

Next: the sum of value × weight is 48 + 108 = 156, and the total weight is 4 + 6 = 10 shares.

Finally: 156 ÷ 10 = 15.6, so the average cost per share is $15.60. This is the number brokers use for cost basis — it reflects that more money went in at the higher price.

Worked Example: Ratings From Unequal Groups

First: a product has a 4.5-star average from 120 reviews and a 3.8-star average from 30 reviews on another site. Enter 4.5 with weight 120 and 3.8 with weight 30.

Then: the contributions are 4.5 × 120 = 540 and 3.8 × 30 = 114.

Next: the sum is 540 + 114 = 654, and the total weight is 120 + 30 = 150 reviews.

Finally: 654 ÷ 150 = 4.36. Notice how close this is to 4.5 — the 120-review group dominates, as it should. A simple average of the two ratings would have given 4.15, unfairly dragging the score toward the small sample.

Worked Example: Using Only Some Rows

First: suppose you have only two pairs — a value of 12 with weight 4 and a value of 18 with weight 6 — and you leave the remaining six rows completely empty.

Then: the calculator skips every empty row silently. Only the two filled rows appear in the contribution rows of the result.

Finally: the weighted mean is 15.6, exactly as in the share-price example. Empty rows never count as zeros — they are excluded from both the numerator and the denominator, so you can use anywhere from one to eight pairs.

Common Weighted Mean Mistakes

The classic mistake is averaging the values first and then weighting the result. That order is backwards: you must multiply each value by its weight before adding, because the addition is what combines them. The calculator does this automatically, but hand calculations often slip here.

Another is forgetting to divide by the total weight. People add up the value × weight products and stop, producing a number that grows with the number of items — the sum of contributions, not the mean. The calculator's denominator row makes this step visible.

A third is using percentages as weights inconsistently — mixing 30% entered as 30 with 0.2 entered as a decimal. As long as every weight uses the same scale the mean is correct, but mixing scales skews everything. Pick decimals or whole numbers and stick with them.

Where Weighted Means Show Up

Gradebooks are the most familiar example: homework, quizzes, and exams each carry a percentage weight. Investment portfolios use weighted means for average purchase price and for portfolio returns weighted by position size.

Sports statistics lean on them too — a batting average is hits weighted by at-bats, and a quarterback rating blends components by their prescribed weights. In manufacturing, quality scores weight defect counts by severity.

Survey analysis is another home: combining ratings from groups of different sizes requires weighting by respondent count, exactly as in the ratings example. Anywhere the phrase "on average, accounting for size" appears, a weighted mean is hiding underneath.

How to Interpret Your Result

The headline weighted mean sits in the same units as your values: grade points, dollars, stars. It is the single number that fairly represents all your inputs given their weights.

The contribution rows are your audit trail. Each shows value × weight, so you can see which pair pulled the mean up and which pulled it down. In the grades example, the 35 from the final exam is the largest contribution — that is where the mean is most sensitive.

The total weight row tells you the scale of the denominator. When weights are percentages that sum to 1.0, the mean is simply the sum of contributions. When weights are counts, the total weight is the number of underlying observations.

Weights That Add to One vs Weights That Don't

When weights sum to 1.0 — like 0.3, 0.2, and 0.5 — the weighted mean is just the sum of the contributions, because dividing by 1.0 changes nothing. This is the gradebook convention and it reads cleanly.

When weights are counts — 4 shares, 120 reviews — they sum to something else entirely, and the division step does the real work of normalizing. Both conventions give correct answers; the formula handles them identically.

You can convert between conventions by dividing each weight by the total weight. Doing so turns any set of weights into the sum-to-one form without changing the mean — a handy check if your numbers look suspicious.

Negative Values Are Allowed — Negative Weights Are Not

It is worth repeating because it surprises people: values may be negative while weights may not. A weighted mean of monthly profits naturally includes losing months, and the math handles them fine.

What the math cannot handle is a weight that subtracts importance. A negative weight would let one input shrink the denominator while growing the numerator, and the result could land outside the range of the values — which no average should ever do.

The calculator enforces this boundary per row. Enter a zero or negative weight and you get an error naming the row, while negative values in the value column pass through without complaint.

Frequently Asked Questions

1. What is a weighted mean in simple terms?

It is an average where each number gets a vote proportional to its weight. Important numbers count more, unimportant ones count less. The formula is the sum of value × weight divided by the sum of weights.

2. When should I use a weighted mean instead of a regular average?

Whenever the inputs are not equally important: grades with different percentage weights, prices with different quantities, or ratings from groups of different sizes. If every input matters equally, the regular average is fine.

3. Do my weights need to add up to 1 or 100?

No. The formula divides by the total weight, so any positive weights work — counts like 4 and 6 give the same structure as decimals like 0.3 and 0.2. Percentages are a convention, not a requirement.

4. Can weights be zero or negative?

No. The calculator rejects zero and negative weights with a per-row error message. A zero weight means the row should simply be left blank, and negative weights would break the averaging logic.

5. Can values be negative?

Yes. Values may be any number, including negatives — think of averaging profits and losses. Only weights are restricted to positive numbers.

6. What happens to rows I leave blank?

They are ignored completely — excluded from both the numerator and the denominator. You can use anywhere from one to eight rows, and the mean is computed only from the rows you filled.

7. What if I fill in a value but forget the weight?

The calculator shows an error naming that row and asks you to enter a weight or clear the row. Half-filled rows are never silently treated as zero.

8. How is this different from a simple average of the values?

The simple average gives every value an equal vote. In the grades example, the simple average is 80 while the weighted mean is 78, because the final exam carried the most weight. Equal weights make the two identical.

9. Why is the average cost per share a weighted mean?

Because you spent different amounts at different prices. Buying 4 shares at $12 and 6 at $18 gives a weighted mean of $15.60 — closer to $18, where most of your money went.

10. Can I weight by percentages like 30 and 20?

Yes, as long as every weight uses the same scale. Weights of 30, 20, and 50 give the same mean as 0.3, 0.2, and 0.5. Do not mix the two scales in one calculation.

11. What does the "sum of value × weight" row tell me?

It is the numerator of the formula — the total of all weighted contributions. Dividing it by the total weight gives the mean. Checking it is the fastest way to audit a hand calculation.

12. What does the "total weight" row tell me?

It is the denominator: the sum of all weights. With percentage weights it is usually 1.0; with counts it is the number of underlying observations, like total shares or total reviews.

13. Can the weighted mean fall outside the range of my values?

No — with positive weights, the mean always lands between the smallest and largest value. If you ever compute one that does not, a weight was entered wrong.

14. How many decimal places does the result show?

Up to four decimal places, with trailing zeros trimmed. That is plenty of precision for grades, prices, and ratings.

15. Is a weighted mean the same as an expected value?

They share the same formula — probabilities are weights that sum to one. An expected value is the weighted mean where the weights are probabilities of each outcome.