Field calculations allow you to set the values of a field using an expression. Expressions can be simple or complex, ranging from single values to mathematical calculations and multiline scripts. Field calculations provide a way to batch update many records in a table at once. They honor selections, highlights, or filters on layer attribute tables and stand-alone tables.
Two ways to access field calculations
You can perform field calculations directly in a table view from the Calculate Field toolbar or you can use the Calculate Field geoprocessing tool.
On the table view, click the Calculate button
on the table toolbar to open the Calculate Field toolbar.

With an editable table open, on the Table ribbon tab, in the Tools group, click Calculate Field Toolbar
to open the toolbar inside the table view, or click Calculate Field
to open the Calculate Field geoprocessing tool.
Note:
These commands are unavailable under the following conditions:
- The field is managed by ArcGIS Pro, so it cannot be edited manually. You cannot calculate field values for the ObjectID (OID or FID) field or the Shape_Length and Shape_Area fields for a geodatabase feature class.
- The table's data source is read-only, write access can't be established to the folder or geodatabase, or the data source is in a format that can't normally be modified.
- The field belongs to a table that has been joined to your table. You can calculate values for fields in the origin table only.
- The field is a raster, BLOB, or Global ID type, which cannot be calculated.
- Editing the dataset is disabled.
Perform field calculations
With a table open, you can use the Calculate Field toolbar or the Calculate Field geoprocessing tool to perform field calculations.
Use the Calculate Field toolbar
Complete the following steps to make calculations using the Calculate Field toolbar:
- On the toolbar, use the Target Field drop-down menu to choose a field from the table to update with a calculation.
- In the Expression text box, type a valid expression or add fields to the expression using the Add fields to expression button
. - On the Language drop-down menu, choose Python, ArcGIS Arcade, or SQL as the language of the expression.
- Optionally, click the Recent Expression button
to insert an expression in the expression text box. - Optionally, click the Expression Builder button
to open a dialog box with a list of fields and helper functions to build more complex expressions. After you build an expression, click OK to insert it back into the Expression text box. - Click the Calculate button
to run the Calculate Field tool.Alternatively, use Ctrl+Shift+Enter to run the tool.
Open the Calculate button
drop-down menu to disable Enable Undo.Table selections, highlights, or filters are indicated on the Calculate button
. Alternatively, click Calculate All in the drop-down menu to run the Calculate Field tool using all records without losing your selection, highlight, or filter.Calculations run in the toolbar are run as a geoprocessing tool and are saved in the project’s geoprocessing history.
- If Enable Undo is enabled when you click Calculate
, you must save or discard your changes using the options on the Edit tab. On the Quick Access Toolbar, you can undo and redo your calculation.
Use the Calculate Field tool
Complete the following steps to make a calculation using the Calculate Field geoprocessing tool:
- On the Calculate Field tool, specify the Field Name (Existing or New) parameter with the field to be updated.
If the specified field name does not exist in the input table, it will be added.
- If a new field name is specified, use the Field Type parameter to specify the type of the new field.
- Use the Expression Type parameter used to specify the expression, which can include Python, ArcGIS Arcade, SQL, or VBScript (Deprecated).
- In the Expression parameter, type or use the Expression control to build an expression.
Calculations built in Python or VBScript support a Code Block parameter, which will run the specified code before calculations are made on selected fields.
- Click OK to run the Calculate Field tool and dismiss the tool dialog box. Alternatively, click Apply to run the Calculate Field tool and keep the tool dialog box open.
Usage tips
When you're making calculations, keep in mind the following best practices:
- Use quotation marks when calculating strings in Python, and single quotation marks when calculating strings in SQL.
- Fields that have visibility turned off for the layer or table are not available for field calculation. Field visibility is set in the Fields view of a layer.
- Learn more about calculating expressions in Python, ArcGIS Arcade, SQL, and VBScript.