What Is a Pivot Table? How It Works & When to Use One

Charts & pivot tables · Updated November 22, 2026

A pivot table is a data summarization tool in spreadsheet programs like Microsoft Excel and Google Sheets that lets you rearrange, group, and aggregate large datasets into a compact, readable summary without altering the original data. In essence, it takes a flat list of rows and columns and lets you drag fields into different areas to instantly count, sum, average, or otherwise analyze them from new angles.

Background: Where Pivot Tables Came From

The concept of pivot tables dates back to the 1960s, when early database and spreadsheet developers sought ways to let users cross-tabulate data without writing complex queries. The term “pivot” was popularized by Lotus Development in the 1980s with its Lotus 1-2-3 spreadsheet, which included a feature called “Data Pivot.” Microsoft Excel adopted a similar tool in the early 1990s, and it has been a core feature ever since. Today, pivot tables exist in Excel, Google Sheets, LibreOffice Calc, Apple Numbers, and many business intelligence tools like Tableau and Power BI, all sharing the same fundamental idea: interactive, drag-and-drop summarization.

How a Pivot Table Works: The Four Main Areas

A pivot table is built by assigning fields (column headers from your raw data) to one of four areas in the pivot table layout. Understanding these areas is the key to using any pivot table:

  • Rows – Fields placed here become the row labels. Each unique value appears as a separate row. For example, placing “Region” in Rows lists all regions vertically.
  • Columns – Fields placed here become column headers, creating a cross-tabulation. For instance, placing “Year” in Columns shows each year as a separate column.
  • Values – This is where the numerical or text fields go that you want to summarize. Common aggregations are Sum, Count, Average, Min, Max, and more. For example, placing “Sales” in Values with Sum shows total sales per row/column combination.
  • Filters – Fields placed here act as global filters for the entire pivot table, letting you show only specific subsets (e.g., a filter for “Product Category” that you can set to “Electronics”).

When you drag a field into one of these areas, the pivot table instantly recalculates. The underlying data remains untouched; the pivot table is just a dynamic view.

Concrete Example: Sales Data by Region and Quarter

Suppose you have a spreadsheet with columns: Date, Region, Product, and Sales Amount. The raw data has hundreds of rows. To see total sales per region per quarter, you would:

  1. Select any cell in your data range (e.g., A1:D500).
  2. Insert a pivot table (Excel: Insert > PivotTable; Google Sheets: Insert > Pivot table).
  3. Drag “Region” to the Rows area.
  4. Drag “Date” to the Columns area, then group it by quarter (right-click a date in the pivot and choose “Group” in Excel, or use the “Group by” option in Google Sheets).
  5. Drag “Sales Amount” to the Values area, and ensure it is set to “Sum.”

The result is a compact table with regions as rows, quarters as columns, and total sales in each cell. If you want to change the analysis to average sales instead of total, you just change the value field setting from Sum to Average—no formulas needed.

How to Choose the Right Aggregation and Layout

Selecting the correct summary function is critical. If your field contains text, the default is usually “Count.” For numbers, the default is “Sum,” but that may not be what you need. For example, if you have a list of employee salaries and you want the average salary per department, you must change the Value Field Settings to “Average.”

Layout options also affect readability. In Excel, you can switch between Compact, Outline, and Tabular forms. Compact form saves space, while Tabular form shows each field in its own column, which is easier to copy or use as a data source for charts. In Google Sheets, the layout is always tabular, but you can reorder fields and use “Show as” options to display percentages or running totals.

Common Problems and How to Solve Them

Several frequent issues trip up new users:

  • Blank or “(blank)” entries – These appear when your source data has empty cells in a field. Fix by filling in missing values or filtering them out.
  • Count instead of Sum – This happens when the value field contains text or blank cells. Ensure all cells in that column are numeric.
  • Field names not updating – If you add new rows to your source data, the pivot table won’t automatically include them unless you use a formatted Excel Table (Ctrl+T) or update the range manually. In Excel, right-click the pivot and choose “Refresh.” In Google Sheets, the pivot automatically updates if the source range is open-ended.
  • Pivot table not refreshing – Pivot tables are not live; they require a manual refresh (Excel: Data > Refresh All; Google Sheets: the pivot updates automatically, but you may need to wait a moment).

Pivot Tables vs. Formulas vs. Power Query

Pivot tables are often compared to other data analysis methods. Here’s a quick breakdown:

  • Pivot tables vs. SUMIF/COUNTIF formulas – Formulas give you more control over individual cell results and can be used in any layout, but they require writing and copying formulas for each summary. Pivot tables are faster to build and easier to change, but they are interactive views, not static formulas.
  • Pivot tables vs. Power Query – Power Query is a data transformation tool that cleans and reshapes data before it reaches a pivot table. It doesn’t summarize; it prepares. You often use both: Power Query to clean, then a pivot table to summarize.
  • Pivot tables vs. charts – Pivot tables are for numbers; pivot charts are the visual representation. You can create a chart directly from a pivot table, and the chart updates when the pivot changes.

Safety and Data Accuracy Tips

Pivot tables are safe to use because they never modify your original data. However, there are accuracy pitfalls to avoid:

  • Always check that your source data has no hidden rows or columns, as these can be excluded from the pivot range.
  • Ensure your value field is truly numeric. A column with mixed numbers and text will default to Count, which can mislead.
  • Be careful with “Show Values As” options like “% of Grand Total” – they change the displayed number but not the underlying value. Always double-check what the number represents.
  • If you share a workbook, remember that pivot tables store a cache of the data. If you have sensitive data, consider removing the source sheet or using a separate workbook.

Frequently Asked Questions

Can I create a pivot table in Google Sheets?

Yes. Google Sheets has a pivot table feature under Insert > Pivot table. The interface is slightly different from Excel, but the core concepts are identical. You choose a data range, then use the side panel to add rows, columns, values, and filters. One key difference: Google Sheets automatically updates the pivot when you add new rows to the source range, whereas Excel requires you to refresh.

Why does my pivot table show “Count of” instead of “Sum of”?

This happens when the field you placed in Values contains text or blank cells. Pivot tables default to Count for non-numeric data. To fix it, ensure all cells in that column are numbers (no text like “N/A”) and have no empty cells. Then right-click the value field, choose “Value Field Settings,” and select “Sum.”

How do I update a pivot table when I add new data?

In Excel, if your source data is a normal range, you must right-click the pivot table and choose “Refresh,” or change the source range in PivotTable Analyze > Change Data Source. To make it automatic, convert your data to an Excel Table (Ctrl+T) before creating the pivot; then new rows are included when you refresh. In Google Sheets, the pivot updates automatically, but you may need to wait a few seconds.

Can I use a pivot table to show percentages?

Yes. In Excel, right-click a value in the pivot table, choose “Show Values As,” and select options like “% of Grand Total,” “% of Column Total,” or “% of Parent Row Total.” In Google Sheets, use the “Show as” dropdown in the value field settings. These options display the value as a percentage without changing your original data.

What is the difference between a pivot table and a regular table?

A regular table is just a structured range of data with formatting and filtering. A pivot table is a separate summary object that aggregates data from a table or range. You can create a pivot table from a regular table, but the pivot itself is not a data entry area—it’s an analysis tool.

Is it possible to sort a pivot table?

Yes. You can sort by row or column labels alphabetically, or by values in ascending or descending order. In Excel, click the drop-down arrow on a row or column label, or right-click a value and choose “Sort.” In Google Sheets, use the sort icons in the pivot editor or right-click a cell and choose “Sort.”

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.