---
schema_version: "1"
id: 9796583c57f97dd2df3f9ff6ddce5bee0b94308bd3ca0eba7ea97a21e86356d3
title: Numeric Operators and Functions for Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_batch_transform_numeric.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_batch_transform_numeric.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 135d5cfb28c8218f21600cab927f3768a97cc0455a11a827b3c31cee8c40bb9d
description: Use numeric functions to calculate values from measures. For example, you can round, truncate, and determine the absolute value of a number. The arguments for numeric functions can be numbers or measure fields.
products:
  - Data 360
release: "264"
---
# Numeric Operators and Functions for Formulas

Use numeric functions to calculate values from measures. For example, you can round, truncate, and determine the absolute value of a number. The arguments for numeric functions can be numbers or measure fields.

When entering a formula, use the API name of the field in the expression, not the label. The parameters section is surrounded by parentheses. For example, you can enter the following expression.

```
round(Total_Amount/Unit_Price, 2)
```

You can use the following math operators.

 
| Operator | Description |
| --- | --- |
| + | Calculates the sum of two values. |
| \- | Calculates the difference between two values. |
| \* | Multiplies the two values. |
| / | Divides the first value by the second. |
| () | Specifies that the expressions within the parentheses are evaluated first. All other expressions are evaluated using standard operator precedence. |

You can also use the following numeric functions in an expression.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:22.98850574712644%">
        <col style="width:32.41379310344827%">
        <col style="width:44.59770114942529%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d116901e121">Numeric Function</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d116901e124">Description</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d116901e127">Syntax</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>abs</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Calculates the absolute value of a number. The absolute value of a number is the number
            without its positive or negative sign.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>abs(<var>field</var>)</code></p>
            <p><var>field</var> is a number
              or measure field that you want to determine the absolute value of.</p>
            <p style="margin-bottom:0;">Example:
              <code>abs(Amount)</code>
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>ceil</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Rounds a number up to the nearest integer.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>ceil(<var>field</var>)</code></p>
            <p style="margin-bottom:0;"><var>field</var> is a number
              or measure field that you want to round up to the nearest integer.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>exp</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Returns a value for e raised to the power of a number you specify.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>exp(<var>field</var>)</code></p>
            <p style="margin-bottom:0;"><var>field</var> is a number
              or measure field to which you want to raise e.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>floor</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Returns a number rounded down to the nearest integer.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>floor(<var>field</var>)</code></p>
            <p style="margin-bottom:0;"><var>field</var> is a number
              or measure field that you want to round down to the nearest integer.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>format_number</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Formats a number by rounding to the specified number of decimal places or by applying a
            certain format, for example #,###,###.##.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>format_number(<var>expr</var>,<var>format</var>)</code></p>
            <p><var>expr</var>
              is a number or measure field that you want to change the format
              of.</p>
            <p><var>format</var> is the new format to be applied to the numbers in the
              field. The parameter can be in the format composed as '#,###,###.##' or actual numerals like
              ‘12,332.1235’. This parameter is optional. If you don’t specify a format, the field is
              truncated to an integer.</p>
            <p style="margin-bottom:0;">Example: <code>format_number(12332.123456,
         '###,###,###,###,###,###.###')</code> returns <code>12,332.123</code></p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>log</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Returns the logarithm of the number in the base that you specify.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>log(<var>value</var>,<var>field</var>)</code></p>
            <p><var>value</var>
              is a number or measure field used as the base of the
              logarithm.</p>
            <p style="margin-bottom:0;"><var>field</var> is a number or measure field that you want to
              take the logarithm of.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>power</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Raises a number to the power of another number.<var>value</var></td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>power(<var>field</var>,
         <var>value</var>)</code></p>
            <p><var>field</var> is a number or measure field
              that you want to raise to the specified power.</p>
            <p style="margin-bottom:0;"><var>value</var> is a number or
              measure field that is the power that you want to raise the specified number to.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>round</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Returns the nearest number to a number you specify, constraining the new number by a
            specified number of digits.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>round(<var>field</var>,<var>numberOfDigits</var>)</code></p>
            <p><var>field</var>
              is a number or measure field that you want to round.</p>
            <p style="margin-bottom:0;"><var>numberOfDigits</var>
              is a number or measure field that specifies the number of digits to round the specified
              number to.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>sqrt</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Returns the positive square root of a given number.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>sqrt(<var>field</var>)</code></p>
            <p style="margin-bottom:0;"><var>field</var> is a number
              or measure field that you want to find the square root of.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Numeric Function" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e121 "><code>truncNumber</code></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e124 ">Truncates the specified number of decimal values from the number, or converts to an
            integer.</td>

          <td data-label="Syntax" class="slds-cell-wrap" style="vertical-align:top;" headers="d116901e127 ">
            <p><code>truncNumber(<var>field</var>,<var>scale</var>)</code></p>
            <p><var>field</var>
              is a number or measure field that you want to truncate.</p>
            <p><var>scale</var> is
              the number of digits you want to the right of the decimal point. This parameter is required.
              If you don’t specify want any decimal values, use a <code>0</code>.</p>
            <p style="margin-bottom:0;">Example:
              <code>scale(13.111, 1)</code> returns <code>13.1</code>
            </p>
          </td>

        </tr>
      </tbody>
    </table>