Finance function
Excel SUMPRODUCT function
SUMPRODUCT multiplies matching items in two or more ranges and adds up the results. Use it to total an order from quantities and prices, or to sum with conditions without a helper column.
=SUMPRODUCT(array1, [array2], ...)Arguments
array1- The first range or array.
array2- Optional. A second range the same size, multiplied item by item with the first.
SUMPRODUCT examples
Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | Category | Qty | Unit price |
| 2 | Notebook | Paper | 40 | 2.5 |
| 3 | Gel pens | Pens | 25 | 1.2 |
| 4 | Copy paper | Paper | 10 | 8.75 |
| 5 | Markers | Pens | 12 | 3.4 |
| 6 | Stapler | Desk | 4 | 11 |
Result: 302.3
Multiplies each quantity by its price and adds them up: the order total.
Result: 187.5
Only the Paper rows count, because the test is 1 for a match and 0 otherwise.
Result: 3
Counts the items ordered in quantities of 12 or more.
Result: 3.32
The average price per unit, weighted by quantity.
How to use SUMPRODUCT
- Click the cell for the total.
- Type =SUMPRODUCT(
- Select the first range, type a comma, and select the second.
- Close the bracket and press Enter.
Common SUMPRODUCT mistakes
Ranges of different sizes
Every range must have the same number of rows and columns, or SUMPRODUCT returns #VALUE!.
Conditions return TRUE and FALSE, not numbers
Multiply the condition by another range, or put -- in front, so TRUE becomes 1.
Selecting whole columns
C:C makes SUMPRODUCT work through a million rows. Select only the rows you need.
SUMPRODUCT FAQ
How do I multiply two columns and sum the result in Excel?
Use =SUMPRODUCT(C2:C6,D2:D6). It multiplies row by row and adds the products.
How do I calculate a weighted average in Excel?
Divide SUMPRODUCT by the sum of the weights: =SUMPRODUCT(values,weights)/SUM(weights).
What does the double minus (--) mean in SUMPRODUCT?
It turns TRUE and FALSE into 1 and 0 so they can be added up. It is a common way to count matches.
Practice SUMPRODUCT in these lessons
Guides that use SUMPRODUCT
- How to count unique values in Excel
- How to calculate a weighted average in Excel
- SUMIFS with multiple criteria in Excel
Related functions
SUMIFSAdds with several conditionsSUMAdds numbersCOUNTIFSCounts with several conditionsAVERAGEMean of numbers
Updated