
How Does SUMPRODUCT Work in Google Sheets?
Carlos GarciaPublished How Does SUMPRODUCT Work in Google Sheets?
Most people meet SUMPRODUCT the same way: someone hands over a spreadsheet with a formula like =SUMPRODUCT((B2:B200="West")*(C2:C200)) sitting in a total cell, it returns the right number, and nobody can explain why. The function has a reputation for being the one Google Sheets formula that does things the obvious functions cannot, and a reputation for being impossible to read.
Both halves of that reputation are earned, and the gap between them is almost entirely a documentation problem. Google's own function reference page for SUMPRODUCT is one of the shortest in the whole Sheets library. It describes a straightforward multiply-then-add operation in two sentences, gives two sample formulas, and stops. Nearly everything the function is actually used for in the wild appears nowhere on that page.
This guide works through what Google documents, what is derivable from the documented syntax even though the page never spells it out, and what is simply absent from the official reference. Those three categories explain why the function feels like folklore: most of what the spreadsheet community knows about SUMPRODUCT was reverse-engineered rather than published.
What Does SUMPRODUCT Actually Do?
Google's description is precise and worth reading literally: the function calculates the sum of the products of corresponding entries in two equally sized arrays or ranges. That is the entire operation. Line up two ranges, multiply each pair of cells that sit in the same position, then add all those products together into one number.
Work through the official sample to see it concretely. For SUMPRODUCT(A2:C5,D2:F5), Sheets multiplies A2 by D2, B2 by E2, C2 by F2, then the second row, and so on through both blocks, and returns the total of all twelve products. Both ranges are three columns by four rows, so every cell in the first has a partner in the same relative position in the second.
The second documented sample does the same thing with hardcoded arrays rather than cell references: SUMPRODUCT({1,2,3,4},{5,6,7,8}). That multiplies out to 5, 12, 21 and 32, and returns 70. It is a useful formula to type into an empty cell when you want to confirm the pairing behavior for yourself rather than trusting a description of it.
The classic business use follows directly. If column B holds quantities and column C holds unit prices, =SUMPRODUCT(B2:B100,C2:C100) is the order value of the whole list, calculated without a helper column of row totals. That single property, doing per-row arithmetic and then aggregating it in one cell, is what makes the function worth learning.
Notice what is not happening here. SUMPRODUCT is not looking anything up, not filtering, and not testing conditions. The conditional behavior everybody associates with it is a consequence of how Sheets handles arithmetic on logical values, not a feature of the function, and that distinction is the key to reading any SUMPRODUCT formula somebody else wrote.
Not sure whether your reporting spreadsheet is telling you the truth? Get a free audit from SEO Stuff and we will pressure-test the numbers you are making decisions on.
Free audit
Where do you stand in AI search?
A manual SEO + AI search audit of your site: how ChatGPT, Gemini, Perplexity and Claude read and cite it today, and what to fix first. Report within 48 hours, no credit card.
Get my free auditOr have it all done: AI SEO services, $999 once
How Does the Syntax Work?
The documented syntax is SUMPRODUCT(array1, [array2, ...]), and there is more information packed into that line than the surrounding prose admits. Reading the argument definitions carefully answers several questions the page never addresses in words.
That is worth doing deliberately rather than by instinct. The Sheets function reference uses a consistent notation across the whole library, so square brackets, default values and trailing ellipses carry the same meaning on every page. Reading the syntax line as notation rather than as decoration is often faster than reading the description.
array1 is the only required argument
Google marks array1 as required and describes it as the first array or range whose entries will be multiplied with corresponding entries in the second such array or range. Nothing in that description hints that the function is usable with one argument, but the syntax line puts array2 in square brackets, which is how the Sheets reference marks an optional argument throughout the library.
The optional second array has a documented default
This is the most useful line on the page and the easiest to skim past. Google annotates array2 as optional with a default of {1,1,1,...} of the same length as array1. Multiplying every entry by one leaves it unchanged, so a one-argument =SUMPRODUCT(A2:A10) returns the same result as =SUM(A2:A10). That equivalence is a documented consequence of the stated default, not a trick.
The description and the syntax disagree about how many arrays are allowed
The prose says two equally sized arrays. The syntax line says [array2, ...], and the trailing ellipsis is the reference's standard notation for a repeating argument. So the page describes a two-array function while its own syntax permits more than two, and it never reconciles the two statements or caps the count.
That inconsistency matters in practice, because three-array formulas are common. A quantity times a price times a currency rate is three ranges in one SUMPRODUCT, and the function handles it, but you are relying on the syntax notation rather than on anything the documentation states outright.
The sibling pages make the omission more conspicuous rather than less. Both the SUM and PRODUCT reference pages carry an explicit note that the function is specified as taking a maximum of 30 arguments while Sheets in fact supports an arbitrary number. SUMPRODUCT has the same [argument, ...] shape and no equivalent note anywhere on its page.
How Do You Write a SUMPRODUCT Formula Step by Step?
Step 1: Decide what one row of your data represents. SUMPRODUCT is a per-row calculator that reports a single total, so the first question is what arithmetic you would do on one row if you were doing it by hand. Quantity times price, hours times rate, weight times cost per kilogram: write that sentence down before touching a formula.
Step 2: Make the ranges the same shape. The documented behavior is about corresponding entries, which means the ranges have to line up position for position. Two ranges of the same height starting on the same row is the safe pattern. Mixing B2:B100 with C5:C103 will pair row 2 with row 5 and quietly return a number that looks plausible.
Step 3: Type the ranges in the order you would multiply them. Order makes no difference to the arithmetic, since multiplication is commutative, but it makes a large difference to whoever reads the formula next. =SUMPRODUCT(Quantity,Price) reads as a sentence; the reverse reads as a puzzle.
Step 4: Check the result against one row by hand. Pick any row, multiply its cells on a calculator, and confirm that number is a plausible share of the total. This catches the single most common failure, which is an off-by-one range, faster than inspecting the formula ever will.
Step 5: Convert hardcoded ranges to named ranges once it works. A formula reading =SUMPRODUCT(Units,UnitCost) survives a column insertion and explains itself in a review. This is housekeeping rather than arithmetic, but a SUMPRODUCT formula is exactly the kind of thing that gets copied into next quarter's file unexamined.
One habit is worth adding to those five. Keep the first working version of any SUMPRODUCT formula in a comment or an adjacent cell before you start extending it with conditions, because the conditional version is considerably harder to debug and you will want something known-good to compare against.
Spending more time repairing spreadsheets than reading them? Get a free audit and we will tell you which of your reports are worth rebuilding properly.
How Do You Turn SUMPRODUCT Into a Conditional Sum?
Here is the part of the function everybody uses and Google never mentions. A comparison such as B2:B200="West" evaluates to an array of TRUE and FALSE values, one per row. In arithmetic, Sheets treats TRUE as 1 and FALSE as 0, so multiplying a comparison array by a value array zeroes out every row that fails the test and leaves the rest untouched.
That is the whole mechanism behind =SUMPRODUCT((B2:B200="West")*(C2:C200)). The parenthesized comparison produces ones and zeros, the multiplication applies them as a mask, and SUMPRODUCT adds up what survives. Stacking more comparisons with further multiplications gives you an AND across conditions, which is how a single formula ends up filtering on region, quarter and product line at once.
None of this appears on Google's SUMPRODUCT reference page. There is no comparison in either sample formula, no mention of logical values, no mention of TRUE and FALSE behaving as 1 and 0, and no cross-reference to any conditional function. The page's only related signal is indirect: the SUM page lists SUMIF under "See also" and describes it as returning a conditional sum across a range.
Treat that absence as a real caution rather than a curiosity. The technique is reliable and has been for as long as the function has existed, but it rests on documented arithmetic coercion rather than on documented SUMPRODUCT behavior. If a future change altered how logical values coerce in array arithmetic, nothing on the function's own page would have promised otherwise.
The practical upshot is a tie-breaker worth adopting. Where SUMIFS can express your condition, use SUMIFS, because its conditional behavior is the documented purpose of the function rather than an emergent property. Reach for the SUMPRODUCT form when the condition involves arithmetic across columns that SUMIFS cannot express in criteria at all.
What Google's Own Documentation Does Not Say
The reference page is short enough that cataloging its silences is quick, and the list is more useful than the content. Every item below is a question that comes up the first week somebody uses the function in anger.
- What happens when the arrays are different sizes. The description says equally sized and the default for
array2is the same length asarray1, but no behavior, no error name and no outcome for a mismatch is stated anywhere on the page. - How text and blank cells are handled. The page says nothing about non-numeric entries, which is striking given that the sibling
PRODUCTpage explicitly states that empty cells in a range are ignored. - Whether
ARRAYFORMULAis required. The word does not appear on the page at all, so the official reference neither requires it nor rules it out forSUMPRODUCT. - The maximum argument count, which the
SUMandPRODUCTpages both address directly and this page does not address at all. - Any error type. No error name is published for this function, so there is no documented string to search for when a formula fails.
The one note Google does include points somewhere unexpected. The entire Notes section is a single line observing that matrix multiplication, MMULT, can also be accomplished with a combination of TRANSPOSE and SUMPRODUCT. That is a linear-algebra aside on a page whose readers overwhelmingly arrive from a billing spreadsheet.
The "See also" list reinforces the same framing, offering TRANSPOSE and MMULT and nothing else. No conditional function, no SUM, no SUMIFS. Google's documentation positions SUMPRODUCT as a matrix tool, while essentially the entire user base treats it as a conditional aggregator.
There is no date stamp anywhere on the page either, which is worth knowing before you plan around it. You cannot tell whether a silence reflects a deliberate current decision or an entry that has simply not been revisited, and that applies equally to the SUM, PRODUCT and MMULT pages.
Working from documentation that does not answer your actual question? Get a free audit and we will map what your data can and cannot currently tell you.
When Should You Reach for SUMPRODUCT?
The clearest case is weighted arithmetic. Any calculation of the form "multiply each row, then total it" is what the function was built for, and doing it in one cell rather than in a helper column keeps the sheet narrower and the intent visible in the total itself.
The second case is a condition that spans columns. SUMIFS tests a range against a criterion, which covers an enormous number of real questions, but it cannot easily express "sum revenue where margin per unit exceeded a threshold" when margin is itself a calculation across two columns. The SUMPRODUCT form handles that in one expression.
The third case is counting rather than summing. Because a comparison array is already ones and zeros, =SUMPRODUCT((B2:B200="West")*1) counts matching rows, and stacked comparisons count rows matching several conditions at once. It is the same mechanism doing a different job.
The fourth is auditability under constraint. A single cell containing one explicit formula is sometimes easier to review than a hidden helper column somebody could sort out of alignment, particularly in a shared file where you do not control who touches what.
Against all of that, there is an honest counterweight. A SUMPRODUCT formula with three stacked comparisons is genuinely hard to read, and in a file other people maintain, a helper column with a plain heading often beats a clever total. Choose the one your colleagues can debug at speed, not the one that demonstrates the most range.
Where Does SUMPRODUCT Fall Short?
Readability is the real limitation and it compounds quickly. Each additional condition adds another parenthesized comparison and another multiplication, and a formula with four of them is effectively write-only. Nothing in the syntax lets you label what any clause is testing.
Silent wrong answers are the dangerous failure. A misaligned range does not error; it pairs the wrong rows and returns a number in the right order of magnitude. Because the result looks reasonable, this class of mistake survives review in a way that a #REF! never would, and the official page publishes no error behavior to help you catch it.
Mixed data types are an undocumented risk rather than a known quantity. Since the page says nothing about text or blanks, a column that has picked up a stray label or a value stored as text behaves in a way you have to establish by testing in your own file rather than by reading anything official.
Performance is a consideration at scale. Whole-column references in a conditional SUMPRODUCT ask Sheets to evaluate comparisons across every row of the column, and a sheet carrying many of those recalculates noticeably more slowly than one using bounded ranges. Sizing ranges to the data costs nothing and helps.
Finally, there is the maintenance question. The conditional pattern relies on behavior that Google documents for arithmetic in general but not for this function in particular, so a SUMPRODUCT formula is slightly more exposed to future change than the equivalent SUMIFS. That is an argument for using the documented tool where it fits, not an argument against the function.
How Does SUMPRODUCT Compare to the Alternatives?
SUMIFS
SUMIFS is the right default for straightforward conditional sums. Its conditional behavior is the documented point of the function, the formula reads in near-plain language, and it is faster to fix six months later. Prefer it unless your condition genuinely cannot be written as a criterion.
The decision usually comes down to one question: can the condition be stated as a comparison against a single range? Region equals West, date falls in a quarter, status is open. All of those are SUMIFS territory. The moment the test needs two columns multiplied or divided before it can be evaluated, SUMIFS runs out of room and SUMPRODUCT does not.
SUMIF
SUMIF handles the single-condition case and appears in Google's own "See also" list on the SUM page, described as returning a conditional sum across a range. For one criterion it is the simplest thing that works, and simplicity is worth more in a shared sheet than flexibility you are not using.
It is also the one alternative Google itself connects to the summing family in writing, which is a small but real advantage when you are justifying a formula choice to somebody else. The cross-reference exists on the SUM page rather than on the SUMPRODUCT page, and that direction of travel says something about how the reference is organized.
SUM with a helper column
Calculating row totals in their own column and then running SUM down it is the most legible option of all, and in a file other people maintain it is frequently the correct one. The cost is one more column and the risk that somebody sorts the sheet without it.
There is a hybrid worth knowing about too. Keep the helper column for the per-row arithmetic, then use SUMIFS against it for the conditions. You end up with two simple formulas instead of one complicated one, and each of them fails loudly rather than quietly if a range drifts.
MMULT and TRANSPOSE
This is the pairing Google's own Notes section points to. MMULT calculates the matrix product of two matrices, and its documentation states the standard rule that the number of columns in the first must equal the number of rows in the second. If you are doing actual linear algebra, that explicit size rule is a better-documented starting point than SUMPRODUCT.
The contrast between the two pages is instructive. MMULT publishes its size constraint as a stated rule with a consequence attached, while SUMPRODUCT mentions equal sizing in a description and never says what happens if you ignore it. Same company, same function library, two very different levels of specificity about the same class of problem.
ARRAYFORMULA
ARRAYFORMULA is the general-purpose way to make an expression operate across a range, and it overlaps with SUMPRODUCT in spirit. Worth noting that Google's SUMPRODUCT page never mentions it, so the question of whether the two should be combined is one the official reference leaves entirely open.
Want someone to look at the whole reporting stack rather than one formula? Get a free audit and we will show you what is costing you time every month.
Final Thoughts
SUMPRODUCT is a small, well-behaved function wrapped in an unusually thin documentation page, and most of the confusion around it comes from that mismatch rather than from the function itself. Multiply corresponding entries, add the products, return one number. Everything else is consequence.
Separate the three categories as you work. Documented: the operation, the two sample formulas, the optional second array defaulting to ones, and the MMULT aside. Derivable but unstated: that a one-argument call equals SUM, and that the syntax notation permits more than two arrays while the description says two. Not published at all: mismatched sizes, text and blank handling, ARRAYFORMULA, the argument cap, and any error name.
The practical rule that falls out of that is simple enough to remember. Use SUMIFS when it fits, use SUMPRODUCT when your condition is arithmetic across columns, size your ranges to your data, and verify any new formula against one row by hand before it feeds a decision.
If you want to see conditional totals doing real work in a finished sheet rather than in isolation, our walkthrough of building a Google Sheets budget template shows the same ideas wired into a file you can actually use.
Want this done for you?
SEO Stuff gets businesses cited by ChatGPT, Gemini, Perplexity and Claude, and ranking in Google. Start with the free audit, a call, or the package.
See where you stand
A free, manual SEO + AI search audit of your site, with a report within 48 hours. No credit card, no sales call.
Get my free auditTalk it through
A free 15-minute call with the founder about whether AI search is a meaningful opportunity for your business.
Free strategy callHave it done
The Done-For-You Package: audit, 10 pages of content, 3 DR50+ placements, dashboard. $999 once, delivered in 21 business days.
See the package

