Calculate percentage
Function: Calculate percentage
This function helps you determine what portion of a total amount a specific value represents, expressed as a percentage. It's useful for understanding proportions, progress, or shares in various business scenarios.
Input
- Part (NUMBER, Required): This is the specific value or amount for which you want to calculate the percentage. Think of it as the "slice" of the "whole."
- Whole (NUMBER, Required): This is the total amount or the reference value against which the 'Part' is being compared. Think of it as the "entire pie."
Output
- Result (NUMBER): The calculated percentage will be stored in a variable. By default, this variable will be named "PERCENTAGE," but you can choose a different name if needed. This variable will hold the numerical percentage value (e.g., 25 for 25%).
Execution Flow
Real-Life Examples
Example 1: Calculating a Discount Percentage
- Scenario: You want to show customers the percentage discount on a product. The original price is $80, and the discount amount is $20.
- Inputs:
Part: 20 (the discount amount)Whole: 80 (the original price)
- Result: The function calculates (20 / 80) * 100 = 25. The variable
PERCENTAGEwill hold the value25. You can then display "You saved 25%!"
Example 2: Tracking Project Completion Rate
- Scenario: A project has a total of 40 tasks, and 32 of them have been completed. You need to know the project's completion percentage.
- Inputs:
Part: 32 (completed tasks)Whole: 40 (total tasks)
- Result: The function calculates (32 / 40) * 100 = 80. The variable
PERCENTAGEwill hold the value80. You can then show "Project is 80% complete."
Example 3: Analyzing Sales Performance
- Scenario: Your sales team set a target of 500 sales for the month, and they have achieved 350 sales so far. You want to see what percentage of the target they have reached.
- Inputs:
Part: 350 (achieved sales)Whole: 500 (sales target)
- Result: The function calculates (350 / 500) * 100 = 70. The variable
PERCENTAGEwill hold the value70. You can then report "Sales team has reached 70% of their monthly target."