SUMPRODUCT Function
Sums the products of corresponding array elements; great for conditional calculations.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| array1 | The first array or range whose elements will be multiplied and summed. | Required |
| array2 | Additional arrays/ranges. All arrays must have the same dimensions. | Optional |
| array3 | Further arrays/ranges (optional). Up to 255 in modern Excel. | Optional |
Basic Example
Weighted sum of two columns
=SUMPRODUCT(A1:A3, B1:B3)With A=(1,2,3) and B=(4,5,6): 1×4 + 2×5 + 3×6 = 4 + 10 + 18 = 32.
Advanced Examples
Example 1: Conditional sum with criteria
Sum amounts in B where category in A equals "Apple".Use a boolean expression that SUMPRODUCT coerces to 1/0.
=SUMPRODUCT((A1:A10="Apple")*(B1:B10))Example 2: Count rows meeting a condition
Count how many values in A exceed 5.Coerce the boolean to a number and sum.
=SUMPRODUCT((A1:A10>5)*1)How SUMPRODUCT Works
SUMPRODUCT takes the corresponding elements of each array, multiplies them together per position, and sums the results. With a single array it simply sums that array. Boolean criteria must be coerced to numbers (using * or --) because SUMPRODUCT does not auto-convert TRUE/FALSE.
Important Notes & Limitations
All array arguments must have the same dimensions, or SUMPRODUCT returns #VALUE!.
Boolean expressions must be coerced with * or --; raw TRUE/FALSE cannot be multiplied directly.
Text and empty cells within the ranges are treated as 0, which can hide data-type issues.
Common Errors & Fixes
#VALUE!Arrays have mismatched sizes, or a boolean array wasn't coerced to numbers.Fix: Make all ranges the same size and multiply criteria by 1 or another numeric array.
Wrong totalText/blank cells were silently treated as 0.Fix: Verify the ranges contain the expected numeric values.
Download Practice File
SUMPRODUCT
sumproductPractice SUMPRODUCT with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the SUMPRODUCT function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps