SmartQueryTools

Add Cumulative Sum to TSV Files Online

Add a running total column to TSV files for any numeric column. Optionally order by a date or sequence column and restart totals per group — no upload required.

About this tool

Add a running total column to a TSV file using a cumulative SUM window function. Set the Order By column to control accumulation order and optionally partition by a group column for per-group running totals. Useful for cumulative revenue charts, stock counting, or progressive loan balance calculations. Runs locally in your browser — no upload needed.

Frequently Asked Questions

What is a cumulative sum and how does it work in a TSV file?

A cumulative sum (also called a running total) adds each row's value to the sum of all preceding rows. The result column shows the accumulated total at each point — equivalent to SQL's SUM(col) OVER (ORDER BY order_col ROWS UNBOUNDED PRECEDING).

Can I compute a cumulative sum per group in a TSV file?

Yes. Set a Partition By column and the running total resets to zero at the start of each new group. For example, cumulative sales partitioned by product gives a separate running total for each product.

Does the sort order affect the cumulative sum in a TSV file?

Critically yes. The running total accumulates in the order set by the Order By column. Always use a date, timestamp, or sequence column as the Order By. Without one, the order is arbitrary and the running total will be meaningless.

Is my data private?

Yes — completely. Your file is never uploaded to any server. Everything runs locally in your browser using WebAssembly — processing happens entirely inside your tab. Once you close the tab, nothing is retained.

What is the maximum file size?

The free limit is 50 MB. For larger files, performance depends on your device's available memory — most modern machines handle 500 MB to 1 GB comfortably.

Related Tools