What is a formula field in Salesforce?
The formula field is a read-only field and the value of Formula filed evaluate from expression defined by us. If we are updating the value in the expression then it will automatically update the value of formula field and you can create formula fields in both the Standard and Custom object.
You can return formula result in 7 ways those are as follows:
1. Checkbox: it is used as a Boolean value.
2. Currency: it is used to calculate amount as a dollar or other currency and automatically format the field as a currency amount.
3. Date: it is used to calculate a date, for example, by adding or subtracting days to other dates.
4. Date/Time: it is used to calculate a date/time, for example, by adding a number of hours or days to another date/time.
5. Number: it is used to calculate a numeric value.
6. Percent: it is used to calculate a percent and automatically add the percent sign to the number.
7. Text: it is used to create a text string, for example, by concatenating other text fields.