Percentage Calculator
Quickly compute common percentage problems for pricing, discounts, analytics and finance.
Back to all tools on ToolForge
1. What is X% of Y?
% of
Result:
2. X is what percent of Y?
is what % of
Result:
3. Percentage change from A to B
From to
Result:
About Percentage Calculator
This percentage calculator solves three common percentage problems: finding a percentage of a value, determining what percentage one number is of another, and calculating percentage change (increase or decrease). Each calculation uses standard mathematical formulas with step-by-step breakdowns.
It is useful for discounts and markups, tax calculations, score changes, growth rates, financial analysis, statistical comparisons, grade calculations, and everyday percentage problems.
Percentage Fundamentals
Percentage means "per hundred" and represents a fraction with denominator 100:
Percentage Basics:
Definition:
X% = X/100 = X hundredths
Conversions:
Percentage to Decimal: Divide by 100
25% = 25/100 = 0.25
Decimal to Percentage: Multiply by 100
0.75 = 0.75 × 100 = 75%
Percentage to Fraction: Simplify
50% = 50/100 = 1/2
20% = 20/100 = 1/5
Common Percentage Equivalents:
1% = 0.01 = 1/100
5% = 0.05 = 1/20
10% = 0.10 = 1/10
20% = 0.20 = 1/5
25% = 0.25 = 1/4
33.33%= 0.3333 = 1/3
50% = 0.50 = 1/2
66.67%= 0.6667 = 2/3
75% = 0.75 = 3/4
100% = 1.00 = 1
150% = 1.50 = 3/2
200% = 2.00 = 2
Percentage Formulas
| Problem Type | Formula | Example |
|---|---|---|
| Find X% of Y | Y × (X/100) | 20% of 150 = 150 × 0.2 = 30 |
| X is what % of Y | (X/Y) × 100 | 25 of 200 = (25/200) × 100 = 12.5% |
| Percentage Change | ((B-A)/A) × 100 | 50 to 75 = ((75-50)/50) × 100 = 50% |
| Percentage Increase | ((New-Old)/Old) × 100 | 100 to 150 = 50% increase |
| Percentage Decrease | ((Old-New)/Old) × 100 | 80 to 60 = 25% decrease |
| Find Original (after X% increase) | New / (1 + X/100) | 120 after 20% increase → 100 |
| Find Original (after X% decrease) | New / (1 - X/100) | 80 after 20% decrease → 100 |
Calculation Examples
Type 1: What is X% of Y?
Example 1: What is 15% of 200?
Step 1: Convert percentage to decimal
15% = 15/100 = 0.15
Step 2: Multiply
200 × 0.15 = 30
Answer: 30
Example 2: What is 7.5% of 450?
Step 1: 7.5% = 0.075
Step 2: 450 × 0.075 = 33.75
Answer: 33.75
Type 2: X is what percent of Y?
Example 1: 45 is what percent of 180?
Step 1: Divide
45 / 180 = 0.25
Step 2: Convert to percentage
0.25 × 100 = 25%
Answer: 25%
Example 2: 17 is what percent of 85?
Step 1: 17 / 85 = 0.2
Step 2: 0.2 × 100 = 20%
Answer: 20%
Type 3: Percentage Change from A to B
Example 1: From 40 to 60
Step 1: Find difference
60 - 40 = 20
Step 2: Divide by original
20 / 40 = 0.5
Step 3: Convert to percentage
0.5 × 100 = 50%
Answer: +50% (increase)
Example 2: From 100 to 80
Step 1: 80 - 100 = -20
Step 2: -20 / 100 = -0.2
Step 3: -0.2 × 100 = -20%
Answer: -20% (decrease)
Example 3: From 250 to 375
Step 1: 375 - 250 = 125
Step 2: 125 / 250 = 0.5
Step 3: 0.5 × 100 = 50%
Answer: +50% (increase)
Real-World Applications
| Application | Formula | Example |
|---|---|---|
| Discount Amount | Price × (Discount%/100) | $100 × 20% = $20 off |
| Sale Price | Price × (1 - Discount%/100) | $100 × 0.8 = $80 |
| Tax Amount | Price × (Tax%/100) | $50 × 8% = $4 tax |
| Total with Tax | Price × (1 + Tax%/100) | $50 × 1.08 = $54 |
| Tip Amount | Bill × (Tip%/100) | $80 × 18% = $14.40 |
| Growth Rate | ((New-Old)/Old) × 100 | 1000 to 1200 = 20% growth |
| Profit Margin | ((Revenue-Cost)/Revenue) × 100 | ($200-$150)/$200 = 25% |
| Commission | Sales × (Commission%/100) | $5000 × 5% = $250 |
Code Examples by Language
JavaScript:
// Percentage of value
function percentageOf(percent, value) {
return value * (percent / 100);
}
// What percent
function whatPercent(part, whole) {
return (part / whole) * 100;
}
// Percentage change
function percentChange(old, new) {
return ((new - old) / old) * 100;
}
Python:
def percentage_of(percent, value):
return value * (percent / 100)
def what_percent(part, whole):
return (part / whole) * 100
def percent_change(old, new):
return ((new - old) / old) * 100
PHP:
function percentageOf($percent, $value) {
return $value * ($percent / 100);
}
function whatPercent($part, $whole) {
return ($part / $whole) * 100;
}
function percentChange($old, $new) {
return (($new - $old) / $old) * 100;
}
Java:
public static double percentageOf(double percent, double value) {
return value * (percent / 100);
}
public static double whatPercent(double part, double whole) {
return (part / whole) * 100;
}
public static double percentChange(double old, double new) {
return ((new - old) / old) * 100;
}
Excel/Google Sheets:
' Percentage of value
=B1*A1/100 or =B1*(A1%)
' What percent
=A1/B1*100
' Percentage change
=(B1-A1)/A1*100
' Format cells as Percentage (%)
Percentage Tricks
Mental Math Shortcuts:
1. 10% of any number: Move decimal one place left
10% of 250 = 25
10% of 47.5 = 4.75
2. 5% = Half of 10%
5% of 80 = (10% of 80) / 2 = 8 / 2 = 4
3. 15% = 10% + 5%
15% of 200 = 20 + 10 = 30
4. 20% = Double 10%
20% of 75 = 7.5 × 2 = 15
5. 25% = Divide by 4
25% of 100 = 100/4 = 25
6. 50% = Half
50% of 87 = 87/2 = 43.5
7. 75% = 50% + 25% = Half + Quarter
75% of 80 = 40 + 20 = 60
8. 100% = The number itself
100% of 42 = 42
9. Reversibility: X% of Y = Y% of X
4% of 25 = 25% of 4 = 1
8% of 50 = 50% of 8 = 4
10. Percentage increase followed by decrease:
+10% then -10% ≠ Original
100 → 110 → 99 (net -1%)
Common Mistakes
Mistake 1: Adding percentages incorrectly
Wrong: +20% then +30% = +50%
Correct: 100 → 120 → 156 = +56% total
(Percentages compound, not add)
Mistake 2: Reversing percentage change
Wrong: If A is 25% more than B, then B is 25% less than A
Correct: A = 125, B = 100
B is (125-100)/125 = 20% less than A
Mistake 3: Percentage of percentage
Wrong: 50% of 50% = 100%
Correct: 50% of 50% = 25% (0.5 × 0.5 = 0.25)
Mistake 4: Division by zero in percentage change
Cannot calculate: From 0 to 100
Result would be infinite (division by zero)
Mistake 5: Confusing percentage points with percent
From 10% to 15%:
- 5 percentage points increase
- 50% percent increase
(These are different measurements)
Best Practices
- Check for zero denominators: Percentage calculations involving division require non-zero denominators.
- Distinguish absolute vs relative: Understand when to use percentage points (absolute) vs percent change (relative).
- Round appropriately: For currency, round to 2 decimal places; for statistics, use appropriate significant figures.
- Verify reasonableness: Quick mental estimate helps catch calculation errors.
- Document base values: Always specify what the percentage is relative to for clarity.
Limitations
- Cannot compute change from zero: Percentage change requires non-zero starting value.
- Floating-point precision: JavaScript Number type may introduce small rounding errors for very precise calculations.
- Single-step calculations: Does not handle multi-step percentage problems (e.g., successive discounts).
- No context awareness: Cannot determine if result makes sense in real-world context.
Frequently Asked Questions
- How do you calculate percentage of a number?
- To find X% of Y, multiply Y by X/100. Formula: Result = Y × (X/100). For example, 20% of 150 = 150 × (20/100) = 150 × 0.2 = 30.
- How do you calculate what percent one number is of another?
- To find what percent X is of Y, divide X by Y and multiply by 100. Formula: Percent = (X/Y) × 100. For example, 25 is what percent of 200? (25/200) × 100 = 12.5%.
- How do you calculate percentage change?
- Percentage change from A to B = ((B-A)/A) × 100. Positive result indicates increase, negative indicates decrease. For example, from 50 to 75: ((75-50)/50) × 100 = 50% increase.
- What is the difference between percentage points and percent change?
- Percentage points measure absolute difference between percentages. If rate goes from 10% to 15%, that's a 5 percentage point increase, but a 50% percent change. Percentage points are used for rate comparisons; percent change for relative growth.
- How do you calculate percentage increase vs decrease?
- Both use the same formula: ((new-old)/old) × 100. Positive result = increase, negative result = decrease. For decrease, you can also use: ((old-new)/old) × 100 and report as positive percentage.
- Why can't percentage change be calculated from zero?
- Percentage change requires dividing by the original value. Division by zero is undefined in mathematics. If starting from zero, any non-zero endpoint represents infinite percentage increase, which cannot be meaningfully expressed.