Skip to content
100% local

CSV group and sum

Group CSV rows by one or more columns and sum, count or average the rest.

Input

CSV group and sum

Paste CSV data with a header row and this tool groups the rows by one or more columns, then aggregates the rest — a spreadsheet pivot table without opening a spreadsheet. Use it to turn a raw export of orders, log entries or survey responses into totals per region, counts per category or averages per customer.

Set which column (or comma-separated columns) to group by, then choose an aggregate: count rows, sum a numeric column, average it, take its minimum or maximum, or count distinct values. Columns can be named or given as a 1-based position, so "region" and "1" both work. The optional cross-tab column turns its own distinct values into separate output columns — group orders by region with product as the cross-tab column and you get one row per region with a column per product. Sort the result by group name or by the aggregated value, add a grand-total row, and control the decimal places shown.

The parser follows the CSV convention used by spreadsheets: quoted fields, embedded commas and escaped quotes all work, and Windows (CRLF) and Unix (LF) line endings are treated the same. The input delimiter can be auto-detected or fixed to comma, semicolon, tab or pipe. Output renders as an aligned plain-text table, CSV or a Markdown table — pick whichever the next step needs.

Everything runs locally in your browser; the data in the textarea is never uploaded anywhere, which matters for exports that contain customer or financial data. Copy the result, download it as a .txt file, or send it straight back into the input to group it again by a different column.

FAQ

Do I need a header row?
Yes. The first row names the columns, so you can refer to them by name in the options — or use a 1-based position like "2" instead.
What happens to non-numeric values when summing or averaging?
They're skipped. A column with a mix of numbers and text (or blanks) is aggregated using only the values that parse as numbers.
How does the cross-tab column work?
Its distinct values become the output columns, one per value, and each cell holds the aggregate for that group-and-value combination — the classic pivot-table shape.
Can I group by more than one column?
Yes. List column names or positions separated by commas, e.g. "region, product" — each unique combination becomes one output row.
Is my CSV data uploaded anywhere?
No. Grouping and summarizing run entirely in your browser — the data never leaves your device.