Percentages are used in everyday life, from calculating shopping discounts and sales tax to understanding exam results, business growth, and financial reports. Whether you want to find 15% of a number, calculate a percentage increase, or determine how much you saved during a sale, understanding percentages makes these calculations much easier.
A Percentage Calculator helps you perform these calculations quickly without manually applying formulas. Instead of remembering different mathematical rules, you can enter the required values and get the result in seconds.
In this guide, we will explain how percentages work, explore common percentage calculations, provide practical examples, and demonstrate how to calculate percentages using JavaScript and PHP.
What Is a Percentage?
A percentage represents a number as a fraction of 100. The word percentage literally means "per hundred."
The percentage symbol is %.
For example:
10% means 10 out of 100.
25% means 25 out of 100.
50% means 50 out of 100.
100% represents the complete amount.
Percentages make it easier to compare values, especially when the original quantities are different.
Example:
If 30 students out of 100 pass an examination, the passing percentage is 30%.
If 15 students out of 50 pass another examination, the passing percentage is also 30%.
Although the number of students is different, the percentage makes the results directly comparable.
Basic Percentage Formula
The most common percentage formula is:
Percentage = (Part ÷ Whole) × 100Where:
Part: The value you want to calculate as a percentage.
Whole: The total or original value.
Example:
Suppose a student scores 420 marks out of 500.
Percentage = (420 ÷ 500) × 100
Percentage = 0.84 × 100
Result = 84%
This formula is useful for examination results, survey responses, sales targets, completion rates, and many other calculations.
How to Calculate a Percentage of a Number
One of the most common percentage calculations is finding a specific percentage of a number.
Use this formula:
Result = (Percentage ÷ 100) × Number
Example:
What is 20% of 500?
Step 1: Convert 20% into a decimal.
20 ÷ 100 = 0.20
Step 2: Multiply it by 500.
0.20 × 500 = 100
Result = 100
Some additional examples:
Calculation | Result |
|---|---|
10% of 200 | 20 |
15% of 300 | 45 |
25% of 800 | 200 |
50% of 1,000 | 500 |
75% of 400 | 300 |
This calculation is frequently used when determining discounts, commissions, taxes, and profit margins.
How to Calculate What Percentage One Number Is of Another
Sometimes you know two values and want to determine what percentage one represents of the other.
Use this formula:
Percentage = (Part ÷ Whole) × 100Example:
A company has 200 employees, and 80 employees work remotely. What percentage of employees work remotely?
Percentage = (80 ÷ 200) × 100
Percentage = 0.4 × 100
Result = 40%
This calculation is useful for:
Employee attendance and workforce reports.
Survey results.
Project completion rates.
Sales performance.
Academic results.
Business performance reports.
How to Calculate Percentage Increase
Percentage increase measures how much a value has increased compared with its original value.
Use this formula:
Percentage Increase = ((New Value − Original Value) ÷ Original Value) × 100Example:
A product originally costs $100. Its price increases to $125.
Step 1: Calculate the increase.
125 − 100 = 25
Step 2: Divide the increase by the original price.
25 ÷ 100 = 0.25
Step 3: Multiply by 100.
0.25 × 100 = 25%
Result = 25% increase
Percentage increase is commonly used to calculate:
Salary increments.
Product price increases.
Revenue growth.
Website traffic growth.
Monthly sales growth.
Business performance improvements.
Remember that the original value is the base for this calculation.
How to Calculate Percentage Decrease
Percentage decrease measures how much a value has decreased compared with its original value.
Use this formula:
Percentage Decrease = ((Original Value − New Value) ÷ Original Value) × 100Example:
A laptop originally costs $1,000. Its price is reduced to $800.
Step 1: Calculate the reduction.
1,000 − 800 = 200
Step 2: Divide the reduction by the original price.
200 ÷ 1,000 = 0.20
Step 3: Multiply by 100.
0.20 × 100 = 20%
Result = 20% decrease
This calculation is particularly useful for:
Shopping discounts.
Product price reductions.
Expense tracking.
Budget reductions.
Reduced operating costs.
Comparing performance over time.
How to Calculate Percentage Change
Percentage change is a general formula used to measure how much a value has changed, whether it increased or decreased.
Use this formula:
Percentage Change = ((New Value − Original Value) ÷ Original Value) × 100The result tells you the direction and size of the change:
Positive result: The value increased.
Negative result: The value decreased.
Zero: There was no change.
Example 1: Increase
Original value = 200
New value = 250
Percentage Change = ((250 − 200) ÷ 200) × 100
Result = 25%
Example 2: Decrease
Original value = 200
New value = 150
Percentage Change = ((150 − 200) ÷ 200) × 100
Result = -25%
The negative result represents a 25% decrease.
How to Calculate the Original Price Before a Discount
Sometimes you know the discounted price and discount percentage but want to find the original price.
Use this formula:
Original Price = Discounted Price ÷ (1 − Discount Percentage ÷ 100)Example:
A jacket costs $80 after a 20% discount. What was its original price?
Step 1: Calculate the remaining percentage.
100% − 20% = 80%
Step 2: Convert the remaining percentage into a decimal.
80 ÷ 100 = 0.80
Step 3: Divide the discounted price by the decimal.
80 ÷ 0.80 = 100
Result = $100 original price
This calculation is useful when comparing promotional prices or checking whether a discount has been applied correctly.
How to Calculate a Discount
A discount represents a reduction from the original price.
Use these formulas:
Discount Amount = Original Price × (Discount Percentage ÷ 100)Final Price = Original Price − Discount AmountExample:
A smartphone costs $600, and the store offers a 15% discount.
Step 1: Calculate the discount.
600 × (15 ÷ 100) = $90
Step 2: Subtract the discount from the original price.
600 − 90 = $510
Result:
Original price: $600
Discount: $90
Final price: $510
A percentage calculator can help shoppers quickly understand how much they will save during promotional sales.
How to Calculate Tax Using Percentages
Percentage calculations are also useful for estimating sales tax or other percentage-based charges.
Use this formula:
Tax Amount = Original Amount × (Tax Rate ÷ 100)Total Amount = Original Amount + Tax AmountExample:
A product costs $200, and the applicable tax rate is 10%.
Step 1: Calculate the tax amount.
200 × (10 ÷ 100) = $20
Step 2: Add the tax to the original amount.
200 + 20 = $220
Result = $220 including tax
Actual tax calculations can depend on local regulations, exemptions, rounding rules, and whether prices are tax-inclusive. Always verify the applicable tax rules before using the result for accounting or official reporting.
Percentage Points vs. Percentage Change
One common mistake is confusing percentage points with percentage change.
Although these terms sound similar, they represent different calculations.
Percentage points measure the arithmetic difference between two percentages.
Percentage change measures the relative change compared with the original percentage.
Example:
A website's conversion rate increases from 4% to 5%.
Percentage-point increase:
5% − 4% = 1 percentage point.
Percentage increase:
((5 − 4) ÷ 4) × 100 = 25%.
Therefore, the conversion rate increased by 1 percentage point, which represents a 25% relative increase.
This distinction is particularly important in business analytics, marketing reports, financial analysis, and performance dashboards.
How to Use an Online Percentage Calculator
An online percentage calculator simplifies common percentage calculations and reduces manual effort.
You can use a percentage calculator for different types of calculations, depending on the features supported by the tool.
A typical workflow looks like this:
Open the online percentage calculator.
Select the calculation type, if multiple calculation options are available.
Enter the required values, such as the original amount, new amount, or percentage.
Submit or calculate the result.
Review the calculated percentage or amount.
For example, if you want to calculate 15% of 500, enter 15 as the percentage and 500 as the number.
The result should be 75.
Try the Agilelogics Percentage Calculator: [Add the actual Percentage Calculator URL here]
Always verify the calculation type and input fields supported by the tool before publishing this link.
Percentage Calculation Examples in JavaScript
Developers frequently need percentage calculations in web applications, dashboards, checkout systems, and reporting interfaces.
JavaScript provides a straightforward way to calculate percentages.
1. Calculate a Percentage of a Number
function calculatePercentageOfNumber(percentage, number) {
return (percentage / 100) * number;
}
console.log(calculatePercentageOfNumber(20, 500));
// Output: 1002. Calculate What Percentage One Number Is of Another
function calculatePercentage(part, whole) {
if (whole === 0) {
throw new Error("Whole value cannot be zero.");
}
return (part / whole) * 100;
}
console.log(calculatePercentage(80, 200));
// Output: 403. Calculate Percentage Increase or Decrease
function calculatePercentageChange(original, updated) {
if (original === 0) {
throw new Error("Original value cannot be zero.");
}
return ((updated - original) / original) * 100;
}
console.log(calculatePercentageChange(100, 125));
// Output: 25
console.log(calculatePercentageChange(100, 80));
// Output: -20These functions can be used in pricing calculators, sales reports, analytics dashboards, and other web applications.
For financial applications, consider using decimal arithmetic or integer minor units (such as cents) where appropriate to avoid floating-point precision issues.
Percentage Calculation Examples in PHP
PHP also makes percentage calculations simple and is commonly used in backend applications, APIs, and business systems.
1. Calculate a Percentage of a Number
function calculatePercentageOfNumber($percentage, $number) {
return ($percentage / 100) * $number;
}
echo calculatePercentageOfNumber(20, 500);
// Output: 1002. Calculate Percentage Increase or Decrease
function calculatePercentageChange($original, $updated) {
if ($original == 0) {
throw new InvalidArgumentException(
"Original value cannot be zero."
);
}
return (($updated - $original) / $original) * 100;
}
echo calculatePercentageChange(100, 125);
// Output: 25
echo calculatePercentageChange(100, 80);
// Output: -203. Calculate a Discounted Price
function calculateDiscountedPrice($price, $discountPercentage) {
$discount = $price * ($discountPercentage / 100);
return $price - $discount;
}
echo calculateDiscountedPrice(600, 15);
// Output: 510For production financial calculations, use an appropriate decimal or money-handling approach rather than relying on binary floating-point values for exact currency arithmetic.
Common Percentage Calculation Mistakes
Even simple percentage calculations can produce incorrect results when the wrong formula or base value is used.
Here are some common mistakes to avoid.
1. Using the Wrong Base Value
Percentage increase and decrease calculations must use the original value as the denominator.
For example, an increase from 100 to 150 is 50%, not 33.33%.
2. Forgetting to Divide by 100
To convert a percentage into a decimal, divide it by 100.
For example:
10% = 0.10
25% = 0.25
75% = 0.75
Multiplying directly by 25 instead of 0.25 will produce an incorrect result when calculating 25% of a number.
3. Confusing Percentage Increase with Percentage Points
An increase from 10% to 15% is a 5-percentage-point increase, but a 50% relative increase.
These measurements should not be treated as interchangeable.
4. Ignoring Zero Values
Percentage change cannot be calculated using the standard formula when the original value is zero because division by zero is undefined.
Applications should handle this case explicitly.
5. Rounding Too Early
Rounding intermediate calculations can introduce errors, especially when several percentage operations are performed in sequence.
Keep sufficient precision during calculations and round the final displayed result according to the application's requirements.
Why Use an Online Percentage Calculator?
An online percentage calculator can make everyday calculations faster and easier.
Some common benefits include:
Saves time: Calculate percentages without manually applying formulas.
Reduces calculation errors: Helps avoid common arithmetic mistakes.
Easy to use: Suitable for students, professionals, shoppers, and business owners.
Supports everyday decisions: Useful for discounts, price changes, taxes, and comparisons.
Accessible online: Use a browser-based calculator without installing additional software.
The exact calculation options depend on the features provided by the calculator.
Frequently Asked Questions (FAQs)
1. What is the easiest way to calculate a percentage?
Divide the part by the whole and multiply the result by 100.
Formula:
Percentage = (Part ÷ Whole) × 100
For example, 25 out of 100 is 25%.
2. How do I calculate 20% of a number?
Divide 20 by 100 and multiply the result by the number.
For example:
20% of 500 = (20 ÷ 100) × 500 = 100.
3. How do I calculate percentage increase?
Subtract the original value from the new value, divide the difference by the original value, and multiply by 100.
Formula:
Percentage Increase = ((New Value − Original Value) ÷ Original Value) × 100
This formula assumes the new value is greater than the original value.
4. How do I calculate percentage decrease?
Subtract the new value from the original value, divide the difference by the original value, and multiply by 100.
Formula:
Percentage Decrease = ((Original Value − New Value) ÷ Original Value) × 100
This formula assumes the new value is lower than the original value.
5. How do I calculate a 15% discount?
Multiply the original price by 0.15 to calculate the discount amount.
Then subtract the discount from the original price.
For example, a $200 product with a 15% discount costs $170.
6. How do I find the original price after a discount?
Divide the discounted price by the remaining percentage expressed as a decimal.
For example, if an item costs $80 after a 20% discount:
Original Price = 80 ÷ 0.80 = $100.
7. Can a percentage be greater than 100%?
Yes. A percentage can be greater than 100% when the part is larger than the reference whole.
For example, 150 out of 100 equals 150%.
8. Can a percentage be negative?
Yes. A negative percentage can represent a decrease or a negative change.
For example, a change from 100 to 80 represents a -20% change.
9. What is the difference between percentage and percentage points?
A percentage describes a proportion relative to 100, while percentage points describe the arithmetic difference between two percentages.
For example, an increase from 20% to 25% is 5 percentage points, or a 25% relative increase.
10. Is an online percentage calculator accurate?
A percentage calculator can produce accurate mathematical results when the correct inputs and formula are used. However, rounding rules, input errors, and the calculator's supported calculation types can affect the displayed result.
Conclusion
Percentages are an essential part of everyday calculations, business reporting, financial planning, and software development.
Understanding the basic formulas makes it easier to calculate discounts, taxes, percentage increases, decreases, and changes between values.
An online Percentage Calculator can simplify these tasks by providing quick results without requiring manual calculations.
Whether you are a student checking examination results, a shopper comparing discounts, or a developer building a pricing application, understanding percentage calculations is a useful skill that can save time and reduce errors.
Explore the Agilelogics Percentage Calculator to perform percentage calculations online and simplify your everyday mathematical tasks.
Some Recommended Tools | Destination |
|---|---|
Actual Percentage Calculator URL | |
JSON Formatter tool | |
SQL Formatter tool | |
Online Code Minifier | |
URL Encoder and Decoder tool | |
HTML Encode and Decoder tool |
Written by
Alex Rivera
AI/ML writer covering AI assistants, coding tools, and generative AI platforms — pricing, capabilities, and how they actually compare.