SUMPRODUCT Formula Uses in Excel (7 Powerful Examples)

Sum Product Tutorial Feature Image
SUMPRODUCT is one of Excel’s most underestimated functions. Most users stop at multiplying two columns — but it can handle conditional sums, OR logic, weighted averages, date-based grouping, case-sensitive matches, and unique value counts, all without helper columns and in every Excel version from 2003 to 365. This guide shows you seven patterns that will change how you work with data.

Most Excel users know SUMPRODUCT as the function that multiplies two columns together and sums the result. That is its most basic use — and it barely scratches the surface. SUMPRODUCT is one of the most versatile formulas in Excel, capable of conditional counting, weighted averages, OR logic, case-sensitive sums, and more — all without helper columns, without Ctrl+Shift+Enter, and in every Excel version. This guide shows you seven powerful uses that will change how you approach data analysis.

SUMPRODUCT Syntax and How It Works

SUMPRODUCT takes one or more arrays, multiplies their corresponding elements row by row, then sums all the results into a single number:

=SUMPRODUCT(array1, [array2], [array3], ...)
ArgumentRequired?What it means
array1RequiredFirst range or array. If the only argument, SUMPRODUCT simply sums all values in it.
array2, array3...OptionalAdditional ranges. Each must be the same size as array1. Up to 255 arrays in Excel 2007 onwards.

The key insight is that SUMPRODUCT handles arrays natively — no need for Ctrl+Shift+Enter. Logical tests inside it return TRUE/FALSE, which SUMPRODUCT automatically converts to 1/0 when you use multiplication. This is the foundation of every advanced use below.

Double negative vs multiplication: You will see two styles in SUMPRODUCT formulas. The double negative -- converts TRUE/FALSE to 1/0 explicitly: --( A:A="North"). Multiplication with * does the same conversion implicitly: (A:A="North")*(B:B="Done"). Both work — multiplication is more common for multi-condition formulas.

Use 1 — Conditional Sum with Multiple Criteria (AND Logic)

SUMPRODUCT can do everything SUMIFS does — and more. Multiply conditions inside it to apply AND logic: only rows where all conditions are TRUE contribute to the sum.

1
Sum sales where Region = "North" AND Product = "Laptop"
A — Region
B — Product
C — Sales
Counts?
North
Laptop
$4,200
Yes
South
Laptop
$3,100
No
North
Laptop
$2,800
Yes
North
Monitor
$1,500
No
Sum sales where Region = North AND Product = Laptop: =SUMPRODUCT((A2:A5="North") * (B2:B5="Laptop") * C2:C5) Dynamic — criteria in cells F1 and F2: =SUMPRODUCT((A2:A100=F1) * (B2:B100=F2) * C2:C100)
Result: $7,000 — rows 1 and 3 match both conditions. Each condition returns 1 (TRUE) or 0 (FALSE); multiplying them means only rows where ALL are 1 contribute to the sum.
SUMPRODUCT vs SUMIFS: SUMIFS is simpler for straightforward criteria. Use SUMPRODUCT when you need OR logic, calculated conditions (like checking if a value is in a list), or criteria based on functions like LEN or MONTH that SUMIFS does not support.

Use 2 — Conditional Count with Multiple Criteria

Remove the sum column and SUMPRODUCT becomes a counter — identical to COUNTIFS but more flexible. Multiply your conditions together; the result is the number of rows where every condition is TRUE.

2
Count rows matching two or more conditions
Count orders where Region = North AND Status = Completed: =SUMPRODUCT((A2:A100="North") * (B2:B100="Completed")) Count rows where Sales is between 1000 and 5000: =SUMPRODUCT((C2:C100>=1000) * (C2:C100<=5000)) Count rows where value is NOT blank: =SUMPRODUCT((A2:A100<>""))
Why use SUMPRODUCT over COUNTIFS? COUNTIFS only supports direct comparison operators. SUMPRODUCT accepts any function that returns an array — MONTH(), LEN(), ISNUMBER(), EXACT() — making it far more flexible for non-standard counting scenarios.

Use 3 — OR Logic (Sum or Count Where Any Condition Matches)

SUMIFS uses AND logic only. Getting OR logic requires multiple SUMIFS and addition. SUMPRODUCT handles OR logic elegantly by adding conditions instead of multiplying — but you must wrap the OR portion to prevent double-counting rows that satisfy multiple conditions.

