How to make a running (cumulative) total
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Show a column that adds each new row to the sum of everything above it — a running balance.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =SUM($B$2:B2) | Anchor the start with $, drag down. The end reference grows each row. |
| Google Sheets | =SUM($B$2:B2) | Identical; or =SCAN(0,B2:B10,LAMBDA(a,c,a+c)) for a spill. |
| LibreOffice Calc | =SUM($B$2:B2) | Identical. |
How it works
The trick is a half-locked range: $B$2 stays put while the second reference (B2, B3, B4 ...) grows as you drag down, so each cell sums from the top to its own row. Row 3's total to B4 is 10+20+30 = 60.
Verified, not just documented
We ran =SUM($B$2:B4) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 60 — 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 60 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 Excel.
Functions used
SUM — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to calculate a cumulative (running) percentage
- How to calculate each row as a percentage of the total
- How to reference a cell on another sheet
- How to sum a column
- How to sum a column that contains errors