To add a calculated field in a pivot table, click on the pivot table to activate the PivotTable Fields pane. Click on the dropdown arrow next to the field you want to use in the formula and select 'Field Settings'. Click on the 'Options' tab. Click on the 'Fields, Items, & Sets' button and select 'Calculated Field'. In the 'Name' field, type the name of the calculated field. In the 'Formula' field, enter your formula using the available fields and operators. Click 'OK' to close the dialog box.