How to multiply two columns (and total the result)
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Multiply values row by row — like quantity × price — and get the grand total.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =SUMPRODUCT(A2:A5,B2:B5) | One-cell grand total. For per-row results, =A2*B2 filled down. |
| Google Sheets | =SUMPRODUCT(A2:A5,B2:B5) | Identical; ARRAYFORMULA(A2:A5*B2:B5) spills per-row products. |
| LibreOffice Calc | =SUMPRODUCT(A2:A5,B2:B5) | Identical. |
How it works
For a per-row result, =A2*B2 filled down is all there is to it. But if you only need the total, SUMPRODUCT multiplies each pair and sums in one step: 2×10 + 3×20 + 1×50 + 4×5 = 150 — no helper column. It's the standard pattern for order totals, weighted scores, and hours × rate timesheets.
Verified, not just documented
We ran =SUMPRODUCT(A2:A5,B2:B5) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 150 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 150 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.
Functions used
SUMPRODUCT — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to check if a cell contains any word from a list
- How to count cells that contain errors
- How to count the total words in a range
- How to calculate progressive tax with brackets in one formula
- How to reference a cell on another sheet