How To Create A Pivot Table In Google Sheets (2026)
A pivot table in Google Sheets summarizes a long list of rows into a small table you can reorganize with a few clicks.
You choose which fields become rows, columns, values and filters in a side panel.
The steps below follow Google’s help pages for Sheets on a computer.
Quick answer: create a pivot table
| Step | What to do |
|---|---|
| 1 | Select the cells that hold your source data, including the header row. |
| 2 | Click Insert, then Pivot table. |
| 3 | Choose a new sheet or an existing sheet for the table, then click Create. |
| 4 | In the side panel, click Add next to Rows or Columns and pick a field. |
| 5 | Click Add next to Values and pick the field to summarize. |
Prepare the source data
Google’s one firm requirement is that each column needs a header.
Blank headers leave the pivot table without a field name to work with, so fill them in first.
It also helps to clear out repeated rows with the Remove duplicates tool in Google Sheets before you summarize.
Create the pivot table
- Open the spreadsheet and select the cells with your data.
- Click Insert, then Pivot table.
- Check the data range in the dialog.
- Choose whether to place the table on a new sheet or an existing one, and pick the location if it is an existing sheet.
- Click Create.
Google’s switching guide notes that the pivot table opens on a new sheet tab, with the Pivot table editor on the right.
If the pivot table sheet is not already open, click its tab.
Add rows, columns, values and filters
| Side panel section | What it does |
|---|---|
| Rows | Fields listed down the left side of the table. |
| Columns | Fields listed across the top of the table. |
| Values | The numbers shown in the body of the table. |
| Filters | Limits which items the table includes. |
Click Add next to a section and choose a field, which is one of your column headers.
To change how a field is listed, sorted, summarized or filtered, click the down arrow next to it.
Use or turn off suggested pivot tables
When you click Add next to Rows or Columns, Google may show choices under Suggested.
Picking one adds that pivot table for you.
Google says high-confidence suggestions are inserted automatically when the pivot table is created.
To turn suggestions off, click Tools, then Suggestion controls, and turn off Enable Pivot table suggestions.
Edit an existing pivot table
- Open the spreadsheet and click the pop-up Edit button under the pivot table.
- Use the side panel to make the change.
| To do this | Do this |
|---|---|
| Move a field | Drag it to another category. |
| Remove a field | Click Remove. |
| Change the source range | Click Select data range. |
| Clear all fields | Click Clear all. |
The pivot table refreshes whenever you change the source cells it draws from.
Sort the rows or columns
- Click the pop-up Edit button under the pivot table.
- Under Rows or Columns, click the arrow under Order or Sort by.
Filter a pivot table
- Click the pop-up Edit button under the pivot table.
- Next to Filters, click Add and choose a field.
- Next to Showing all items, click the down arrow.
- Choose Filter by condition or Filter by values.
A condition can be one you write yourself or one you pick, such as is not empty, less than, or text containing a phrase.
With Filter by values, you uncheck the items to hide and then click OK.
Google warns that filters by value must be updated if the source data changes.
Group items
| Grouping type | How |
|---|---|
| Manual group | Right-click the cells, click Create pivot group, then select the cells to group. |
| Group by rule | Right-click a cell and click Create pivot group rule. For numbers, choose an interval size, then click OK. |
| Group by date or time | Right-click a date-formatted cell, click Create pivot date group, then choose a period. |
| Ungroup | Right-click a grouped item and click Ungroup pivot items. |
Show totals and change how values display
To show the totals of a row or column, check Show totals.
To change how a value is displayed, click the Edit button, go to Values, and click Default under Show as.
Then choose an option from the menu.
Add a calculated field
- Click the pop-up Edit button under the pivot table.
- Next to Values, click Add, then choose Calculated field.
- Give the field a name and enter a formula, or pick a function from the Functions tab.
- Under the input box, set Summarize by to Custom.
- Click Add in the bottom-right corner.
Google’s example formula is =sum(Price)/counta(Product).
Wrap any field value that contains spaces in quotation marks.
A green checkmark in the input box means the syntax is valid, and a red exclamation mark means it is not.
See the rows behind a number
Click the Edit button, then double-click the cell you want to examine.
A new sheet opens that lists the source data rows behind that cell.
Pull a pivot table value into a formula
The GETPIVOTDATA function returns an aggregated value from a pivot table, based on the row and column headings you specify.
Its syntax is GETPIVOTDATA(value_name, any_pivot_table_cell, [original_column, ...], [pivot_item, ...]).
| Argument | What to enter |
|---|---|
| value_name | The pivot table value to retrieve, in quotes or as a cell reference, such as “SUM of Sales” when there are several value fields. |
| any_pivot_table_cell | A reference to any cell in the pivot table, with the top corner recommended. |
| original_column | Optional. The field name from the source data, not the pivot table. |
| pivot_item | Optional. The row or column item, as shown in the pivot table, that matches the preceding original column. |
Google’s example GETPIVOTDATA("AVERAGE of price per unit", A1, "division", "east") gets an average filtered to one division.
If a field has a custom heading in the pivot table, use that heading instead of the source column name.
If the pivot table shrinks and the cell you referenced disappears, the function returns an error, which is why the top corner cell is the safest choice.
Pivot tables on phones
Google’s help page for the Android app does not give pivot table steps and points you to sheets.google.com on a computer.
Related guides and sources
If your data lives in an Excel file, see how to convert Excel to Google Sheets and back.
Excel users can compare the steps in our guide to creating a pivot table in Excel.
To chart your results, see how to make a chart in Google Sheets.
Google’s pages used here are Create and use pivot tables, Customize a pivot table and Switch from Excel to Sheets.