Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

Excel Pivot Table Calculated Field: Step by Step with Formulas

Excel pivot table calculated field step by step
Illustration: Excel pivot table calculated field

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.

Pivot table source data with region, product, sales and cost columns
Made-up data for the example (illustration).

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 in 6 steps
The six steps (illustration; menu names can differ by version).

How to add a calculated field in an Excel pivot table

  1. Click any cell inside the pivot table.
  2. Open the PivotTable Analyze tab (it may be called Options in older versions).
  3. Click Fields, Items and Sets, then choose Calculated Field.
  4. Type a name in the Name box, such as Profit.
  5. In the Formula box, clear the zero and build the formula by double-clicking field names, for example = Sales - Cost.
  6. Click Add, then OK.

The new field now appears in the field list. Drag it to the Values area like any other field.

Pivot table calculated field formulas for profit, bonus and margin
Three useful formulas (illustration).

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.

Pivot table calculated field limits: formulas use the sum of each field
What to watch for (illustration).

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.

العربية