Google Sheets running total and percent-of-total formula builder
Type the column of amounts and get a formula to paste next to it: a running total (each row adds up everything above it), each row as a percent of the total, or a running percent that ends at 100%. Pick a group column and the totals restart for each group, like each region or month. It is built in your browser and nothing you type here is sent anywhere. Every combination below was run in a real Google Sheet on 3 November 2026 (blanks, a repeated value, a negative number, a decimal, groups, an empty group cell) and compared with an independent calculation, once in a US-locale spreadsheet and once in a German-locale one with semicolons: 26 of 26 matched.
You're on the list. We'll email you once.
How to use it
"One formula fills the whole column": type it once in the first row of an empty column next to your data (not in the header). It spills down by itself and new rows are added as they appear. The cells below must be empty or Sheets shows #REF!. "One row, drag it down": paste it in the first data row and drag the corner down; the start of each range is fixed with $ so it grows as you drag. For the two percent results, select the result column and use Format > Number > Percent.
The running total follows the order of the rows as they stand. If your rows should add up in date order, sort the rows by date first (or keep them sorted with the add-on below), then the running total follows that order.
What the three results give
| Amounts 10, 20, 20, 5 | Result |
|---|---|
| Running total | 10, 30, 50, 55 |
| Percent of total | 18.2%, 36.4%, 36.4%, 9.1% |
| Running percent of total | 18.2%, 54.5%, 90.9%, 100% |
The catches (found by testing in a real Sheet)
- Numbers stored as text break the percent results.
SUMignores text, so with every amount typed as text (left-aligned) the percent formulas answered#DIV/0!in our test, and a running total can stop with#VALUE!. Convert the column first (select it, Format > Number > Automatic) or use a helper column=ARRAYFORMULA(VALUE(B2:B)). - Blank cells stay blank and add nothing. A blank amount does not become 0 in the result column, and the running total just carries on after it. A negative amount such as -3 subtracts, as it should.
- Groups are compared without regard to case: "North" and "north" are one group. Rows with an empty group cell are grouped together. (A plain
SUMIFwith an empty test returns 0 in Sheets, so the grouped formulas use"="as the test for an empty group; that is why they look longer.) - Row order is the order. Nothing here sorts. Insert a row in the middle and every running total below it changes, which is the point; append at the bottom to keep earlier rows steady.
- Separators. If your sheet's locale writes decimals with a comma (File > Settings), Sheets wants
;between arguments: switch the separator above. The semicolon versions were run in a German-locale Sheet.
No code: KeepSorted
The add-on sorts the original table in place without code: no second copy, so formatting, checkboxes and notes move with their rows and people keep editing the same table. Select the range, pick the sort columns, Save. Free: one area per tab, up to 2 sort columns, no trial clock. Pro ($5/month or $39/year): up to 5 sort columns, custom orders like High > Medium > Low, ticked checkbox rows to the bottom, stacked tables sorted separately, and sorting after form responses, other editors' changes and an hourly check.
KeepSorted is built and in testing. It is not in the Google Workspace Marketplace yet. Leave your email and we send one message when you can install it.
The generators and the formulas stay free either way.
More KeepSorted tools and guides
- CONCATENATE formula builder (join cells, columns, ranges)
- SPLIT formula builder (text to columns or rows)
- VLOOKUP formula builder (XLOOKUP, INDEX MATCH, whole column)
- COUNTIF formula builder (count, sum, average the rows that match)
- RANK formula builder (ties, rank within a group)
- FILTER formula builder (text, number, date conditions)
- Unique values formula maker (UNIQUE, counts, duplicates)
- Sort formula generator (SORT, SORTN, QUERY order by)
- Auto sort script generator (Apps Script that sorts the original)
- StaySorted alternative: an honest comparison
Sources
- Google Docs Editors function list (SCAN, LAMBDA, MAP, SUMIF, SUMIFS)