WorkbookLogic
FunctionMath and aggregationadvancedSUMPRODUCTSUMIF

SUMPRODUCT Function

By WorkbookLogic

SUMPRODUCT multiplies corresponding array elements and sums the products. It handles weighted totals and compact conditional calculations without helper columns.

ExcelLast reviewed Sep 11, 2026
sumproduct-function-v1.0.0.xlsx
Excel SUMPRODUCT Function
SUMPRODUCT multiplies aligned array elements and returns the sum of their products.
Source data, editableExamples
RegionQuantityPriceWeightExampleFormula syntaxResult
North2$2520.0%Quantity × price=SUMPRODUCT(B12:B15,C12:C15)$265.00
South3$3030.0%Weighted total=SUMPRODUCT(C12:C15,D12:D15)$34.00
North4$2010.0%Weighted average=SUMPRODUCT(C12:C15,D12:D15)/SUM(D12:D15)$34.00
East1$4540.0%Count North rows=SUMPRODUCT(--(A12:A15="North"))2
Reliability checks
Quantity and price products sum to 265OK
North appears twiceOK

Overview

SUMPRODUCT multiplies aligned values and adds the results in one formula.

Quick reference

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

Returns: A single numeric total. (number)

Arguments:

  • array1 (required) — First array or expression.
  • array2, ... (optional) — Additional same-sized arrays to multiply.

Only the first array or expression is required. Additional arrays are optional, but arrays multiplied together must have matching dimensions before their products can be summed.

Common uses

  • Quantity-times-price totals
  • Weighted averages
  • Conditional counts and sums with array logic

When not to use it

Use SUMIFS or COUNTIFS when ordinary row-based criteria express the requirement clearly. They make the tested ranges and criteria easier to inspect. Use SUMPRODUCT when corresponding arrays must be multiplied, Boolean expressions need coercion, or the calculation genuinely depends on array arithmetic.

Calculations

For multiple arrays, Excel multiplies elements at matching positions, then sums those products. Boolean expressions can be coerced to 1 and 0, enabling conditional counts and totals. Whole-column references can create unnecessary calculation work.

Function behavior

Situation

Behavior

Different array dimensions

Returns #VALUE!.

Nonnumeric entries in direct arrays

Generally treated as zero.

Boolean expressions

Require coercion when used numerically.

Entire-column arrays

Can slow recalculation.

Common errors

Using mismatched ranges

What happens: Excel returns #VALUE!.
Better approach: Make every array the same height and width.

Omitting the weighted-average denominator

What happens: The result is a weighted total, not an average.
Better approach: Divide by the sum of weights.

Example

Example 1 — Revenue total

=SUMPRODUCT(B12:B15,C12:C15)

Multiplying each quantity by its price returns 265.

Example 2 — Weighted average

=SUMPRODUCT(C12:C15,D12:D15)/SUM(D12:D15)

The workbook returns a weighted average of 34.

Example 3 — Conditional count

=SUMPRODUCT(--(A12:A15="North"))

The double unary converts TRUE/FALSE values to 1/0, returning 2 North records.

Example workbook

The workbook demonstrates a revenue total, weighted total and average, conditional count, and validation checks.

Key takeaway

SUMPRODUCT is ideal when aligned arrays must be multiplied, filtered, and aggregated in one auditable calculation.