
Multiplies arrays element by element, then sums the results.
The Excel SUMPRODUCT function multiplies corresponding elements in arrays and then adds those products together. In its simplest form, it is a compact way to calculate totals such as quantity times price, hours times rate, or weight times score without creating a helper column.
Its real value appears when you combine those multiplications with logical conditions. A test such as (A1:A4="A") produces TRUE and FALSE values, which can be converted into 1s and 0s inside the formula. That lets SUMPRODUCT act as a conditional sum, conditional count, or weighted calculation in a single expression.
Useful for weighted totals, array-based filtering, and formulas that combine arithmetic with conditions.
Returns the sum of the element-by-element calculations across the supplied arrays.
=SUMPRODUCT(array1, [array2], [array3], ...)
The default behavior is multiplication followed by addition. Microsoft also notes that you can build other arithmetic patterns by using operators such as *, +, -, and / directly inside the formula.
All array arguments must have the same dimensions. If they do not, SUMPRODUCT returns #VALUE!.
| Function | Main Strength | Best Fit |
|---|---|---|
SUMPRODUCT |
Array arithmetic with conditions | Weighted totals and formulas that need flexible logic |
SUMIFS |
Built-in multi-criteria sum | Standard range-and-criteria calculations |
SUM |
Simple aggregation | Plain totals with no row-by-row weighting |
MMULT |
True matrix multiplication | Linear algebra rather than element-by-element products |
SUMPRODUCT is more flexible than SUMIFS, but that flexibility comes with more responsibility. You have to manage the array logic yourself, including shape, coercion of TRUE/FALSE values, and performance on large ranges.
A standard pattern is =SUMPRODUCT(qty,price). Each row is multiplied first, and then the results are summed. This removes the need for a separate revenue column while keeping the final formula explicit about how the total is produced.
A second pattern is conditional filtering. If a logical test is multiplied by a numeric array, rows that fail the test effectively become zero and disappear from the final total. This is why formulas such as =SUMPRODUCT((Region="East")*Sales) work even though there is no dedicated criteria argument.
SUMPRODUCT also handles counting formulas. If the expression inside the function returns 1 for matching rows and 0 for nonmatching rows, the final sum is the count of matches. That makes it useful not only for totals, but also for rule-based counts that go beyond basic COUNTIF patterns.
This is the classic weighted-total example.
=SUMPRODUCT(B1:B4,C1:C4)
Each quantity is multiplied by its matching price, and all four products are added together. With the sample data, the result is 3140. This is the basic form to remember whenever one column is a weight and the other is a value.
In cell F1, multiply B1:B4 by C1:C4 row by row and return the total.
Logical tests can be used as row filters inside the multiplication.
=SUMPRODUCT((A1:A4="A")*C1:C4)
The comparison returns TRUE for rows 1 and 3, which are then treated as 1, while the other rows become 0. The result is 250, which is the sum of the C-values for the rows marked "A".
In cell F2, sum C1:C4 only where A1:A4 equals "A".
This example combines conditional filtering with row-by-row multiplication.
=SUMPRODUCT((D1:D4="Active")*B1:B4,C1:C4)
Only the rows marked "Active" are included in the revenue calculation. In the sample data, row 3 is excluded before the quantity-price multiplication is summed, so the result is 1940.
In cell F3, calculate quantity times price only for rows where D1:D4 equals "Active".
SUMPRODUCT can also be used as a conditional counter.
=SUMPRODUCT((B1:B4>G1)*1)
The comparison returns TRUE for values greater than the threshold in G1 and FALSE otherwise. Multiplying by 1 converts those logical results into 1s and 0s, so the final sum becomes a count. With G1 equal to 5, the result is 2.
In cell F4, count how many values in B1:B4 are greater than the threshold in G1.
Microsoft also recommends avoiding full-column references in SUMPRODUCT. A formula such as =SUMPRODUCT(A:A,B:B) forces Excel to process more than a million rows in each array. Bounded ranges are usually the better choice for both speed and clarity.
SUMPRODUCT multiplies matching array elements and sums the results.Tell your friends about this post