---
schema_version: "1"
id: 840aba1394c7d8e2da44f520f679796732ee8e151265505ffe8f9767eba29bbe
title: Sample Scoring Calculations 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_scoring.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_scoring.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 47c103f14a1064500e4d3be11b6406ae5972129c07f9f277625f3a4fe83da5a4
description: Score leads by source or rating, and rank customers based on survey results.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Sample Scoring Calculations Formulas

Score leads by source or rating, and rank customers based on survey results.

### 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 Operators and Functions by Context](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&release=264.0.0&type=5 "Use these operators and functions when building formulas. All functions are available everywhere that you can include a formula, such as formula fields, validation rules, approval processes, and workflow rules, unless otherwise specified.").

## Lead Scoring

This formula scores leads, providing a higher score for phone calls than website requests.

`CASE(LeadSource, "Phone", 2, "Web", 1, 0)`

Here's a formula that scores a lead based on his or her rating:

`CASE(1, IF(ISPICKVAL​(Rating, "Hot"),​ 1, 0), 3,​​ IF(ISPICKVAL​(Rating, "Warm"),​ 1, 0), 2, IF(ISPICKVAL​(Rating, "Cold"),​ 1, 0), 1))`

## Customer Success Scoring

This formula uses a simple scoring algorithm to rank customers a high score for positive survey results in Salesforce.

`Survey_Question_1__c * 5 + Survey_Question_2__c *2`