You are here:
Sample Financial Calculations Formulas
Calculate compound interest, consultant costs, gross margin, and contract payments. Other examples supply missing payment due dates and identify overdue unpaid payments.
Calculate compound interest, consultant costs, gross margin, and contract payments. Other examples supply missing payment due dates and identify overdue unpaid payments.
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: Essentials, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions |
For details about using the functions included in these samples, see Formula Operators and Functions.
This formula calculates the interest that you have after T years, compounded M times per year.
Principal__c * ( 1 + Rate__c / M ) ^ ( T * M )This formula calculates the interest that will have accumulated after T years, if continuously compounded.
Principal__c * EXP( Rate__c * T )This formula calculates the number of consulting days times 1200 given that this formula field is a currency data type and consulting charges a rate of $1200 per day. Consulting Days is a custom field.
Consulting_Days__c *
1200This formula provides a simple calculation of gross margin. In this formula example, Total Sales and Cost of Goods Sold are custom currency fields.
Total_Sales__c - Cost_of_Goods_Sold__cThis formula calculates the gross margin based on a margin percent.
Margin_percent__c * Items_Sold__c * Price_item__cThis formula returns the date five days after the contract start date whenever Payment Due Date is blank. Payment Due Date is a custom date field.
( BLANKVALUE( Payment_Due_Date__c, StartDate +5 ) )This formula determines if the payment due date is past and the payment status is “UNPAID.” If so, it returns the text “PAYMENT OVERDUE” and if not, it leaves the field blank. This example uses a custom date field called Payment Due Date and a text custom field called Payment Status on contracts.
IF(
AND(Payment_Due_Date__c < TODAY(),
ISPICKVAL( Payment_Status__c, "UNPAID" ) ),
"PAYMENT OVERDUE",
null )
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.