Toolvore

CSV Group By

Group CSV rows by several columns and calculate exact decimal sums, minimums, maximums or record counts in a complete local export.

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.

Group exact CSV key tuples and calculate record counts or exact decimal sums, minimums and maximums.

How to use it

  1. 1Paste or open UTF-8 CSV and choose its delimiter.
  2. 2Select grouping columns and a calculation, with a value field for numeric operations.
  3. 3Review the summary and download the complete CSV and source-free count report.

Example

Input
region,product,amount North,Tea,0.1 North,Tea,0.2 South,Tea,5
Output
region,product,sum_value North,Tea,0.3 South,Tea,5

Group by region and product, choose Sum and select amount. The sum of 0.1 and 0.2 is exactly 0.3.

What happens to your data

Grouping and exact decimal arithmetic run locally. Optional usage records and count reports exclude source keys, values, headings and filenames.

Last updated November 2026

Turn repeated CSV rows into a compact summary. Choose one or several grouping columns, then count records or calculate a sum, minimum or maximum from one numeric field. Groups keep their first-seen order and export as ordinary rows that are easy to join, chart or check.

How it works

Grouping compares exact tuples of original cell text. Case, leading zeros, spaces and empty keys are significant. Tuple serialization keeps a key such as two separate fields distinct from a single field containing their punctuation. The first occurrence of each tuple determines output order. Several grouping columns retain the order you selected in the interface. Count includes every source data record. Sum, minimum and maximum interpret the chosen numeric column, including when it is also a grouping field.

Output contains the grouping columns plus one calculated column. The generated heading is record_count, sum_value, min_value or max_value. If a chosen grouping heading already uses that name, leading underscores are added until the new heading is unique. This avoids overwriting an existing group key. A header-only source produces an empty summary with headings. This workspace produces a tall multi-key summary. CSV Pivot provides a separate wide group-by-category layout.

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: Add decimal amounts by region and product

Input
region,product,amount North,Tea,0.1 North,Tea,0.2 South,Tea,5
Result
region,product,sum_value North,Tea,0.3 South,Tea,5

Group by region and product, choose Sum and select amount. The sum of 0.1 and 0.2 is exactly 0.3.

Common use cases

  • Summarize order amounts by region and product before charting.
  • Count exported events by several exact categorical fields.
  • Find the smallest and largest amount in each reviewed group.
  • Build a compact table to join back to another CSV without creating category columns.

Frequently asked questions

Does count ignore blank cells?+

Count includes every data record in its group. Blank group keys are kept as exact text. It does not count only populated numeric cells.

Can I group by more than one column?+

Yes. Select the fields that form one exact grouping tuple. The result keeps those fields and one selected calculation.

Are groups sorted?+

Groups appear in first-seen order. No alphabetical, locale or numeric sorting is inferred.

What if a selected amount is blank or invalid?+

The entire numeric calculation stops with the CSV record and column location. Values are never silently skipped or treated as zero.