Multiply and Add with SUMPRODUCT

Excel Formulas › Math

All versionsSUMPRODUCT

SUMPRODUCT multiplies arrays together and adds the results — perfect for a total like quantity × price in one cell. Its hidden superpower is counting and summing on multiple conditions without SUMIFS, and even doing OR logic.


Quick formula: to total quantity × price across two columns:
=SUMPRODUCT(B2:B10, C2:C10)
It pairs each quantity with its price, multiplies, and sums every row — the grand total in one formula.

Functions used (tap for the full reference guide):

The example

Line totals (qty × price) summed in one step.

ABC
1ItemQtyPrice
2Widget3$10
3Gadget2$20
4Cable5$5
5Order total:$95

The formula

The order total (3×10 + 2×20 + 5×5):

=SUMPRODUCT(B2:B4, C2:C4) // 30 + 40 + 25 = 95

How it works

SUMPRODUCT does element-wise multiply, then sum:

  1. It multiplies the arrays row by row: B2*C2, B3*C3, B4*C4.
  2. Then it adds all those products into a single total — no helper column of line totals needed.
  3. Give it conditions instead of values to count/sum with logic: =SUMPRODUCT((A2:A10="West")*(B2:B10)) sums West rows.
  4. Multiplying conditions is AND; adding them is OR — which is why SUMPRODUCT predates and outflexes SUMIFS.

The classic conditional count: =SUMPRODUCT((region="West")*(amount>100)) counts West rows over $100. Each comparison makes a TRUE/FALSE array; multiplying turns them to 1/0 and SUMPRODUCT adds the hits.

Try it: interactive demo

Live demo

Edit quantities; the order total updates.

Total:

Variations

Conditional sum

Total West-region amounts:

=SUMPRODUCT((A2:A10="West")*B2:B10)

Conditional count

Count rows meeting two conditions:

=SUMPRODUCT((A2:A10="West")*(B2:B10>100))

OR logic

West OR East (add the conditions):

=SUMPRODUCT(((A2:A10="West")+(A2:A10="East"))*B2:B10)

Pitfalls & errors

#VALUE! from mismatched sizes. All arrays in a SUMPRODUCT must have the same dimensions, or it errors. Keep the ranges the same height (and width).

Text in a multiplied range breaks it. Multiplying a condition by a column with text gives #VALUE!. Wrap with -- or ensure the summed range is numeric.

Use * for AND, + for OR. Mixing them up changes the logic. For OR, make sure conditions don’t double-count overlapping rows.

Practice workbook

📊
Download the free Multiply and Add with SUMPRODUCT practice workbook
An order with live SUMPRODUCT total, plus conditional-sum, count, and OR examples, and 4 challenges with answers. No sign-up required.

Frequently asked questions

What does SUMPRODUCT do in Excel?
SUMPRODUCT multiplies arrays element by element and sums the results, e.g. =SUMPRODUCT(qty, price) gives a grand total. With conditions it also counts and sums on multiple criteria.
How do I use SUMPRODUCT with conditions?
Multiply TRUE/FALSE arrays: =SUMPRODUCT((region="West")*(amount>100)) counts rows meeting both conditions. Multiplying is AND; adding conditions is OR.
Why does SUMPRODUCT return #VALUE!?
The arrays are different sizes, or a range you multiplied contains text. Keep all arrays the same dimensions and ensure summed ranges are numeric.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Weighted average · SUMIFS with multiple criteria · Sum every Nth row

Function references: SUMPRODUCT