CSV Running Total
Append exact decimal running totals in CSV row order and optionally restart at adjacent group boundaries, with a complete local download.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Append exact cumulative decimal sums, optionally resetting when original adjacent group keys change.
How to use it
- 1Open or paste an ordered CSV and choose its amount column.
- 2Enter a distinct new heading and optionally select adjacent grouping keys.
- 3Add totals, review the retained row order and download the complete result.
Example
- Input
- team,amount A,0.1 A,0.2 B,5 A,2
- Output
- team,amount,running_total A,0.1,0.1 A,0.2,0.3 B,5,5 A,2,2
Select amount and group by team. The final A starts a new adjacent segment, so its total is 2.
What happens to your data
Values and group keys remain in tab memory. The report records indexes and counts without cell text or headings.
Last updated November 2026
Append exact cumulative decimal totals in the order your CSV already uses. Choose an amount column and a new output heading, optionally set adjacent grouping keys, and keep every original row and cell alongside its calculated total.
How it works
The first amount starts the total and each later amount is added exactly. With no grouping columns the whole table is one segment. Optional group fields compare their original text between neighboring rows. A change in any selected key restarts the total before that row is added. A key that appears again after another segment starts a new total. This is an order-dependent cumulative calculation and does not sort or collect matching keys from across the file.
The new heading must contain 1–160 UTF-8 bytes, avoid control characters and differ exactly from every original heading. It is appended after all source fields. At 128 existing columns there is no room for another output column. Header-only input yields the augmented header and no data records. Select CSV Group By when you need a single combined summary for all occurrences of a key.
Numeric input must use signed plain decimals with at most 100 total digits and 30 fractional digits. Forms such as 12, +12.5, -.25 and 1. are supported. Empty values, surrounding spaces, currency symbols, grouping commas, exponents, NaN and Infinity are rejected. Every selected numeric value is validated before a complete result is offered. Scaled-integer arithmetic preserves decimal sums exactly within the supported bounds. Output removes trailing decimal zeros and normalizes negative zero. Units and currencies are supplied by the table and never inferred.
Paste or open UTF-8 CSV up to 500 KiB and choose comma, semicolon or tab explicitly. The first record supplies unique, nonempty column names. Unequal field counts, invalid quoting and invalid Unicode stop parsing. Limits include 10,000 records including the header, 128 columns and 200,000 cells. Complete output is limited to 2 MiB. A result that would exceed a bound fails before a download is offered. CSV output uses UTF-8 without a BOM and CRLF record endings. Quoted line breaks and delimiters stay within their logical cells.
The table preview is bounded and the text preview may be shortened. Copy and download include the complete output. Editing input or settings removes the previous result. File reads are tied to the latest input revision, including after Clear or another file choice. The separate JSON count report omits source values, headings, filenames and expression text. Formula-like CSV cells are counted and retained literally. Spreadsheet software may evaluate those cells or change identifiers when importing. Review the file and import affected columns as text. Browser processing happens in tab memory. Optional usage measurement excludes the source and result values.
Worked example: Restart a running total at each adjacent team change
- Input
- team,amount A,0.1 A,0.2 B,5 A,2
- Result
- team,amount,running_total A,0.1,0.1 A,0.2,0.3 B,5,5 A,2,2
Select amount and group by team. The final A starts a new adjacent segment, so its total is 2.
Common use cases
- Add a running quantity or amount to an already ordered export.
- Restart cumulative totals for adjacent invoice or team blocks.
- Check decimal balance movements without floating-point rounding.
- Retain the original amounts beside cumulative results for independent review.
Frequently asked questions
Does a later repeated key continue its previous total?+
No. Group resets use adjacent segments. Once a different key occurs, a later repeated key starts from zero again.
Does it sort dates or account numbers?+
It follows the supplied row order. Sort deliberately first when your calculation needs another order.
Will 0.1 plus 0.2 equal 0.3?+
Yes. Supported plain decimals use scaled integers, retaining exact decimal sums. It does not apply currency rounding.
Can I overwrite an existing column?+
Choose a distinct output heading. Existing cells and headings are retained in the complete export.
Standards and limitations
Related tools
CSV Formula Calculator
Use original CSV column references in a bounded scientific formula and append a new approximate numeric result column without uploading your source.
CSV Date Converter
Convert selected CSV dates between explicit numeric formats, validate Gregorian dates and keep empty cells and text identifiers intact.
CSV Fill Missing Values
Fill empty CSV cells in selected columns, keep contiguous groups separate and download the complete table with a source-free count report.
CSV Schema Validator
Validate CSV against an explicit Table Schema subset: exact columns, logical types, required values, bounds, uniqueness and primary keys, without changing cells.