Analyze

Add a cumulative sum column to a numeric CSV column

Add a running (cumulative) total column to a numeric CSV column, with optional group reset.

🛡️ Your rows never leave your browser.
Why Onfyt: Supports partial running totals that reset by group—equivalent to SQL's SUM() OVER (PARTITION BY region ORDER BY date).

Interactive Sample Data

dateregionrevenue
2024-01-15Nairobi4500
2024-01-16Nairobi5200
2024-01-17Mombasa3200

How this tool works

A running total column shows the accumulated sum at each row, useful for tracking cumulative revenue across time, checking bank statement balances, or monitoring inventory consumption. SQL achieves this with a SUM() OVER (ORDER BY date) window function; pandas uses cumsum(). DataFix adds a running total in one click, with optional group-reset (resets cumulative sum when the group-by column changes value). Calculating cumulative running sums across sequential transactions enables cash flow forecasting, inventory drawdown tracking, and cumulative sales velocity analysis. Calculating cumulative running totals across chronological transaction records enables cash flow tracking, cumulative inventory consumption analysis, and sales velocity monitoring. Our engine computes running sums across sequential rows with support for reset groupings. Running total calculations maintain precision across floating-point accumulations, preventing IEEE 754 precision drift through decimal scaling. Group-level reset conditions allow calculating running totals per account or per fiscal quarter. Chronological running totals maintain audit traceability across transaction ledgers, enabling rapid identification of cash flow trends and balance shifts over time. Running balances update reactively as records stream through, providing instantaneous visual feedback during data reconciliation reviews. Calculating cumulative running balances across transaction sequences provides real-time visibility into cash flow trajectories and inventory drawdown rates without requiring complex recursive queries. Negative values and transaction reversals are handled with strict mathematical sign preservation, ensuring cumulative balance trajectories reconcile accurately. Partition reset grouping options allow calculating cumulative figures per account or department seamlessly.

Things that usually go wrong

  • Non-numeric values (e.g. '-', 'N/A') are treated as 0 in the cumulative sum.
  • If the column contains currency symbols (£100), strip the symbol first.

Edge cases we tested

🧪 Null/blank value in revenue column

Treated as 0 in running total; doesn't reset the accumulator.

🧪 Non-numeric values in accumulation column

Treated as zero without disrupting the running sum.

Frequently Asked Questions

Can I compute a running total per group?

The current tool computes a global running total. For per-group totals, sort by group first and then add row numbers.

Does row order matter?

Yes — the running total is computed top-to-bottom in the order rows appear.

Related tools

Analyze

Count Word Frequency

Count word frequency across a text column in a CSV and output a frequency table.

Open Tool →
Analyze

Count Unique Values

Count distinct values per CSV column and generate a value-count frequency table for each.

Open Tool →
Analyze

Top N Values in a Column

Extract the top N or bottom N rows from a CSV ranked by a numeric column.

Open Tool →