FormulaCamp
Completed
← All functions
Math

SUMPRODUCT

Sum of pairwise products.

Syntax

SUMPRODUCT(array1, [array2], …)

Example: =SUMPRODUCT(B2:B6,C2:C6)

Available in: All versions

SUMPRODUCT multiplies matching items in two or more ranges and adds up the products: =SUMPRODUCT(array1, array2, …). It handles weighted totals and conditional sums in one step, with no helper columns and no array-entry.

When to use it

Arguments explained

Worked examples

Order total

AB
1QtyPrice
2210
335
4140

Formula: D2: =SUMPRODUCT(A2:A4,B2:B4)

Result: 75

2×10 + 3×5 + 1×40 = 75.

Weighted score

AB
1ScoreWeight
2900.5
3800.3
4700.2

Formula: D2: =SUMPRODUCT(A2:A4,B2:B4)/SUM(B2:B4)

Result: 83

Dividing by the total weight gives the weighted average.

Conditional sum

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =SUMPRODUCT((A2:A7="East")*C2:C7)

Result: 2240

The comparison gives TRUE or FALSE per row; multiplying turns it into 1 or 0, so only East amounts survive.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =SUMPRODUCT(C2:C7,D2:D7)

Example spreadsheet for SUMPRODUCT
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.52885
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 2885
Practice this in a lesson: SUMPRODUCT

Common errors and how to fix them

Related functions

Frequently asked questions

Why is SUMPRODUCT used for conditional sums?
It evaluates arrays natively, so conditions like OR logic or text length tests work without Ctrl+Shift+Enter.
Can SUMPRODUCT count?
Yes: =SUMPRODUCT(--(A2:A7="East")) counts matching rows.
What does the double minus do?
It turns TRUE and FALSE into 1 and 0 so they can be added.
SUMPRODUCT or SUMIFS?
SUMIFS is faster and simpler for plain AND conditions; SUMPRODUCT is for everything else.

More in Math