Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

AVERAGE.WEIGHTED in Google Sheets: How to Use

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Google Sheets does not have a built-in AVERAGE.WEIGHTED function, so you cannot type =AVERAGE.WEIGHTED() and get a result. The standard way to calculate a weighted average is to multiply each value by its weight, add those products together, and divide by the sum of the weights. In Sheets you do this with SUMPRODUCT and SUM: =SUMPRODUCT(values, weights)/SUM(weights). That single formula gives the same answer a dedicated weighted-average function would, and it updates automatically when the data changes.

What You'll Need

  • A Google account with access to Google Sheets (the free web version or the mobile app).
  • Two columns of numbers: one for the values you want to average, and one for the weights that apply to each value.
  • The weights can be any positive numbers; they do not have to add up to 100 or to 1, because the formula divides by their total.
  • No add-ons or special permissions are required.

Step-by-Step

  1. Open your spreadsheet. Go to sheets.google.com, sign in, and open the file that contains your data, or create a new blank spreadsheet.
  2. Lay out your data in two adjacent columns. For example, put the values in column A (A2:A6) and the matching weights in column B (B2:B6). Keep one value and one weight per row; do not leave blank rows in the middle of the range.
  3. Click an empty cell where you want the weighted average to appear, such as D2.
  4. Type the formula: =SUMPRODUCT(A2:A6,B2:B6)/SUM(B2:B6) and press Enter. SUMPRODUCT multiplies each value by its paired weight and adds the results; SUM(B2:B6) adds the weights; dividing one by the other produces the weighted average.
  5. Check the result against a simple case. If all weights are equal, the weighted average should equal a plain AVERAGE of the values. If it does not, your ranges are probably different lengths or misaligned.
  6. Copy the formula down or across if you need weighted averages for several groups. Use absolute references (for example $B$2:$B$6) for the weight range if you copy the formula to other rows and the weights should stay fixed.
  7. Format the cell as a number if Sheets shows a date or a strange format. Select the cell, then use Format > Number > Number, or click the percent or decimal buttons in the toolbar. Labels in menus can differ slightly by version, device or region.
  8. On the mobile app, tap the cell, tap the formula bar, and type the same formula. The function names and syntax are identical; only the interface differs.

Common Mistakes

  • Trying to use AVERAGE.WEIGHTED. That function does not exist in Google Sheets. If you paste it from Excel or another tool, Sheets returns a #NAME? error. Use SUMPRODUCT/SUM instead.
  • Ranges of different sizes. SUMPRODUCT requires the value range and weight range to be the same size. A2:A6 with B2:B7 will produce an error or a wrong result.
  • Dividing by SUM of the values instead of the weights. The denominator is always the total of the weights, not the total of the values.
  • Including text or blank cells. SUMPRODUCT treats text as zero in many cases, which silently skews the result. Keep ranges clean or use a filtered range.
  • Forgetting that weights do not need to sum to 1. Dividing by SUM(weights) handles any scale, so do not pre-normalise unless you want to.
  • Mixing up which column is which. The weight must be the number that represents importance or frequency, not the value being averaged.

Tips

  • Name your ranges (Data > Named ranges) so the formula reads like =SUMPRODUCT(Scores,Weights)/SUM(Weights). This makes it easier to audit later.
  • Use =SUMPRODUCT(A2:A6,B2:B6)/SUM(B2:B6) rather than adding a helper column of products; it keeps the sheet compact and less error-prone.
  • If you want a percentage-style weighted average where weights already total 100%, you can omit the division, but only if you are certain the weights sum exactly to 100. Dividing anyway is safer.
  • Wrap the formula in ROUND if you need a fixed number of decimals: =ROUND(SUMPRODUCT(A2:A6,B2:B6)/SUM(B2:B6),2).
  • For grades, use the weights as credit hours or percentage weights; the formula works the same way.

Troubleshooting

If you see #NAME?: You probably typed AVERAGE.WEIGHTED or misspelled SUMPRODUCT. Replace it with the SUMPRODUCT/SUM formula.

If you see #VALUE!: One of the ranges contains text that cannot be coerced to a number, or the two ranges are different sizes. Check both ranges and remove stray text.

If the result looks too high or too low: Confirm the weight column is the one you think it is. A common cause is swapping values and weights, or including a header row in one range but not the other.

If the result is a date: The cell is formatted as a date. Change it with Format > Number > Number.

If the formula breaks when you copy it: Use absolute references for the weight range, or convert the data to a named range.

If that did not work: Rebuild the formula in a fresh cell with small, explicit ranges (for example A2:A4 and B2:B4) to isolate the problem, then expand the ranges once it works.

Frequently Asked Questions

Does Google Sheets have an AVERAGE.WEIGHTED function?

No. Google Sheets does not include AVERAGE.WEIGHTED. Use =SUMPRODUCT(values,weights)/SUM(weights) instead.

Can I use AVERAGE.WEIGHTED in Google Sheets if I import an Excel file?

The formula may appear in the imported file, but Sheets does not support the function and will show an error. Replace it with the SUMPRODUCT/SUM equivalent.

Do the weights need to add up to 100%?

No. The formula divides by the sum of the weights, so any positive weights work. If the weights already total 100%, the division still returns the correct result.

What is the difference between AVERAGE and a weighted average?

AVERAGE treats every value equally. A weighted average gives each value influence proportional to its weight, so a value with a larger weight pulls the result more.

Can I calculate a weighted average with text labels in the range?

Only if the text is outside the numeric ranges. Text inside a SUMPRODUCT range can cause errors or be treated as zero, so keep the value and weight ranges limited to numbers.

Does the mobile Google Sheets app support SUMPRODUCT?

Yes. The mobile app supports the same functions and syntax as the web version; you enter the formula in the formula bar the same way.