Formula field return types
Key Takeaway
Select the return type first, before the formula editor opens, and choose it based on what the calculation outputs.
A formula field is a field that Salesforce calculates from values on the current record or related records. When you create one, you pick a return type, which decides what kind of value the formula produces and how it displays. Choosing the right return type is the first decision when you use a formula to meet a business requirement.
Choosing the return type
Like a standard field, a formula field has a data type, which is its return type. You select the return type first, before the formula editor opens. You choose it based on what the calculation outputs.
There are eight formula return types, grouped here by what the calculation outputs.
| What the calculation outputs | Return type |
|---|---|
TRUE or FALSE | Checkbox |
| A number | Number, Currency or Percent |
| A date, a time of day, or both | Date, Date/Time or Time |
| A string | Text |