
An Excel pivot table calculated field is a new column that the pivot table works out from other fields, such as profit from sales and cost. You build it inside the pivot table, so it updates when the data changes and you do not need an extra column in your source data. This guide shows the steps with made-up data, a few useful formulas, and the limits you should know.
When to use a calculated field
Use it when the result depends on totals of other fields. Common examples are profit (sales minus cost), a bonus (sales times a rate) or a price after tax. If you only need a per-row value, an extra column in the source table is often simpler.

Before you start: a small made-up data set
Imagine a table with the columns Region, Product, Sales and Cost. Turn it into a pivot table first. If you have not done that yet, follow our Excel pivot table tutorial.

How to add a calculated field in an Excel pivot table
- Click any cell inside the pivot table.
- Open the PivotTable Analyze tab (it may be called Options in older versions).
- Click Fields, Items and Sets, then choose Calculated Field.
- Type a name in the Name box, such as Profit.
- In the Formula box, clear the zero and build the formula by double-clicking field names, for example
= Sales - Cost. - Click Add, then OK.
The new field now appears in the field list. Drag it to the Values area like any other field.

Useful calculated field formulas
- Profit:
= Sales - Cost - Bonus at 5 percent of sales:
= Sales * 0.05 - Margin as a share of sales:
= (Sales - Cost) / Sales
Format the margin field as a percentage after you add it.
Edit or delete a calculated field
Go back to Fields, Items and Sets, then Calculated Field. Choose the name from the drop-down list, change the formula and click Modify, or click Delete to remove it.

Limits of calculated fields
- The formula works on the sum of each field, not on each row. This matters for margins and averages, so check one result by hand.
- You cannot use cell references or most worksheet functions in the formula. Field names and basic math are what it handles.
- The field is stored in that pivot table, not in the source data.
Excel pivot table calculated field: common questions
Why is my calculated field result wrong?
The formula uses the total of each field, so a ratio is the ratio of totals, not an average of row ratios. Check by hand on one group.
Is the option greyed out?
Calculated fields are not available for some data sources, such as the Data Model. Check Microsoft's help page for your version.
Does Google Sheets have calculated fields?
Yes. Pivot tables in Google Sheets have an Add button in the Values section with a Calculated field option.
Related guides on Sheets AI Hub
Use SUMIFS between two dates when you want a formula instead, and read Excel automation tips.
