Multiply columns and add them up
The most common spreadsheet calculation: quantity times price on every row, then a total. Change any quantity or price and every line and total follows.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | Quantity | Price | Line total |
| 2 | Notebook | 13.50 | ||
| 3 | Pens | 12.00 | ||
| 4 | Stapler | 12.99 | ||
| 5 | Folders | 13.50 | ||
| 6 | Tape | 12.40 | ||
| 7 | Total | 24 | 64.39 | |
| 8 | In one formula | 64.39 | ||
| 9 | Average price | 2.68 |
Blue cells are inputs: type a new value and the sheet recomputes. Click a result to see its formula.
How it works, step by step
=B2*C2 =SUM(D2:D6) =SUMPRODUCT(B2:B6,C2:C6) =C2*$F$1 The same formula on your Drop Top Sheets data
In Sheets the line totals of a store come in live, already multiplied: one formula adds them up, and a filter column narrows it, e.g. =data.order_lines.sum(total, country, "Belgium").
=data.order_lines.sum(total) Functions used here
More free tools
Questions
How do I multiply two columns in a spreadsheet?
In the first row type =B2*C2, then fill it down the column. Each row multiplies its own two cells.
How do I add up a column?
Use =SUM(D2:D6) with the range of the column, or =SUM(D:D) for the whole column when nothing else is in it.
Is there a single formula that multiplies and adds?
Yes, SUMPRODUCT: =SUMPRODUCT(B2:B6,C2:C6) gives the sum of quantity × price over all rows, 64.39 in the example.
How do I multiply a column by a percentage?
Put the percentage in a cell, for example 21% in F1, and use =C2*$F$1 for the amount or =C2*(1+$F$1) for the price including it. The $ signs keep F1 fixed while you fill down.
Why does my total show 0?
The numbers are probably stored as text, for example after pasting from another system. Text is left-aligned; convert it with =VALUE(C2) or by multiplying by 1.
Run these formulas on live data
Sheets is a spreadsheet with 491 functions that reads your store, accounting or project data live, builds dashboards and e-mails reports on a schedule.