formulastreak

Maths function

SUMPRODUCT function in Google Sheets and Excel

SUMPRODUCT multiplies ranges item by item and adds up the products.

Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet

Syntax

SUMPRODUCT(array1, [array2], [array3], …)

Arguments in [brackets] are optional. Google Sheets writes it SUMPRODUCT(array1, [array2, ...]).

Example

=SUMPRODUCT(F2:F13,G2:G13) reads: Multiply each order's quantity F2:F13 by its price G2:G13 and add up all twelve products.

Leaf & Loam orders · edit K1 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultK1 = $397.25
ABCDEFGHIJK
1OrderDateCustomerProductCategoryQtyPriceStatusRevenue$397.25
210012 Mar 2026Mara OkaforMonsteraPlants1$34.00Shipped
310022 Mar 2026Jonas LindTerracotta potPots3$12.50Shipped
410033 Mar 2026Priya RamanSnake plantPlants2$22.00Shipped
510044 Mar 2026Tomás RuizWatering canTools1$18.00Pending
610055 Mar 2026Elif DemirFernPlants4$9.50Shipped
710065 Mar 2026Mara OkaforPotting mixSoil2$7.25Returned
810076 Mar 2026Kenji MoriPruning shearsTools1$24.00Shipped
910087 Mar 2026Ines VargaCeramic potPots2$19.00Pending
1010098 Mar 2026Jonas LindMonsteraPlants1$34.00Shipped
1110109 Mar 2026Sofia RossiFernPlants6$9.50Shipped
12101110 Mar 2026Priya RamanPotting mixSoil5$7.25Shipped
13101211 Mar 2026Leo BrandtSnake plantPlants1$22.00Pending

K1 shows $397.25: 1 × $34 + 3 × $12.50 + … for all twelve orders.

How the spreadsheet calculates it

Multiplies F2:F13 and G2:G13 row by row, then adds up the results.

  1. 1. SUMPRODUCT: Multiplies F2:F13 and G2:G13 row by row, then adds up the results.
    • range1 = `F2:F13`: the first column of numbers
    • range2 = `G2:G13`: the second, the same height. With one range, SUMPRODUCT just adds it

More SUMPRODUCT examples

  • =SUMPRODUCT(F2:F13,G2:G13)Total revenue: quantity × price, added up.
  • =SUMPRODUCT(G2:G13,F2:F13)/SUM(F2:F13)The average price per item sold (a weighted average).
  • =SUMPRODUCT((B2:B17="North")*(C2:C17="Fern")*E2:E17)Revenue for North ferns.
  • =SUMPRODUCT((MONTH(A2:A17)=3)*E2:E17)Revenue for March from a column of dates.

Paste any of these into the formula explainer to see it step by step.

Tips

  • Compare text columns before multiplying: (B2:B17="North")*E2:E17, never B2:B17*E2:E17.
  • Keep every range the same size, and change them together when the data grows.
  • Use real ranges instead of whole columns for speed.
  • For a plain total with conditions, SUMIFS is easier for others to read; keep SUMPRODUCT for the cases it alone can do.

What SUMPRODUCT is used for

Revenue from quantity × price without a helper column, weighted averages and scores, and conditional totals in versions or situations where SUMIFS can't express the condition.

Arguments

ArgumentRequiredWhat it is
array1YesThe first range or array.
array2, …NoMore ranges, each the same size as array1.Watch out: Different sizes give #VALUE!.

Common mistakes

  • Ranges of different heights: #VALUE!.

  • Ranges of different sizes, which give #VALUE!.

  • Whole-column references, which Microsoft advises against for performance.

In Google Sheets

Google Sheets has SUMPRODUCT with the same arguments.

Errors you may see with SUMPRODUCT

  • #VALUE!: The ranges aren't the same size, or text meets a multiplication inside the formula. How to fix it.

Questions

How do I do a weighted average?

SUMPRODUCT(values, weights)/SUM(weights). See the weighted average section.

SUMPRODUCT or SUMIFS?

SUMIFS for plain conditions, SUMPRODUCT for conditions with calculations. See SUMPRODUCT vs SUMIFS.

Do I need Ctrl+Shift+Enter for SUMPRODUCT?

No. SUMPRODUCT handles arrays on its own in every version, which is why it was the classic way to do array maths before dynamic arrays.

Why does SUMPRODUCT give a lower total than expected?

A number stored as text in one of the ranges counts as zero when the ranges are separate arguments. Find it with ISTEXT. See SUMPRODUCT #VALUE! for the related error.

Can SUMPRODUCT count instead of sum?

Yes: multiply only conditions, with no values column. SUMPRODUCT((B2:B17="North")*(C2:C17="Fern")) counts the rows where both are true, like COUNTIFS.

Does SUMPRODUCT work in Google Sheets?

Yes, with the same arguments and the same rule that every range must be the same size, so the formulas on this page work in both apps.

Sources

Official documentation the facts on this page were checked against.

Practise SUMPRODUCT on a live sheet

Lesson 32, Numbers stored as text (Unit 8, Cleaning text at scale), has 6 graded exercises, checked instantly, with steps and hints when you're stuck. Pro