We’re improving Formula Genius. We’re redesigning the app and fixing issues along the way. Sorry for any disruption, and thank you for your patience.
Excel intermediate

Pivot Table Calculated Fields in Excel

Add custom calculations like profit margins, unit economics, and derived metrics directly inside your Pivot Table.

Formula Genius can generate a draft from a plain-English prompt. Supported formulas can be checked with sample cases; review the coverage on the result.

The formula

Prompt

"Add a Revenue Per Unit calculated field to a Pivot Table"

Excel
= Revenue / Units

A calculated field creates a new column in your Pivot Table using existing fields. Revenue / Units gives you the average revenue per unit, calculated at the aggregation level of your Pivot Table layout.

Step-by-step breakdown

  1. Go to PivotTable Analyze > Fields, Items & Sets > Calculated Field
  2. Name the field (e.g., "Revenue Per Unit")
  3. Formula references existing field names, not cell references
  4. The calculation applies at whatever grouping level your Pivot Table uses
  5. The result appears as a new Value field in the Pivot Table

Edge cases & warnings

  • Calculated fields operate on sums, not individual rows — this can produce different results than row-level calculations
  • Division by zero when a group has 0 units — no built-in error handling in calculated fields
  • You can't use worksheet functions like IF or VLOOKUP in calculated fields
  • For row-level calculations, add the formula to your source data instead

Examples

Prompt

"Revenue=10000, Units=500 (Region: East)"

Excel
Revenue Per Unit = $20.00
Prompt

"Revenue=25000, Units=1000 (Region: West)"

Excel
Revenue Per Unit = $25.00

Frequently asked questions

Why is my calculated field giving wrong averages?

Calculated fields divide the SUM of revenue by the SUM of units, not the average of individual ratios. This is correct for weighted averages but may differ from simple averages. For row-level calculations, compute in the source data.

Can I use IF in a calculated field?

No, but you can use algebraic equivalents. For example, instead of IF(Units>0, Revenue/Units, 0), add the condition as a column in your source data.

Can't find what you need?

Describe a formula in plain English. Formula Genius drafts and explains it, and can check supported formulas on sample cases.