Excel function

SUMPRODUCTfunction

Multiplies values in matching positions and adds the results.

All versions
=SUMPRODUCT(B2:B6, C2:C6)
Range to drag
A
B
C
D
1
2
3
4
5
6

Drag the corner dots to change array1, array2. Column D shows quantity × price for each row. Drag the two ranges to different heights to get #VALUE!. Try breaking it on purpose to see the errors.

Result

30500

array1
B2:B6Drag a corner dot up/down to resize, sideways to change the column

The first range.

array2
C2:C6

The second range. It must be the same size as array1.

What is the SUMPRODUCT function?

=SUMPRODUCT(array1, [array2], ...)

SUMPRODUCT multiplies the values in matching positions of several ranges and adds them all up. Use it to get a total of quantity × price in one step.

The ranges must be the same size, or you get #VALUE!. Cells that are not numbers count as 0. Column D shows the product for each row.

Arguments

array1
The first range.
array2, ...
More ranges of the same size.

SUMPRODUCT examples

  1. Example 1. Total order amount

    =SUMPRODUCT(B2:B6, C2:C6)

    3×1500 + 2×2400 + 1×3200 + 4×4500 + 0×6900 = 30500.

  2. Example 2. Sum with a condition

    =SUMPRODUCT((A2:A6="Apple")*B2:B6)

    Multiply by a condition (TRUE/FALSE) to add only the matching values.

Common mistakes

FAQ

Does it need an array formula?
No. SUMPRODUCT handles arrays without Ctrl+Shift+Enter.
Three ranges?
Yes. It multiplies the three values in each position and adds them.