← All how-to recipes

How to calculate a weighted average

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Average values where each one counts for a different weight.

The formula

AppFormulaNotes
Excel (desktop)=SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4)SUMPRODUCT multiplies each value by its weight and totals; divide by total weight.
Google Sheets=SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4)Identical.
LibreOffice Calc=SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4)Identical.

How it works

SUMPRODUCT(values, weights) computes 90*2 + 80*3 + 70*5 = 770, and SUM(weights) = 10. Dividing gives a weighted average of 77 - lower than the plain average because the 70 carries the most weight.

Verified, not just documented

We ran =SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 77 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 77 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

SUMPRODUCT · SUM — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons