---
schema_version: "1"
id: 1fec99a865c6147ae89b8b13f1bd12a5711cdaf95c1e6e7a8c3cf10666f625ba
title: mpercent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_mpercent.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_mpercent.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 240aa43b28cc4bba02398461c966019707f190711d8f076e9e30229e4df9d620
description: Returns the commission rate for a deal in Salesforce Spiff, based on a range table and the rep's current attainment. To return a commission total amount instead, use the mamount() function.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# mpercent

Returns the commission rate for a deal in Salesforce Spiff, based on a range table and the rep's current attainment. To return a commission total amount instead, use the `mamount()` function.

### 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 (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</td></tr></tbody></table>

## Syntax

```
mpercent(input_value, range_table, initial_value, return_column, return_value_when_input_value_zero)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| input\_value | Required | The percentage or currency amount to check against a range table, such as the percentage of quota retired per deal or an ARR amount from a closed deal. For an amount, the value must match the currency and values in the range table. |
| range\_table | Required | The range table to check. |
| initial\_value | Optional | A starting value that affects which ranges the input\_value applies to. Typically, this value is based on an accumulated variable, which tracks progress toward rate tiers, such as previous progress toward a quarterly quota where commissions are calculated monthly. |
| return\_column | Optional | The name of the range table's specific return column, enclosed in double quotes. This argument is required only if the range table includes multiple return columns, which is helpful when the same value ranges are used across multiple plans with different rates. |
| return\_value\_when\_input\_value\_zero | Optional | A string, number, currency, or calculation that provides error handling or more information when this function can't calculate the input\_value. For example, an input\_value of `0` results in division by zero, but returns a value of `0` but no error. With this argument, specify a different value or behavior for these cases. |

## Considerations

- This function is commission-specific based on a range table and rate tiers.
- This function allocates input\_value across tiers by calculating how much falls within each tier range, and then calculates the payout for each tier.
- You can use previously created summary calculations and mathematical operations in a range table. Reference these calculations with the syntax `WorksheetName!CalculationName`.

## Example

Consider these commission rate tiers in a range table, AttainmentTiers.

- For the first tier, when attainment is between 0% and 50%, a rep receives 5% commission.
- For the second tier, when attainment is between 50% and 100%, a rep receives 7% commission, but that rate applies only to this tier. Deals that closed between 0% and 50% attainment are still commissioned at 5$.

If a rep already has 48% attainment and then closes a new deal that represents 5% of their attainment, only 2% attainment of the new deal is allocated to the first tier at 5% commission. The remaining 3% attainment is allocated to the second tier at 7% commission. The result is a blended rate, based on this calculation.

```
(2% * 5% + 3% * 7%)/5% = 6.2%
```

To calculate this commission rate, provide these values to the `mamount()` function.

```
=mpercent(0.48, AttainmentTiers, 0.05)
```

#### See Also

- [mamount](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_mamount.htm&release=264.0.0&type=5 "Returns the commission total for a deal in Salesforce Spiff, based on a range table and the rep's current attainment. To return a commission rate instead, use the mpercent() function.")
- [Considerations for Accelerator Functions in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_accelerator_functions.htm&release=264.0.0&type=5 "Salesforce Spiff provides several functions that support accelerators, including mamount(), mpercent(), range_lookup(), and tier_payout.")
- [Accumulated Variables in Accelerator Functions](https://help.salesforce.com/s/articleView?id=sales.spiff_accelerator_accumulated_variable.htm&release=264.0.0&type=5 "An accumulated variable is often used with the initial_value argument in the mamount() and mpercent() accelerator functions in Salesforce Spiff.")
- [Create an Accumulated Variable for a Marginal Payout Function](https://help.salesforce.com/s/articleView?id=sales.spiff_accelerator_accumulated_variable_create.htm&release=264.0.0&type=5 "Create an accumulated variable for the initial_value argument in the mamount() and mpercent() accelerator functions in Salesforce Spiff.")