Guide
Building a pivot table from a CSV: group by, count, sum and average
A pivot table answers questions like “sales per region”, “hours per project and month” or “how many answers per option” by grouping rows and calculating a number for each group. Spreadsheet apps can do it, but their pivot menus are fiddly and they easily change your data on import. This tool builds the summary directly from a CSV or Excel file and gives you a clean result table.
Row groups
Choose one or more columns to group by. Each distinct combination becomes one row of the result: Region gives one row per region; Region and Product give one row per region-and-product pair. Empty values are shown as “(blank)”, so missing data stays visible.
Spreading a column across
Optionally, choose a column field whose values become columns, such as Month or Quarter. The result is a cross table with regions down the side and months across the top. Values are sorted naturally, so “Week 2” comes before “Week 10”.
Value and calculation
Pick the column to calculate on and how: sum, average, minimum, maximum, median, or count of distinct values. A column that looks like money, such as revenue, sales or amount, is preselected. Without a value column, the tool simply counts rows per group, which answers “how many”.
Numbers as people write them
Exports rarely contain clean numbers. Values like “1,234.50”, “€ 9.99”, “USD 1,200”, “(12)” for negative 12, and “12%” are read correctly. If your file uses a decimal comma, as in 1.234,50, switch on the decimal-comma option. Cells that still cannot be read as numbers are left out of sums and averages, and a notice tells you how many there were, so nothing goes wrong silently.
Totals
With totals on, the result gets a total column and a total row. Totals are always calculated from the original rows, not from the group results, so a total average or median is correct even when groups differ in size.
Reading and saving the result
The result table appears below the settings and updates as you change them. Download it as CSV, Excel or TSV to paste into a report, chart it, or share it.
Typical summaries
Revenue per region and quarter, orders per customer, hours per project and person, survey answers per question and option, expenses per category and month, students per class and grade.
Several row groups
With two or more row fields, the result lists every existing combination, sorted by the first field, then the second. Combinations that never occur in the data are not listed, which keeps the table short. The total row at the bottom sums or averages across all rows.
Checking the numbers
For important reports, cross-check one group by filtering the original file in a spreadsheet and summing it there. A matching result confirms that the right column and calculation were chosen.
Privacy
Sales figures and payroll data are summarized on your device and never uploaded.
Related tools
Combine monthly files first with Merge CSV Files or Combine Excel Sheets. Check data quality before summarizing with the CSV Data Profiler. For formulas and charts, open the result in the Online Spreadsheet.
Checked against the current version of the CSV Pivot Table on .

