---
schema_version: "1"
id: 698c94a3d1bbb8d6594123cd51328407fc2eb7c56b4d3d9976278494d8c42f57
title: "Formulas: How Do I ... ?"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/how_do_i.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.how_do_i.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9235ad9157ecb54b56e391d70559d080fbfdeadfdb61a0e1aaa34580cf843566
description: A collection of topics around formulas, including common math calculation, text functions, and more.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Formulas: How Do I ... ?

A collection of topics around formulas, including common math calculation, text functions, and more.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
      <colgroup>
        <col>
      </colgroup>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" style="vertical-align:top;">
            <p>Available in: <strong>All</strong> Editions</p>
            <p style="margin-bottom:0;">Some How Do I's are not relevant to
              <strong>Database.com</strong>
            </p>
          </td>

        </tr>
      </tbody>
    </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
      <colgroup>
        <col style="width:50%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d128996e65">User Permissions
            Needed</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d128996e65 ">To view formula field details:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d128996e65 ">View Setup and Configuration</td>

        </tr>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d128996e65 ">To create, change, or delete formula fields:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d128996e65 ">Customize Application</td>

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

## Common Math Calculations

- [Add numbers?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_add.htm&release=264.0.0&type=5 "Calculates the sum of two values.")
- [Convert text into a number](https://help.salesforce.com/s/articleView?id=platform.customize_functions_value.htm&release=264.0.0&type=5 "Converts a text string to a number.")
- [Divide numbers?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_divide.htm&release=264.0.0&type=5 "Divides its values.")
- [Multiply numbers?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_multiply.htm&release=264.0.0&type=5 "Multiplies its values.")
- [Round numbers?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_round.htm&release=264.0.0&type=5 "Returns the nearest number to a number you specify, constraining the new number by a specified number of digits.")
- [Subtract numbers?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_subtract.htm&release=264.0.0&type=5 "Calculates the difference of two values.")

## Common Text Functions

- [Check if a field contains specified text?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_contains.htm&release=264.0.0&type=5 "Compares two arguments of text and returns TRUE if the first argument contains the second argument. If not, returns FALSE.")
- [Check if a picklist contains a specified value?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_ispickval.htm&release=264.0.0&type=5 "Determines if the value of a picklist field is equal to a text literal you specify.")
- [Combine first and last names?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_and_concatenate.htm&release=264.0.0&type=5 "Connects two or more strings.")
- [Convert numbers into text?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_text.htm&release=264.0.0&type=5 "Converts a percent, number, date, date/time, or currency type field into text anywhere formulas are used. Also, converts picklist values to text in approval rules, approval step rules, workflow rules, escalation rules, assignment rules, auto-response rules, validation rules, formula fields, field updates, and custom buttons and links.")
- [Create a hyperlink field?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_hyperlink.htm&release=264.0.0&type=5 "Creates a link to a URL specified that is linkable from the text specified.")

## Advanced Formulas

- [Calculate Commission Amounts for Opportunities](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_commission.htm&release=264.0.0&type=5)?
- [Set Up Round-Robin Assignment of Cases or Leads](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_lead_mgmt.htm&release=264.0.0&type=5)?
- [Set Up Opportunity Discount Rounded](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_discounting.htm&release=264.0.0&type=5)?

## Custom Summary Formulas for Reports

- [Calculate the sum of all leads that have Email Opt Out and Do Not Call fields selected?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_add.htm&release=264.0.0&type=5 "Calculates the sum of two values.")
- [Calculate the difference of all Amount fields and all Discounted Amount fields on opportunities?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_subtract.htm&release=264.0.0&type=5 "Calculates the difference of two values.")
- [Calculate the average of all opportunities?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_multiply.htm&release=264.0.0&type=5 "Multiplies its values.")
- [Calculate what percent of all opportunities are closed won](https://help.salesforce.com/s/articleView?id=platform.customize_functions_divide.htm&release=264.0.0&type=5 "Divides its values.")
- [Calculate the number of active Salesforce users to the 2nd power for administration?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_exponentiation.htm&release=264.0.0&type=5 "Raises a number to a power of a specified number.")
- [Calculate the duration of all activities (minutes) times the number of records per 24 hours?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_open_parenthesis_and_close_parenthesis.htm&release=264.0.0&type=5 "Specifies that the expressions within the open parenthesis and close parenthesis are evaluated first. All other expressions are evaluated using standard operator precedence.")
- [Calculate the average percent margin on a product-by-product level across many opportunities?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_divide.htm&release=264.0.0&type=5 "Divides its values.")
- [Calculate the percentage of one product compared to all products in closed opportunities?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_parentgroupval.htm&release=264.0.0&type=5 "This function returns the value of a specified parent grouping. A “parent” grouping is any level above the one containing the formula.")
- [Calculate the change in revenue from opportunities between months?](https://help.salesforce.com/s/articleView?id=platform.customize_functions_prevgroupval.htm&release=264.0.0&type=5 "This function returns the value of a specified previous grouping. A “previous” grouping is one that comes before the current grouping in the report.")

## Cross-Object Formulas

- [Display a Percent field from a parent object?](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_contact_mgmt.htm&release=264.0.0&type=5)
- [Display a text field from a parent object?](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_contact_mgmt.htm&release=264.0.0&type=5)
- [Display a phone number field from a parent object?](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_contact_mgmt.htm&release=264.0.0&type=5)
- [Display a picklist field from a parent object?](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_contact_mgmt.htm&release=264.0.0&type=5)
- [Display a URL field from a parent object?](https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_contact_mgmt.htm&release=264.0.0&type=5)