SUMPRODUCT Function
Excel Guides / Math & Statistics
Math & Statistics
Multiply columns row by row and add up the results, with conditions that SUMIFS cannot express.
Updated 12 Oct 2026 Ā· 5 min read Ā· By Sky Dashboards
SUMPRODUCT multiplies matching items in two or more ranges and adds up the results. That alone covers weighted totals like units times price. Add conditions as TRUE and FALSE arrays and it becomes a flexible conditional sum that handles cases SUMIFS cannot, in every version of Excel and without Ctrl + Shift + Enter.
In this guide
SUMPRODUCT syntax
=SUMPRODUCT(array1, [array2], [array3], ...)| Argument | Required? | What it does |
|---|---|---|
array1 |
Required | The first range or array. |
array2, array3, ... |
Optional | More ranges or arrays to multiply with the first, up to 255 in total. Each must be the same size as array1. |
SUMPRODUCT multiplies the first item of each array together, then the second items, and so on, and finally adds those products up. Given a single array, it simply adds it up.
-
Arrays must match in size. C2:C6 and D2:D7 return
#VALUE!. - Text and logical values count as zero. This matters as soon as you add conditions, as shown below.
Weighted totals: units times price
A ceramics studio sells five products. Units sold are in column C and prices in column D. Revenue is units times price on each row, added up:
| A | B | C | D | ||
|---|---|---|---|---|---|
| 1 | Product | Category | Units | Price | |
| 2 | Mug | Kitchen | 42 | $28 | |
| 3 | Bowl | Kitchen | 25 | $34 | |
| 4 | Vase | Decor | 12 | $65 | |
| 5 | Planter | Decor | 36 | $45 | |
| 6 | Plate | Kitchen | 30 | $22 | |
| 7 | Revenue | $5,086 |
42 x $28 + 25 x $34 + 12 x $65 + 36 x $45 + 30 x $22 = $5,086, with no helper column.
The alternative is a Revenue column with =C2*D2 filled down and a SUM underneath. Both work. SUMPRODUCT keeps the sheet smaller when only the total matters.
Weighted average
The plain average of the five prices is $38.80, but that treats a vase that sold 12 times the same as a mug that sold 42 times. A weighted average divides the weighted total by the sum of the weights:
=SUMPRODUCT(C2:C6,D2:D6)/SUM(C2:C6)$5,086 / 145 units = $35.08, the average price actually paid per item.
The same pattern works for any weighting: margin weighted by sales, a coach's session rating weighted by attendance, delivery time weighted by order count.
Conditional sums with boolean arrays
A comparison such as B2:B6="Kitchen" returns one TRUE or FALSE per row: {TRUE;TRUE;FALSE;FALSE;TRUE}. To use it as a filter, turn it into 1s and 0s and multiply it in.
=SUMPRODUCT(--(B2:B6="Kitchen"),C2:C6,D2:D6)Kitchen revenue: $1,176 + $850 + $660 = $2,686.
The double minus is called the double unary. The first minus turns TRUE into -1 and FALSE into 0, the second turns -1 back into 1. Rows that fail the test are multiplied by 0 and drop out.
Why the -- matters
SUMPRODUCT treats TRUE and FALSE as zero, just like text. Leave out the -- and =SUMPRODUCT((B2:B6="Kitchen"),C2:C6,D2:D6) returns 0, with no error to warn you.
The other common style multiplies everything inside one argument. Arithmetic turns TRUE and FALSE into numbers by itself, so no -- is needed:
=SUMPRODUCT((B2:B6="Kitchen")*(D2:D6>=25)*C2:C6*D2:D6)Kitchen products priced at $25 or more, the mug and the bowl: $2,026.
Each extra condition is another bracket multiplied in. Multiplying is AND: a row survives only if every bracket is 1.
Note
With the * style, a text value such as "n/a" in a number column causes #VALUE!. The comma style treats it as zero and carries on.
Why it works without Ctrl+Shift+Enter
In older versions of Excel, a formula like =SUM((B2:B6="Kitchen")*C2:C6*D2:D6) only worked when confirmed with Ctrl + Shift + Enter, which turned it into an array formula wrapped in braces. With a plain Enter it returned #VALUE! or a wrong answer. SUMPRODUCT was built to take arrays, so it evaluates them properly with a plain Enter. That is why it became the standard tool for conditional maths before SUMIFS and dynamic arrays existed.
In Microsoft 365 and Excel 2021 or later, every formula handles arrays natively, so the SUM version works with Enter too. SUMPRODUCT is still worth knowing because it behaves the same in every version, which matters when you share files with people on older Excel.
OR conditions with +
Adding conditions gives OR logic. (B2:B6="Kitchen")+(B2:B6="Decor") is 1 when either test is true. Within one column a row can only match one option, so the result is always 0 or 1.
Across different columns, a row can pass both tests and score 2, which would double its value. Wrap the addition in >0 to turn it back into a plain yes or no:
=SUMPRODUCT(((B2:B6="Decor")+(C2:C6>=30)>0)*C2:C6*D2:D6)Revenue from Decor products or any product that sold 30 units or more: $4,236. Without the >0, the planter passes both tests, counts twice, and the total becomes $5,856.
Note
This is the case SUMIFS cannot handle by adding two formulas together, because a row that meets both conditions would be counted twice.
Performance: avoid full-column references
SUMPRODUCT calculates every cell in every array you give it. Point it at whole columns such as C:C and each array has 1,048,576 rows, almost all of them empty. A handful of these formulas can make a workbook noticeably slow, because they recalculate whenever their inputs change.
- Use exact ranges, such as
C2:C500, with some room to grow. - Better, turn the data into an Excel Table and use structured references like
Sales[Units], which grow with the data. - Keep the work inside simple. Every function on a range, such as
MONTH(A2:A500), runs once per row.
Note
SUMIFS and COUNTIFS handle whole-column references efficiently, so D:D is fine there. The caution applies to array-style formulas like SUMPRODUCT.
SUMPRODUCT or SUMIFS?
| Use SUMIFS when | Use SUMPRODUCT when |
|---|---|
| You are adding up one column with simple conditions | You need to multiply columns before adding, like units times price |
| The data is large and speed matters | Conditions use OR across different columns |
| Other people will read and edit the formula | A condition needs a function on the range, such as MONTH(A2:A500)=3
|
| You want whole-column references | You need a case-sensitive match with EXACT
|
SUMIFS only accepts real ranges as criteria ranges, so a condition such as "the month is March, in any year" needs SUMPRODUCT or a helper column:
=SUMPRODUCT((MONTH(A2:A500)=3)*D2:D500)Sales dated in March of any year.
For everything SUMIFS can do, it is faster and easier to read. Reach for SUMPRODUCT when SUMIFS runs out of road.
Frequently asked questions
What does -- mean in SUMPRODUCT?
It is two minus signs, called the double unary. It converts TRUE and FALSE into 1 and 0 so SUMPRODUCT can multiply them. Without it, SUMPRODUCT treats TRUE and FALSE as zero.
Does SUMPRODUCT need Ctrl+Shift+Enter?
No. SUMPRODUCT handles arrays natively in every version of Excel, so a plain Enter is enough.
Why does SUMPRODUCT return #VALUE!?
Either the arrays are different sizes, or a value being multiplied with * is text, such as n/a in a number column. Make every range cover the same rows, or pass the number ranges as separate arguments so text is treated as zero.
Is SUMPRODUCT slower than SUMIFS?
Usually, because it evaluates every cell in its ranges. On small, exact ranges you will not notice. On whole columns or across thousands of formulas, you will.
Want the finished dashboard instead?
My Excel templates come with these formulas already wired up. Pick one, type in your own rows and the charts update.
Browse templates ā