SUMPRODUCT
Multiply matching entries across arrays and return the total of those products.
Spreadsheet editor
Spreadsheet editor
Syntax
=SUMPRODUCT(array1, [array2, ...])
Returns: Number Arguments
| Argument | Required | Description |
|---|---|---|
| array1 | Yes | The first array or range whose values you want to multiply and then sum. |
| array2 | No | Additional arrays or ranges to multiply element-by-element with array1 before summing. All arrays must be the same size. |
About
This is one of the most practical functions in Excel. Use it to calculate total revenue from quantity and price columns, compute weighted averages (when combined with SUM), or build conditional totals without needing helper columns. Because SUMPRODUCT naturally works with arrays, you can embed logical tests directly inside it, like =SUMPRODUCT((A2:A10="East")*(B2:B10)), to sum values that match a condition.
For straightforward conditional sums, SUMIF or SUMIFS are simpler. SUMPRODUCT shines when you need to combine multiple conditions with custom logic, or when you want to multiply and sum across several columns in one step.
Exercises using SUMPRODUCT
SUMPRODUCT for conditional counting with multiple text criteria
IntermediateUse SUMPRODUCT to count orders that match multiple text conditions at the same time.
Open exerciseSUMPRODUCT for weighted average
IntermediateCalculate weighted average price (price × quantity / total quantity).
Open exerciseExamples
Weighted average with SUMPRODUCT and SUM
Spreadsheet editor
Conditional sum with embedded logic
Spreadsheet editor
Watch out for
Mismatched array sizes
If the arrays you pass have different numbers of rows or columns, SUMPRODUCT returns a #VALUE! error.
→ Double-check that every array argument covers the same number of cells. For example, B2:B10 and C2:C10 both have 9 rows.
Text or blank cells in numeric arrays
Text values in a range cause a #VALUE! error because SUMPRODUCT can't multiply text by a number.
→ Clean up the data so numeric columns contain only numbers, or wrap values with a conversion like multiplying by 1 (e.g., B2:B10*1) to force errors you can handle with IFERROR.
Using SUMPRODUCT when SUMIFS is simpler
Building conditional sums with SUMPRODUCT and embedded TRUE/FALSE logic when a straightforward criteria-based function would do the same job more clearly.
→ For basic conditional sums, prefer SUMIFS. Save SUMPRODUCT for cases where you need custom logic, calculated criteria, or multiplication across multiple columns.