# Calculating Fields in Tables

Fields in a table can be calculated using operators or the SUM function. This page explains the following two calculation methods.

## Calculate fields in a table by row

You can automatically calculate fields in a table by row.

### Example of calculating numeric values in a table by row

The following example shows a formula that automatically calculates a total price by multiplying the "Quantity" and "Unit Price" fields in a table.

Place a "Calculated" field or a "Text" field inside the table and specify the following formula.

`Quantity\*Unit_Price`

The "Total" field in which this formula is set displays the total price, which is calculated by multiplying the values of the "Quantity" and "Unit Price" fields.

### Example of calculating time values in a table by row

The following example shows a formula that uses the "Start" and "End" fields in a table to automatically display the time taken to respond to an inquiry.

Place a "Calculated" field inside the table, specify the following formula in it, and set the calculation result to display a time.

`End-Start`

The "Service Time" field in which this formula is set displays the time that results from subtracting the "Start" field value from the "End" field value.

## Sum the numeric or time values in a table

You can sum the values of the fields in a table.

### Example of summing the numeric values in a table

The following example shows a formula that automatically sums the "Subtotal" fields in a table.

Place a "Calculated" field or a "Text" field outside the table and specify the following formula.

`SUM(Subtotal)`

The "Total" field in which this formula is set displays the sum of the values in the "Subtotal" fields.

### Example of summing the time values in a table

The following example shows a formula that automatically sums the values in the "Service Time" fields in a table.

Place a "Calculated" field outside the table, specify the following formula in it, and set the calculation result to display a time.

`SUM(Service_Time)`

The "Total Service Time" field in which this formula is set displays the sum of the "Service Time" field values.