What a pivot table does and when to use one
A pivot table is a tool in Excel that reorganizes and summarizes data from a larger dataset without changing the original information. Instead of manually counting, filtering, or adding formulas, you tell Excel which columns to use as row labels, column headers, and values to calculate, and it builds a summary table instantly.
Use a pivot table when you have a dataset with hundreds or thousands of rows and you need to see totals by category, compare groups, or spot patterns. For example, if you have a sales list with customer names, regions, and purchase amounts, a pivot table can show you total sales by region in seconds. The original data stays untouched — the pivot table is a separate summary that updates if you change the source data.
Key Takeaways
- Your data must have headers in the first row, with each column representing one type of information, before you can create a pivot table.
- Select any cell in your data range, then go to the Insert tab and click Pivot Table to start — Excel will detect the full range automatically.
- Drag fields from the field list into the Rows, Columns, and Values areas to control what the pivot table shows and how it calculates.
- The pivot table appears on a new sheet by default, and you can refresh it if the source data changes.
Preparing your data before creating a pivot table
Pivot tables work best when your data is organized in a simple, consistent format. Each column should have a header in the first row — for example, "Date", "Region", "Product", "Sales Amount". Every row below should contain one record with values in each column. Do not leave blank rows or columns in the middle of your data, and do not mix different types of information in a single column.
If your data has extra spaces, inconsistent spelling, or blank cells scattered throughout, clean those up first. A pivot table will treat "North" and "north" as different categories, and blank cells may create an unexpected "empty" group. You do not need to sort the data — the pivot table will handle that — but the data must be rectangular, with no gaps.
Selecting your data and opening the pivot table dialog
Click any single cell anywhere inside your data range. You do not need to select the entire range; Excel will detect it automatically. Then go to the Insert tab at the top of the ribbon and look for the Pivot Table button. In Excel for Windows, it is usually on the left side of the Insert tab. In Excel for Mac, it may be labeled Pivot Table or PivotTable depending on your version.
Click the Pivot Table button. A dialog box will appear asking you to confirm the data range. The range should show all your data including headers — for example, "Sheet1!$A$1:$D$500". If the range is wrong, you can correct it here. Below that, you will see an option to place the pivot table on a new sheet or an existing sheet. The default is a new sheet, which is usually the clearest choice. Click OK or Create to proceed.
Dragging fields to build your pivot table layout
After you click OK, a new sheet opens with a blank pivot table area on the left and a Pivot Table Fields panel on the right. The panel shows a list of all the column headers from your data. Below that are four drop zones labeled Filters, Columns, Rows, and Values.
Drag a field name from the list into the Rows area to make that field appear as row labels down the left side of the pivot table. Drag a field into the Columns area to make it appear as column headers across the top. Drag a field into the Values area to calculate a number — by default, Excel sums numeric fields and counts text fields. For example, if you drag "Region" to Rows and "Sales Amount" to Values, the pivot table will show each region with its total sales.
You can drag multiple fields into each area. If you put both "Region" and "Product" in Rows, the pivot table will show regions with products nested underneath. If you put "Month" in Columns and "Region" in Rows, you will see regions down the side and months across the top, with sales amounts filling the grid. Experiment by dragging fields around — the pivot table updates instantly, and you can undo any change.
Changing how values are calculated
By default, Excel sums numeric values in the Values area. If you want a different calculation — such as average, count, minimum, or maximum — double-click the field name in the Values area. A dialog box opens with a list of calculation options. Select the one you need and click OK.
You can also have multiple calculations for the same field. For example, you might want to see both the total sales and the average sale per region. Drag the same field into the Values area twice, then change one copy to Sum and the other to Average. Excel will label them automatically so you can tell them apart.
Filtering and sorting your pivot table
Once your pivot table is built, you can filter it to show only certain rows or columns. Click the small dropdown arrow next to a row or column label in the pivot table itself. A menu appears with checkboxes for each value. Uncheck the ones you want to hide. This does not delete data — it just hides those rows or columns temporarily.
To sort, click any value in the row or column you want to sort by, then use the Data tab at the top and choose Sort A to Z or Sort Z to A. The entire pivot table will reorder based on that column. You can also drag fields around in the Pivot Table Fields panel to change the order they appear in the pivot table.
Refreshing the pivot table when source data changes
If you go back to the original data sheet and add new rows or change existing values, the pivot table does not update automatically. To refresh it, click anywhere inside the pivot table, then go to the PivotTable Analyze tab (or Pivot Table tab on Mac) and click Refresh. The pivot table will recalculate using the updated data.
If you add a completely new column to your source data, the pivot table will not see it until you rebuild the pivot table or manually add the new field to the data range in the pivot table settings. For most changes to existing rows and columns, a simple refresh is enough.
Frequently Asked Questions
Can I create a pivot table from data on multiple sheets?
No, a pivot table can only use data from a single sheet. If your data is split across multiple sheets, copy it all into one sheet first, then create the pivot table. Make sure all the data has the same column headers.
What if my pivot table shows "Count" instead of "Sum" for my numbers?
This usually means Excel is treating your numbers as text instead of actual numbers. Go back to the source data and check that the column has no extra spaces, apostrophes, or text mixed in. You can also double-click the field in the Values area and manually change it from Count to Sum.
Can I move a pivot table to a different location?
You can copy and paste a pivot table to another sheet, but it becomes a static copy that will not refresh. The best approach is to create a new pivot table on the sheet where you want it. If you want to move the original, cut and paste the entire sheet instead.
How do I remove a field from the pivot table?
Drag the field name out of its drop zone in the Pivot Table Fields panel, or right-click the field and select Remove Field. The pivot table updates instantly. You can always drag it back in if you change your mind.
What is the difference between a pivot table and just using filters?
Filters hide rows you do not want to see, but a pivot table reorganizes and summarizes data into a new structure. A pivot table is faster for comparing totals across groups and requires no formulas. Use filters when you want to see specific rows from the original data; use a pivot table when you want to see calculations grouped by category.