Maths function
SUMPRODUCT function in Google Sheets and Excel
SUMPRODUCT multiplies ranges item by item and adds up the products.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
SUMPRODUCT(array1, [array2], [array3], …)Arguments in [brackets] are optional. Google Sheets writes it SUMPRODUCT(array1, [array2, ...]).
Example
=SUMPRODUCT(F2:F13,G2:G13) reads: Multiply each order's quantity F2:F13 by its price G2:G13 and add up all twelve products.
| A | B | C | D | E | F | G | H | I | J | K | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Order | Date | Customer | Product | Category | Qty | Price | Status | Revenue | $397.25 | |
| 2 | 1001 | 2 Mar 2026 | Mara Okafor | Monstera | Plants | 1 | $34.00 | Shipped | |||
| 3 | 1002 | 2 Mar 2026 | Jonas Lind | Terracotta pot | Pots | 3 | $12.50 | Shipped | |||
| 4 | 1003 | 3 Mar 2026 | Priya Raman | Snake plant | Plants | 2 | $22.00 | Shipped | |||
| 5 | 1004 | 4 Mar 2026 | Tomás Ruiz | Watering can | Tools | 1 | $18.00 | Pending | |||
| 6 | 1005 | 5 Mar 2026 | Elif Demir | Fern | Plants | 4 | $9.50 | Shipped | |||
| 7 | 1006 | 5 Mar 2026 | Mara Okafor | Potting mix | Soil | 2 | $7.25 | Returned | |||
| 8 | 1007 | 6 Mar 2026 | Kenji Mori | Pruning shears | Tools | 1 | $24.00 | Shipped | |||
| 9 | 1008 | 7 Mar 2026 | Ines Varga | Ceramic pot | Pots | 2 | $19.00 | Pending | |||
| 10 | 1009 | 8 Mar 2026 | Jonas Lind | Monstera | Plants | 1 | $34.00 | Shipped | |||
| 11 | 1010 | 9 Mar 2026 | Sofia Rossi | Fern | Plants | 6 | $9.50 | Shipped | |||
| 12 | 1011 | 10 Mar 2026 | Priya Raman | Potting mix | Soil | 5 | $7.25 | Shipped | |||
| 13 | 1012 | 11 Mar 2026 | Leo Brandt | Snake plant | Plants | 1 | $22.00 | Pending |
K1 shows $397.25: 1 × $34 + 3 × $12.50 + … for all twelve orders.
How the spreadsheet calculates it
Multiplies F2:F13 and G2:G13 row by row, then adds up the results.
- 1. SUMPRODUCT: Multiplies
F2:F13andG2:G13row by row, then adds up the results.range1=`F2:F13`: the first column of numbersrange2=`G2:G13`: the second, the same height. With one range, SUMPRODUCT just adds it
More SUMPRODUCT examples
=SUMPRODUCT(F2:F13,G2:G13)Total revenue: quantity × price, added up.=SUMPRODUCT(G2:G13,F2:F13)/SUM(F2:F13)The average price per item sold (a weighted average).=SUMPRODUCT((B2:B17="North")*(C2:C17="Fern")*E2:E17)Revenue for North ferns.=SUMPRODUCT((MONTH(A2:A17)=3)*E2:E17)Revenue for March from a column of dates.
Paste any of these into the formula explainer to see it step by step.
Tips
- Compare text columns before multiplying:
(B2:B17="North")*E2:E17, neverB2:B17*E2:E17. - Keep every range the same size, and change them together when the data grows.
- Use real ranges instead of whole columns for speed.
- For a plain total with conditions, SUMIFS is easier for others to read; keep SUMPRODUCT for the cases it alone can do.
What SUMPRODUCT is used for
Revenue from quantity × price without a helper column, weighted averages and scores, and conditional totals in versions or situations where SUMIFS can't express the condition.
Arguments
| Argument | Required | What it is |
|---|---|---|
| array1 | Yes | The first range or array. |
| array2, … | No | More ranges, each the same size as array1.Watch out: Different sizes give #VALUE!. |
Common mistakes
Ranges of different heights: #VALUE!.
Ranges of different sizes, which give #VALUE!.
Whole-column references, which Microsoft advises against for performance.
In Google Sheets
Google Sheets has SUMPRODUCT with the same arguments.
Errors you may see with SUMPRODUCT
- #VALUE!: The ranges aren't the same size, or text meets a multiplication inside the formula. How to fix it.
Questions
How do I do a weighted average?
SUMPRODUCT(values, weights)/SUM(weights). See the weighted average section.
SUMPRODUCT or SUMIFS?
SUMIFS for plain conditions, SUMPRODUCT for conditions with calculations. See SUMPRODUCT vs SUMIFS.
Do I need Ctrl+Shift+Enter for SUMPRODUCT?
No. SUMPRODUCT handles arrays on its own in every version, which is why it was the classic way to do array maths before dynamic arrays.
Why does SUMPRODUCT give a lower total than expected?
A number stored as text in one of the ranges counts as zero when the ranges are separate arguments. Find it with ISTEXT. See SUMPRODUCT #VALUE! for the related error.
Can SUMPRODUCT count instead of sum?
Yes: multiply only conditions, with no values column. SUMPRODUCT((B2:B17="North")*(C2:C17="Fern")) counts the rows where both are true, like COUNTIFS.
Does SUMPRODUCT work in Google Sheets?
Yes, with the same arguments and the same rule that every range must be the same size, so the formulas on this page work in both apps.
Sources
Official documentation the facts on this page were checked against.