Pivot Tables: Summaries in Seconds
Build pivot tables that group and total thousands of rows by region, product or month, add filters and percentages, and refresh them as data grows.
Welcome back!
Step 1 of 10Learn
Two thousand rows, one question
A food truck owner logs every sale in a sheet: Date, Location, Item, Quantity, Amount. After a season she has 2,000 rows and one big question: which location earns the most, and what sells best at each one?
She could write SUMIFS formulas for every combination of location and item. Or she could build a pivot table, a tool that groups and summarizes data with a few clicks and no formulas.
To create one, click any cell in the data and choose Insert > Pivot table. Confirm the data range, choose New sheet, and click Create. A blank pivot table appears with an editor on the right offering four areas:
- Rows: the categories listed down the side, such as Location.
- Columns: categories across the top, such as Item.
- Values: the numbers to summarize, such as SUM of Amount.
- Filters: limits on which data is included, such as only the summer months.
Add Location to Rows and Amount to Values, and in two seconds the owner sees total sales for each location with a grand total at the bottom. Add Item to Columns and the table becomes a grid: sales of each item at each location.
Nothing in the original data changes. A pivot table is a summary built on top of your data, which you can rearrange freely until it answers your question. Your source data needs the tidy structure from earlier lessons: one header row, one record per row and no blank rows or merged cells.
Step 2 of 10Practice · Sort into groups
To answer "What were total sales for each product in each region in 2026?", where should each field go in the pivot table editor?
Tap an item, then tap its group (or drag it there).
Step 3 of 10Learn
Summarize by more than SUM
By default, numbers in the Values area are summed, but you can change Summarize by to:
- COUNTA or COUNT: how many sales, orders or records.
- AVERAGE: the average order size or average rating.
- MAX or MIN: the largest or smallest single value.
- COUNTUNIQUE: how many different customers, for example.
You can add the same field to Values twice, once summed and once averaged, to see total revenue next to average order size.
Under Show as, Sheets can turn numbers into percentages: % of grand total, % of row or % of column. That answers questions like "what share of all sales did each location bring in?" without any division formulas.
For dates, right-click a date in the pivot table and choose Create pivot date group to group by month, quarter, year or day of the week. Suddenly 2,000 daily sales collapse into 6 monthly totals, or into a weekday pattern that shows Fridays are busiest.
You can also sort rows by a value (in the Rows section, choose Sort by: SUM of Amount, descending), so the best performers rise to the top, and drag fields between areas to look at the data from a different angle. That freedom to "pivot" the view is where the name comes from.
Step 4 of 10Flashcards
Summarize by and Show as
Tap a card to flip it.
Step 5 of 10Practice · Choose one
Your pivot table lists each sales rep and SUM of Amount. Your manager asks, "How many deals did each rep close?" What should you change?
Step 6 of 10Learn
Keeping pivot tables current
Pivot tables in Google Sheets update automatically when the source data inside their range changes. The trap is new rows outside the range. If the pivot table was built on A1:E2000 and you add row 2001, it isn't included.
Three ways to avoid stale totals:
- Use open-ended ranges when creating the pivot table, such as A1:E instead of A1:E2000. New rows are then included automatically. Blank rows below the data appear as a "(blank)" group, which you can remove with a filter.
- Edit the range later by clicking the range box at the top of the pivot table editor.
- Convert your data to a table (Format > Convert to table), which grows as you add rows.
A few more tips:
- Don't type inside a pivot table. It rebuilds itself, so manual edits are lost or cause errors. Put notes and extra calculations beside it or on another tab.
- Use Filters to focus: a filter on Year set to 2026, or on Status set to Paid, keeps the summary honest.
- Click Suggested at the top of the pivot editor to see automatic pivot ideas Sheets thinks might be useful, a quick way to explore new data.
- To see the rows behind a number, double-click a value cell. Sheets creates a new tab listing exactly the records that make up that total, which is excellent for checking surprising numbers.
Step 7 of 10Note
Step 8 of 10Practice · Work it out
A pivot table shows sales by location: Downtown $18,000, Park $12,000, Stadium $30,000. If you set Show as to "% of grand total," what percentage appears for Downtown?
Step 9 of 10Practice · True or false
If a pivot table was created on the range A1:E500 and you add data in row 501, the pivot table includes it automatically.
Step 10 of 10Practice · What would you do?
What would you do?
A pivot table says the Park location sold $4,200 of tacos in July, which seems far too high. How do you check it quickly?
Lesson complete!