Working With Calculated Fields
When you define calculated fields, keep the following in mind.
Specify data types that are appropriate for the resulting calculated values. For example, to concatenate two string fields, specify the String or Text data types. Or, for a field that stores price or tax information, specify the Currency data type. For a field that stores item totals or numbers of days, specify the Integer data type.
Custom logic is calculated inside records, which means all the fields within the record being created or updated can be used for calculation.
In the logic you write, you can use the import keyword to include standard libraries, such as JodaTime, which is used to perform date and time calculations.
* 
The Recalculate on Read option can no longer be enabled for newly created or existing fields. Recalculate-on-read behavior is unchanged for existing fields that previously had the option enabled.
Values that are recalculated on read are raw, and in some cases can violate constraints defined in field options and custom validation logic, because these constraints are applied when records are saved. The only exception is the Precision field option, which is applied after recalculation.
Custom list views that filter calculated fields configured to be recalculated on read cannot be paginated. Filtering is applied on newly recalculated values in memory for only one page of records, and is not applied to obtain total record counts for pagination.
Was this helpful?