ShareYourGroupShareYourGroupExcel Formulas

Math functions

SUMPRODUCT function in Excel

SUMPRODUCT multiplies ranges together item by item and adds up the results.

SUMPRODUCT does in one cell what would otherwise need a helper column. To value your stock you would normally add a column of price times quantity and total it. SUMPRODUCT multiplies each pair and adds the answers without the extra column.

Syntax

=SUMPRODUCT(array1, [array2], ...)
ArgumentWhat it is
array1The first range.
array2, ...More ranges of the same size. Matching items are multiplied.

Examples

Each result below is what Excel itself showed for the formula on the sample sheet.

Sample sheet: A small price list with item codes. The table is sorted by code.
ABCDE
1CodeItemCategoryPriceStock
2A101Basmati Rice 5 kgGrocery65040
3A102Toor Dal 1 kgGrocery16075
4B201NotebookStationery60300
5B202Ball PenStationery100
6C301LED BulbElectronics110200
7C302Power BankElectronics129918
8D401Steel BottleHome45055
Sample sheet: Twelve sales made by four salespeople in three regions.
ABCDEF
1DateSalespersonRegionProductUnitsAmount
205-Jan-2026AshaNorthNotebook201200
312-Jan-2026RaviSouthPen50500
420-Jan-2026MeenaNorthBag43000
502-Feb-2026AshaEastPen30300
614-Feb-2026KabirSouthNotebook15900
728-Feb-2026RaviNorthBag21500
803-Mar-2026MeenaEastNotebook402400
915-Mar-2026AshaNorthBag32250
1022-Mar-2026KabirSouthPen60600
1101-Apr-2026RaviEastNotebook251500
1218-Apr-2026MeenaNorthPen80800
1306-May-2026AshaSouthBag53750

How it works

Give it two ranges of the same size. It multiplies the first items together, the second items together, and so on, then adds all those products. With three ranges it multiplies three numbers on each row.

The ranges must have the same number of rows and columns. If they differ, the result is #VALUE!. Text in a range counts as zero.

Conditions inside SUMPRODUCT

The real power comes from putting a test inside. A test such as C2:C8="Grocery" produces a list of TRUE and FALSE values. When that list is multiplied by something, TRUE acts as 1 and FALSE as 0. So

=SUMPRODUCT((C2:C8="Grocery")*D2:D8*E2:E8)

keeps the Grocery rows and turns every other row into zero before adding.

Each test needs its own pair of brackets.

What it can do that SUMIFS cannot

SUMIFS is faster and easier to read, and should be the first choice. SUMPRODUCT is for the cases SUMIFS cannot handle:

Weighted averages

A plain average treats every row alike. When rows stand for different quantities, weight them: multiply each value by its weight, add up, and divide by the total weight. A student's result where subjects carry different credits, or the average price paid across purchases of different sizes, are both SUMPRODUCT(values, weights) / SUM(weights).

Speed

SUMPRODUCT works through every cell of every range you give it. Whole-column references such as A:A make it process over a million rows and can slow a workbook badly. Give it the real extent of the data, or convert the data to a table so that the ranges grow by themselves.

Common mistakes

In Google Sheets

SUMPRODUCT works the same way in Google Sheets.

Related functions

Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.

This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.