3
Sum sales where Region is "North" OR "South"
OR logic — add conditions, then use MIN(1,...) to prevent double-counting: =SUMPRODUCT(MIN(1, (A2:A100="North") + (A2:A100="South")), C2:C100) Simpler OR logic when conditions cannot overlap (same column, different values): =SUMPRODUCT(((A2:A100="North") + (A2:A100="South")) * C2:C100) Mixed AND + OR: (North OR South) AND Status = Completed: =SUMPRODUCT(((A2:A100="North") + (A2:A100="South")) * (B2:B100="Completed") * C2:C100)
Why + works for OR: Adding two TRUE/FALSE arrays gives 0 (neither), 1 (one matches), or 2 (both match). Since a row only needs to satisfy one condition, any non-zero result should contribute. Multiplying by a sum column then works correctly. Use MIN(1,...) to cap at 1 when the value would otherwise be counted twice if both conditions are TRUE simultaneously.

Use 4 — Weighted Average

A weighted average assigns different importance to different values. SUMPRODUCT is the cleanest way to calculate one — multiply each value by its weight, sum the products, then divide by the total weight.

4
Calculate a weighted average score from student results
A — Assessment
B — Score
C — Weight
Assignment
72
20%
Midterm
68
30%
Final Exam
85
50%
Weighted Average
77.9
100%
Weighted average — SUMPRODUCT handles both steps in one formula: =SUMPRODUCT(B2:B4, C2:C4) / SUM(C2:C4) When weights sum to 100% (or 1), the denominator equals 1 — simplify to: =SUMPRODUCT(B2:B4, C2:C4) Weighted average sales — qty weighted by price: =SUMPRODUCT(D2:D100, E2:E100) / SUM(E2:E100)
Result: 77.9 — (72×0.2) + (68×0.3) + (85×0.5) = 14.4 + 20.4 + 42.5 = 77.3 / 1 = 77.3. This is the true weighted result, not the simple average of 75.

Use 5 — Sum by Month or Year (Without Helper Columns)

SUMIFS cannot use the MONTH() or YEAR() functions as criteria — it only accepts direct comparisons. SUMPRODUCT has no such restriction. Wrap MONTH() or YEAR() inside it to sum values for a specific time period directly from a date column.

5
Sum all sales for a specific month or year — no helper column needed
Sum sales for March (month = 3), dates in column A, sales in column B: =SUMPRODUCT((MONTH(A2:A100)=3) * B2:B100) Sum for March 2026 specifically (month AND year): =SUMPRODUCT((MONTH(A2:A100)=3) * (YEAR(A2:A100)=2026) * B2:B100) Dynamic — month in cell F1, year in cell F2: =SUMPRODUCT((MONTH(A2:A100)=F1) * (YEAR(A2:A100)=F2) * B2:B100) Count transactions in Q1 (months 1, 2, or 3): =SUMPRODUCT((MONTH(A2:A100)<=3) * (YEAR(A2:A100)=2026))
SUMIFS cannot do this: SUMIFS only accepts criteria in the format ">="&date — it cannot call MONTH() or YEAR() as a condition. SUMPRODUCT accepts any formula that returns an array, making it ideal for time-based grouping without adding helper columns to your data.

Use 6 — Case-Sensitive Sum or Count

Every Excel comparison — SUMIFS, COUNTIFS, VLOOKUP — is case-insensitive. "apple", "Apple", and "APPLE" all match equally. When your data has mixed-case codes that must be distinguished, combine SUMPRODUCT with the EXACT function to force a case-sensitive match.

6
Sum only rows where the code is exactly "ABC" — not "abc" or "Abc"
A — Code
B — Value
Counts?
ABC
500
Yes (exact match)
abc
300
No (lowercase)
ABC
700
Yes (exact match)
Abc
200
No (mixed case)
Case-sensitive SUM using EXACT: =SUMPRODUCT(EXACT(A2:A5, "ABC") * B2:B5) Result: 1200 (only rows 1 and 3 match exactly) Case-sensitive COUNT: =SUMPRODUCT(EXACT(A2:A5, "ABC") * 1) Result: 2 (two exact uppercase matches)
EXACT returns TRUE only when both the value AND the case match exactly. SUMPRODUCT multiplies that TRUE/FALSE array by the values column to produce a case-sensitive conditional sum.

Use 7 — Count Unique Values in a Range

Before the UNIQUE function arrived in Excel 365, SUMPRODUCT was the only way to count distinct values in a range using a single formula. It still works in all Excel versions and remains the right choice when you need a distinct count on a filtered or conditional subset.

