Pivot Tables

What Is a Pivot Table in Excel

A pivot table summarizes a list of rows into totals, counts and averages you can rearrange. Learn its four areas and when to use one in Excel.

On this page
  1. The four areas
  2. What the values can calculate
  3. What the source data needs
  4. Pivot tables and formulas
  5. Common uses
  6. Pivot tables in Google Sheets

A pivot table is a summary that Excel builds from a list of data. You pick the column to group by, the column to spread across the top, and what to calculate. Excel then groups and adds up the matching rows for you. The original data doesn’t change.

Say you have a list of sales with a date, a region, a product and an amount. A pivot table can show the total sales for each region in a few clicks. Rearrange the layout and the same list can show totals by month, by product, or by region and month together.

To build one step by step, see how to make a pivot table in excel. The rest of this page explains the ideas behind it.

The four areas

You build a pivot table by dragging fields, which are the column headings from your data, into four areas:

  • Rows lists the items of one field down the side, such as each region.
  • Columns spreads one field across the top, such as each month.
  • Values holds the calculation, such as the sum of the amount column.
  • Filters limits the whole report to certain items, such as one salesperson.

The same field can appear more than once. For example, you might show both the sum and the count of the amount column.

What the values can calculate

Sum is the most common calculation. Excel also offers Count, Average, Max and Min, among others. When a column holds only numbers, Excel uses Sum by default. If the column contains text or blank cells, Excel uses Count instead. That default is a common reason totals look wrong. The fix is covered in pivot table count instead of sum.

What the source data needs

A pivot table reads a range of cells, and that range works best when it:

  • has one header row, with a unique name for each column
  • has no blank rows or columns inside it
  • holds one kind of value in each column, such as all dates or all numbers

Excel reads the range when you create the pivot table. Rows added below it later won’t appear until you refresh the pivot table or update its source, which is covered in why is my pivot table not updating.

Pivot tables and formulas

A pivot table is quick for exploring a list and building a summary report. A formula is better when one value must sit in a specific cell, such as a total that feeds another calculation. For a single total, see how to sum and count in excel. Both approaches can give the same answer. A pivot table just summarizes the whole list without needing a formula for each group.

Common uses

Pivot tables suit questions that ask how much or how many for each group: sales by region, expenses by category, orders by status, or hours by employee. They also make a good first look at a new list, before you decide what else to calculate.

Pivot tables in Google Sheets

Google Sheets has pivot tables too. You create one from the Insert menu, then Pivot table, and set up rows, columns, values and filters in a side panel, much as you do in Excel. Menu names differ between the two programs, so check the labels in yours. For putting the rows in a set order, see sort pivot table in google sheets.

Keep exploring

Guides from other topics

All topics →