---
schema_version: "1"
id: d56722644231e722dd99cdec958bb752b7c5c67967af3e4d9682f16bdf02d535
title: Sample Discounting Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/useful_advanced_formulas_discounting.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_discounting.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b3861b0fd79184c3a92dc0718da187ce99dca75ca7be6a1e5fe515bb4aabd0a1
description: Identify discounted opportunities and calculate discount-adjusted amounts. Examples use custom currency amounts, percentages, rounding, and approval status.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Sample Discounting Formulas

Identify discounted opportunities and calculate discount-adjusted amounts. Examples use custom currency amounts, percentages, rounding, and approval status.

### 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;">Available in: <strong>Essentials</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

For details about using the functions included in these samples, see [Formula and Operator Functions](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&type=5&language=en_US).

## Maintenance and Services Discount

This formula field uses two custom currency fields: Maintenance Amount and Services Amount. It displays “Discounted” on an opportunity if its maintenance amount and services amount don’t equal the opportunity Amount standard field value. Otherwise, it displays "Full Price."

`IF(Maintenance_Amount__c + Services_Amount__c <> Amount,  "Discounted",  "Full Price")`

## Opportunity Discount Amount

This formula calculates the difference of the product Amount less the Discount Amount. Discount Amount is a custom currency field.

```
Amount -
                    Discount_Amount__c
```

## Opportunity Discount Rounded

Use this formula to calculate the discounted amount of an opportunity rounded off to two digits. This example is a number formula field on opportunities that uses a custom percent field called Discount Percent.

```
ROUND(Amount-Amount* Discount_Percent__c,2)
```

## Opportunity Discount with Approval

This formula adds a “Discount Approved” checkbox to an opportunity. It uses conditional logic to check the value of the approval flag before calculating the commission.

`IF(Discount_Approved__c, ROUND(Amount – Amount * DiscountPercent__c, 2), Amount)`