
The SUMPRODUCT function in Excel multiplies matching items in two or more lists and adds up the results. It is the quick way to get a total like "quantity times price" without a helper column. It can also count or add with several conditions. This guide shows the formulas with made-up data and the mistakes to avoid.

SUMPRODUCT basics
SUMPRODUCT takes two or more ranges of the same size. It multiplies the first item of each range, then the second, and so on, and adds all the products.
=SUMPRODUCT(B2:B5, C2:C5)
If B holds quantities of 2, 3, 1 and 4, and C holds prices of 10, 5, 20 and 2, the result is 2x10 + 3x5 + 1x20 + 4x2, which is 63.
Why use SUMPRODUCT for a total
Without it you would add a Line total column (quantity times price) and then sum that column. SUMPRODUCT does both in one cell, which keeps the sheet cleaner.

SUMPRODUCT with a condition
You can add a condition by multiplying by a test. To total quantity times price only for rows where the region in column A is North:
=SUMPRODUCT((A2:A5="North")*B2:B5*C2:C5)
The test returns TRUE or FALSE for each row. Multiplying turns TRUE into 1 and FALSE into 0, so only the North rows count.
SUMPRODUCT with two conditions
Multiply more tests together for AND logic. North and a quantity above 2:
=SUMPRODUCT((A2:A5="North")*(B2:B5>2)*C2:C5)
For OR logic, add the tests instead, and check the result on a few rows.

Count rows with SUMPRODUCT
To count how many rows are North:
=SUMPRODUCT(--(A2:A5="North"))
The double minus signs turn TRUE and FALSE into 1 and 0. For plain counts, COUNTIFS is often easier to read.
SUMPRODUCT or SUMIFS?
SUMIFS adds one column by rules, and it is usually the first choice. Use SUMPRODUCT when you need to multiply columns first, or when a rule is hard to write as a SUMIFS rule. See SUMIFS between two dates.

Common SUMPRODUCT mistakes
- Ranges of different sizes. Excel shows #VALUE!. Make every range the same size.
- Text in the number ranges. Text counts as zero in the multiplication.
- Full column references. Whole columns like B:B can be slow. Use exact ranges.
- Using commas with tests. When a test is inside the formula, join the parts with multiplication signs.
SUMPRODUCT in Excel: common questions
Does SUMPRODUCT work in Google Sheets?
Yes, with the same idea and the same arguments.
Is SUMPRODUCT only for money?
No. It works for any weighted total, such as grades with weights.
Why does my result show zero?
Check whether your numbers are stored as text, and check that your condition matches the cell contents exactly.
Related guides on Sheets AI Hub
Read about pivot table calculated fields and Excel automation tips.
