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

StepWhat to do
1Select the cells that hold your source data, including the header row.
2Click Insert, then Pivot table.
3Choose a new sheet or an existing sheet for the table, then click Create.
4In the side panel, click Add next to Rows or Columns and pick a field.
5Click 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

  1. Open the spreadsheet and select the cells with your data.
  2. Click Insert, then Pivot table.
  3. Check the data range in the dialog.
  4. Choose whether to place the table on a new sheet or an existing one, and pick the location if it is an existing sheet.
  5. 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 sectionWhat it does
RowsFields listed down the left side of the table.
ColumnsFields listed across the top of the table.
ValuesThe numbers shown in the body of the table.
FiltersLimits 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

  1. Open the spreadsheet and click the pop-up Edit button under the pivot table.
  2. Use the side panel to make the change.
To do thisDo this
Move a fieldDrag it to another category.
Remove a fieldClick Remove.
Change the source rangeClick Select data range.
Clear all fieldsClick Clear all.

The pivot table refreshes whenever you change the source cells it draws from.

Sort the rows or columns

  1. Click the pop-up Edit button under the pivot table.
  2. Under Rows or Columns, click the arrow under Order or Sort by.

Filter a pivot table

  1. Click the pop-up Edit button under the pivot table.
  2. Next to Filters, click Add and choose a field.
  3. Next to Showing all items, click the down arrow.
  4. 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 typeHow
Manual groupRight-click the cells, click Create pivot group, then select the cells to group.
Group by ruleRight-click a cell and click Create pivot group rule. For numbers, choose an interval size, then click OK.
Group by date or timeRight-click a date-formatted cell, click Create pivot date group, then choose a period.
UngroupRight-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

  1. Click the pop-up Edit button under the pivot table.
  2. Next to Values, click Add, then choose Calculated field.
  3. Give the field a name and enter a formula, or pick a function from the Functions tab.
  4. Under the input box, set Summarize by to Custom.
  5. 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, ...]).

ArgumentWhat to enter
value_nameThe 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_cellA reference to any cell in the pivot table, with the top corner recommended.
original_columnOptional. The field name from the source data, not the pivot table.
pivot_itemOptional. 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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *