In Excel: use =SUMPRODUCT(range1, range2) — it multiplies the ranges row by row and adds the results, so quantities × prices becomes a single order total.
Syntax
Arguments
| Argument | Description | |
|---|---|---|
array1 | required | The first range or array. All arrays must have identical dimensions. |
array2, ... | optional | Further ranges of the same shape, multiplied element by element before summing. |
Related functions
3 value/weight pairs · Unweighted mean: 80.0000
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
SUMPRODUCT multiplies corresponding elements of equally sized ranges and sums the products. That one behaviour covers a surprising amount of ground: order totals from quantity and price columns, weighted averages, and — because TRUE and FALSE become 1 and 0 when multiplied — conditional counting and summing with logic that SUMIFS cannot express, such as criteria that reference a calculation rather than a plain column. It was the standard multi-criteria tool before SUMIFS existed and remains the answer when the condition is an expression. Every array must have identical dimensions or the result is #VALUE!. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “sumproduct function in excel”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the tool above before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Quantities in B2:B20 and unit prices in C2:C20: =SUMPRODUCT(B2:B20, C2:C20) returns the order value in one cell, with no helper column. A weighted average of scores and weights: =SUMPRODUCT(B2:B20, C2:C20)/SUM(C2:C20). Counting rows where the region is West and the value exceeds 1,000: =SUMPRODUCT((A2:A20="West")*(D2:D20>1000)). SUMPRODUCT replaces an entire helper column with one cell, and expresses conditions SUMIFS has no syntax for. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.
In Google Sheets
Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. Here is the takeaway for “sumproduct function in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Ranges of different sizes, which returns
#VALUE!— this is the single most commonSUMPRODUCTerror. - Including whole-column references such as
A:Aon large sheets, which forces far more calculation than necessary and slows the workbook. - Text or errors inside a range;
SUMPRODUCTpropagates the error rather than skipping it, so clean the data or wrap terms inIFERROR.
Frequently asked questions
How do I calculate a weighted average?
=SUMPRODUCT(values, weights)/SUM(weights). The numerator multiplies each value by its weight and totals them; the denominator normalises.
Why does SUMPRODUCT return #VALUE!?
Either the ranges differ in size, or one contains text or an error value. Check the dimensions first — that is the usual cause.
When should I use SUMPRODUCT instead of SUMIFS?
When a criterion is an expression rather than a column comparison — for example testing a calculated value, or comparing two columns to each other.