How to calculate a weighted average in Excel (SUMPRODUCT)

A plain AVERAGE treats every row as equally important. A weighted average lets the bigger or more important rows pull the result more — which is what you actually want when averaging prices across different quantities, grades across different credit weights, or rates across different balances. This guide gives you the one-line SUMPRODUCT/SUM formula, a worked example, and the pitfalls to avoid.

Dr Waqas Rafique Dr Waqas Rafique · Founder & CTO · PhD, Statistical Machine Learning
· About

TL;DR

Weighted average = SUMPRODUCT(values, weights) / SUM(weights). In Excel with values in B2:B6 and weights in C2:C6: =SUMPRODUCT(B2:B6,C2:C6)/SUM(C2:C6). SUMPRODUCT multiplies each value by its weight and adds the products in one step; dividing by the total weight turns that into an average. The weights do not need to add up to 1 — the division handles any units.

Contents

  1. What a weighted average is
  2. Step 1 — Lay out values and weights
  3. Step 2 — SUMPRODUCT
  4. Step 3 — Divide by the total weight
  5. Step 4 — When to use it
  6. Worked example
  7. Common mistakes
  8. The 30-second shortcut

1.What a weighted average is

A weighted average is an average where each value carries a weight — a number that says how much that value should count. A plain average is just a special case where every weight is equal to 1. The moment the rows differ in size or importance, the plain average misleads, and the weighted average is the honest figure.

The classic example is price. If you bought 100 units at £2 and 10 units at £5, the plain average of the two prices is £3.50 — but you barely bought any of the expensive ones, so your true average cost is much closer to £2. Weighting each price by the quantity bought gives the right answer. The same logic applies to a portfolio yield (weight by holding size), a course GPA (weight by credit hours), or a blended discount rate (weight by spend).

Excel has no single WEIGHTEDAVERAGE function, but SUMPRODUCT divided by SUM does the job cleanly in one cell — no helper column required.

2.Step 1 — Lay out values and weights

Open Excel. Put your values in one column and the matching weights in the column beside them, row for row. The two ranges must be the same length and aligned — SUMPRODUCT pairs them up by position.

A (Item)B (Price)C (Quantity = weight)
Product A2.00100
Product B3.5040
Product C5.0010
Product D2.8060
Product E4.2020

3.Step 2 — SUMPRODUCT

SUMPRODUCT takes two (or more) ranges, multiplies them element by element, and adds up the results — all in one function call. For the numerator of a weighted average:

=SUMPRODUCT(B2:B6, C2:C6)

Behind the scenes this computes 2.00×100 + 3.50×40 + 5.00×10 + 2.80×60 + 4.20×20 = 642. That is the total value — here, the total amount spent. It is correct but it is a grand total, not an average yet; we fix that in the next step.

The beauty of SUMPRODUCT is that you never need a separate “price × quantity” helper column. It does the row-by-row multiplication and the addition together.

4.Step 3 — Divide by the total weight

To turn the weighted total into a weighted average, divide by the sum of the weights:

Weighted average = SUMPRODUCT(values, weights) / SUM(weights)
=SUMPRODUCT(B2:B6, C2:C6) / SUM(C2:C6)

The denominator SUM(C2:C6) = 100+40+10+60+20 = 230. So the weighted average price is 642 / 230 = 2.79. Notice that is well below the plain average of the five prices (which is £3.50): the cheap, high-volume Product A dominates because it carries the most weight. That gap is exactly why the weighted average is the figure you want.

5.Step 4 — When to use it

Reach for a weighted average any time the rows are not interchangeable:

The tell is always the same: if averaging two numbers of very different size as equals feels wrong, you need weights. When the rows really are equal — five test scores from the same student, say — a plain AVERAGE is correct and simpler.

Worked example

A buyer wants the true average cost per unit across five purchase batches (illustrative figures):

BatchUnit priceUnits boughtprice × units
A2.00100200
B3.5040140
C5.001050
D2.8060168
E4.202084
Total230642
=SUMPRODUCT(B2:B6, C2:C6) / SUM(C2:C6)   →   642 / 230   →   2.79

The weighted average cost is £2.79 per unit. The plain =AVERAGE(B2:B6) would have returned £3.50 — a full 71p higher — because it ignores the fact that the cheapest batch was also by far the largest. On a 230-unit purchase that 71p error is £163 of phantom cost. The weighted average is the number that reconciles back to what was actually spent.

Common mistakes

1. Forgetting to divide by SUM(weights). SUMPRODUCT on its own gives a grand total, not an average. Without the denominator you get 642, not 2.79.

2. Misaligned ranges. The values and weights must be the same length and in the same order. If B2:B6 has five rows but C2:C7 has six, SUMPRODUCT returns a #VALUE! error.

3. Blank or text cells in a range. A stray text entry in the weights column will error or be treated as zero. Clean the ranges, or wrap values in N() if you have mixed content.

4. Using a plain AVERAGE out of habit. The most common error isn’t a formula bug — it’s reaching for AVERAGE when the rows clearly differ in size. Always ask whether the items are really equal before averaging them.

The 30-second shortcut

Weighted averages crop up everywhere in reporting — blended margins, average cost, segment-weighted scores. DataHub Pro computes them across your data automatically, alongside trends and forecasts, so you don’t have to remember to weight by the right column each time.

Want to skip the formulas?

DataHub Pro calculates weighted averages, trends and forecasts across every column of your spreadsheet — no SUMPRODUCT gymnastics. From $14.99/mo, with a free tier.

Try DataHub Pro free →

References & further reading

Frequently asked questions

What is the formula for a weighted average in Excel?
Weighted average = SUMPRODUCT(values, weights) / SUM(weights). In Excel with values in B2:B6 and weights in C2:C6, enter =SUMPRODUCT(B2:B6,C2:C6)/SUM(C2:C6). SUMPRODUCT multiplies each value by its weight and adds the products, then dividing by the total weight normalises the result.
When should I use a weighted average instead of AVERAGE?
Use a weighted average whenever the items being averaged differ in size or importance. A plain AVERAGE treats every row equally, which is wrong when, for example, you are averaging prices across very different quantities or interest rates across very different balances. The bigger items should pull the average more, and weighting is what does that.
Why divide by SUM of the weights?
SUMPRODUCT gives you the total of value times weight, but that total scales with how big the weights are. Dividing by the sum of the weights normalises it back to the same units as the original values, so the answer reads as an average rather than a grand total.
Do the weights have to add up to 1?
No. Because the formula divides by SUM(weights), any units work — quantities, percentages, or raw importance scores. If your weights already add to 1 (or 100%), the SUM in the denominator equals 1 (or 100) and the division simply confirms it, but you never have to rescale them first.

Related guides

Blend every metric automatically

DataHub Pro computes weighted averages, blended margins and rolling trends across your spreadsheet, with one-click export — no formulas to align by hand.

Try DataHub Pro free →

Get the DataHub Pro newsletter

Free Excel & analytics tutorials, new templates, and product tips — once or twice a month. No spam, unsubscribe anytime.

Double opt-in · GDPR-compliant · powered by your own data tools