Skip to main content
SheetCraft
Math Function · advanced

SUMPRODUCT Function in Google Sheets

Multiplies corresponding elements in arrays and returns the sum. Used for weighted averages and complex conditional sums.

Syntax

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

Returns: Sum of element-wise products.

Excel equivalent: SUMPRODUCT (identical)

Parameters

NameRequiredDescription
array1, array2, ...RequiredArrays of same dimensions.

Examples

Weighted average

=SUMPRODUCT(A2:A10, B2:B10) / SUM(B2:B10)

Values × weights / sum of weights.

Multi-condition sum

=SUMPRODUCT((A2:A100="West") * (B2:B100>1000) * C2:C100)

Sums C where A is West AND B > 1000.

Complex count

=SUMPRODUCT((A2:A100="West") * (MONTH(B2:B100)=6))

Counts West from June — COUNTIFS can't take MONTH().

When to use an alternative

  • SUMIFSSimple conditions.
  • ARRAYFORMULA + SUMCleaner syntax.
  • QUERYGROUP BY semantics.

Common errors and how to fix them

  • #VALUE!

    Cause: Different dimensions.

    Fix: Same shape required.

  • Returns 0

    Cause: Text interferes.

    Fix: Wrap with -- or *1 for numeric coercion.

Related functions

Frequently Asked Questions

Still useful given SUMIFS?

When criterion uses MONTH/YEAR etc., for weighted means, for porting legacy Excel.

Boolean trick?

(A:A="X") returns TRUE/FALSE. SUMPRODUCT coerces to 1/0 when multiplied.

Source: Google Sheets official function reference.