7
Count how many distinct products appear in a list
A — Product
B — Sales
Laptop
$4,200
Monitor
$1,800
Laptop
$3,100
Keyboard
$900
Monitor
$2,200
Count distinct values in column A (ignores duplicates): =SUMPRODUCT(1 / COUNTIF(A2:A6, A2:A6)) Result: 3 (Laptop, Monitor, Keyboard — three distinct products) Distinct count ignoring blanks (safer version): =SUMPRODUCT((A2:A100<>"") / COUNTIF(A2:A100, A2:A100&"")) Distinct count for a subset — distinct products in North region only: =SUMPRODUCT((B2:B100="North") / COUNTIFS(A2:A100, A2:A100, B2:B100, "North"))
How it works: COUNTIF counts how many times each value appears — "Laptop" = 2, "Monitor" = 2, "Keyboard" = 1. Dividing 1 by each count gives 0.5, 0.5, 0.5, 1, 0.5. SUMPRODUCT adds those fractions: 0.5 + 0.5 + 0.5 + 1 + 0.5 = 3. Each duplicated value contributes a fraction that sums to exactly 1, so distinct values are counted correctly.

Common SUMPRODUCT Errors and How to Fix Them

#VALUE! error

The arrays in your formula are not the same size. SUMPRODUCT requires every range to have exactly the same number of rows and columns. Check that A2:A100 and B2:B100 are both 99 rows — even one row of difference causes #VALUE!.

Result is zero when you expect a non-zero number

Most commonly caused by a text vs number mismatch. If your criteria column contains numbers stored as text, the comparison (A:A=1000) returns FALSE for every row. Use VALUE(A:A) or convert the column to numbers. Also check for trailing spaces in text values.

Formula is very slow on large datasets

Never use full column references like A:A in SUMPRODUCT — it processes all 1,048,576 rows. Always use a defined range like A2:A10000. Also, SUMPRODUCT is slower than SUMIFS for simple criteria — only use it when SUMIFS cannot handle your requirement.

Avoid full column references: =SUMPRODUCT(A:A, B:B) multiplies over a million cells on every calculation. This can make your workbook noticeably slow. Always specify exact row boundaries: =SUMPRODUCT(A2:A1000, B2:B1000).

Frequently Asked Questions

  • What does SUMPRODUCT do in Excel?+
    SUMPRODUCT multiplies corresponding elements in two or more arrays row by row and then sums all the results into a single number. Beyond this basic operation, it handles arrays natively — meaning you can embed logical tests, date functions, and other formulas inside it to perform conditional sums, counts, weighted averages, and more without Ctrl+Shift+Enter.
  • What is the difference between SUMPRODUCT and SUMIFS?+
    SUMIFS is simpler to write for straightforward criteria and is faster on large datasets for single-column sums. SUMPRODUCT is more flexible — it supports OR logic, accepts functions like MONTH(), YEAR(), LEN(), and EXACT() as criteria, can calculate weighted averages, and count distinct values. Use SUMIFS when it covers your needs; use SUMPRODUCT when it does not.
  • What does -- (double negative) do in SUMPRODUCT?+
    The double negative converts TRUE and FALSE values into 1 and 0. A logical test like (A:A="North") creates an array of TRUE/FALSE. SUMPRODUCT needs numbers to multiply and sum, so converting TRUE to 1 and FALSE to 0 makes the math work. Multiplying arrays together does this conversion automatically. The double negative is mainly needed when you have a single condition with no multiplication to trigger the conversion.
  • Why is my SUMPRODUCT returning zero?+
    The most common causes are: numbers stored as text in one of the arrays (so comparisons return FALSE), a data type mismatch between the criteria and the column, trailing spaces in cell values, or arrays of different sizes. Test your condition separately in a blank cell — for example, type =(A2="North") — to verify it returns TRUE where expected.
  • Can SUMPRODUCT do OR logic?+
    Yes. Add conditions together instead of multiplying: =SUMPRODUCT(((A:A="North")+(A:A="South")) * C:C). Addition gives 0 (no match), 1 (one condition matches), or 2 (both match). Since any non-zero value means the row qualifies, multiplying by a value column sums correctly for OR. Use MIN(1,...) around the OR portion if a single row could satisfy both conditions at once to prevent double-counting.
  • Does SUMPRODUCT work in all Excel versions?+
    Yes. SUMPRODUCT works in every version of Excel from Excel 2003 through Microsoft 365. This is one of its key advantages over dynamic array functions like FILTER and UNIQUE, which require Excel 365 or 2021. All seven uses shown in this guide work in any Excel version without array entry (Ctrl+Shift+Enter).