Skip to main content

Calculate any percentage

Please provide any two values below and click the "Calculate" button to get the third value.

Percentage
Value
Result

Percentage Calculator in Common Phrases

Select a phrase below and fill in the values to calculate.

What is
Percentage
% of
Value
Value 1 (part)
is what % of
Value 2 (whole)
Value (part)
is
Percentage
% of what?

A shop takes 20% off a $40 item, your exam paper says 42 out of 50, and the population of your town went from 8,000 to 9,200. Each is a different percentage question, and each needs a different sum. Mix up the base and the answer is wrong.

This online percentage calculator has a mode for each question: pick one, enter two numbers and it returns the third with the working shown. It finds a percentage of a number, what percent one number is of another, and the whole when you know a part and its percentage. For a specific job, such as discounts, change or measurement error, the dedicated calculators further down go deeper.

How to use the percentage calculator

Quick answer: to find X% of Y, multiply Y by X and divide by 100. 20% of 40 is 20 × 40 ÷ 100 = 8.

  1. Choose the mode that matches your question. Use "what is X% of Y" when you know the percentage and the whole, "X is what percent of Y" when you know two numbers, and "X is Y% of what" when you know a part and its percentage and want the whole.
  2. Enter the two numbers in the percent calculator. The whole is always the number that follows the word "of".
  3. Read the result and the working beneath it. If the answer looks wrong, check that the whole and the part are the right way round.

What is a percentage?

A percentage is a number written as a part of 100. The word comes from the Latin per centum, meaning "by the hundred", and the symbol % stands for it. One percent is one hundredth, so 1% = 1/100 = 0.01. Fifty percent is a half, 25% a quarter and 100% the whole. Percent is also written as two words, per cent, in British English.

Percentages are not capped at 100. A value of 150% of 40 is 60, and a price can rise by 300%. Every percentage problem has three parts: the rate (the percentage), the whole (the number the rate applies to) and the part (the result). Two of them are given and the third is the question.

Percentage formula and how to calculate percentages

part = percentage / 100 * whole
percentage = part / whole * 100
whole = part / (percentage / 100)

The percent equation has three forms, and they are one relationship rearranged. Pick the version that solves for the number you are missing.

How to find a percentage of a number (X% of Y)

How to calculate percentage of a number: turn the percentage into a decimal by dividing by 100, then multiply by the number. For 30% of 300: 30 ÷ 100 = 0.30, and 0.30 × 300 = 90.

How to find percentage: what percent is X of Y?

Divide the part by the whole and multiply by 100. If you scored 15 out of 60, then 15 ÷ 60 = 0.25, so you scored 25%. The order matters: 60 out of 15 is 400%, a different question.

How to find the percentage of two numbers

The percentage of two numbers is the first expressed as a share of the second. For 12 and 48, 12 ÷ 48 = 0.25, so 12 is 25% of 48. Name the whole before you divide: it is the number that follows "of".

How to find the whole when you know the part

Divide the part by the percentage as a decimal. If 45 is 15% of a number, then 45 ÷ 0.15 = 300. The reverse percentage calculator handles this case directly, including the common price-before-discount version.

Percent of total

A share of a total is the item divided by the sum of all items, times 100. Eighteen hours on one project out of 120 total hours is 18 ÷ 120 × 100 = 15%. The shares of all the parts add up to 100%, which makes this a good check on a spreadsheet.

Mental maths shortcuts for percentages

Here is how to do percentages in your head.

  • 10%: move the decimal point one place left. 10% of 80 is 8.
  • 1%: move it two places left. 1% of 80 is 0.8.
  • 5%: half of 10%. 5% of 80 is 4.
  • 15%: 10% plus 5%. 15% of 80 is 8 + 4 = 12.
  • 25%: a quarter. 25% of 80 is 20.
  • 75%: three quarters. 75% of 80 is 60.
  • 33⅓%: a third. 33⅓% of 90 is 30.

Build other values from these pieces. 35% is 10% three times plus 5%, and 60% is half plus 10%.

Worked percentage examples

Example 1: 20 percent of 40

Given

20 percent of 40

Answer

20 ÷ 100 = 0.20, and 0.20 × 40 = 8.

Example 2: 15 out of 60 as a percentage

Given

15 out of 60 as a percentage

Answer

15 ÷ 60 = 0.25, and 0.25 × 100 = 25%.

Example 3: an exam score

Given

You answered 42 of 50 questions correctly.

Answer

42 ÷ 50 = 0.84, so the score is 84%.

Example 4: a tip

Given

A bill of $64.50 with an 18% tip
  1. Step 1

    0.18 × 64.50 = 11.61.

Answer

The tip is $11.61 and the total is $76.11.

Example 5: a discount

Given

25% off $120
  1. Step 1

    0.25 × 120 = 30.

Answer

You save $30 and pay $90. The percent off calculator adds a second discount and sales tax.

Example 6: sales tax

Given

7.5% tax on $85
  1. Step 1

    0.075 × 85 = 6.375, which rounds to $6.38.

Answer

The total is $91.38.

Example 7: a share of a total

Given

Rent of $900 on a monthly income of $2,400

Answer

900 ÷ 2,400 × 100 = 37.5% of your income.

Example 8: scaling a recipe

Given

A recipe calls for 250 g of flour and you want 40% more.

Answer

0.40 × 250 = 100, so use 250 + 100 = 350 g.

Example 9: population growth

Given

A town grows from 8,000 to 9,200 people.
  1. Step 1

    The change is 1,200, and 1,200 ÷ 8,000 = 0.15.

Answer

That is a 15% increase.

Example 10: finding the original number

Given

A coat costs $72 after a 20% discount, so $72 is 80% of the original price.

Answer

The original price is 72 ÷ 0.80 = $90.

Convert between percentages, decimals and fractions

To turn a percentage into a decimal, divide by 100. To turn a decimal into a percentage, multiply by 100. For a fraction, divide the numerator by the denominator and then multiply by 100: 3/8 = 0.375 = 37.5%.

Convert between percentages, decimals and fractions
FractionDecimalPercentage
1/20.550%
1/40.2525%
1/50.220%
1/80.12512.5%
3/40.7575%
1/30.3333…33.33%

For other values use the fraction to percent calculator, the decimal to percent calculator or the percent to fraction calculator.

A ratio of 1:4 splits a total into 5 equal parts, so the first part is 1 ÷ 5 = 20% of the total. The ratio to percentage calculator converts any ratio this way.

Percentage calculator code

Four functions cover the three modes plus the percent change used in the worked examples. They reproduce the examples above (8, 90, 25%, 84%, 15%, +15% and 300) and reject a zero base.

JavaScript

JavaScript
const finite = (name, v) => {  if (typeof v !== "number" || !Number.isFinite(v)) throw new TypeError(`${name} must be a finite number`);};​export const percentOf = (percent, whole) => {  finite("percent", percent);  finite("whole", whole);  return (percent / 100) * whole;};​export const whatPercent = (part, whole) => {  finite("part", part);  finite("whole", whole);  if (whole === 0) throw new RangeError("whole must not be 0");  return (part / whole) * 100;};​export const percentChange = (from, to) => {  finite("from", from);  finite("to", to);  if (from === 0) throw new RangeError("percent change from 0 is undefined");  return ((to - from) / Math.abs(from)) * 100;};​export const wholeFromPart = (part, percent) => {  finite("part", part);  finite("percent", percent);  if (percent === 0) throw new RangeError("percent must not be 0");  return part / (percent / 100);};

Python

Python
import math​def _finite(name, v):    if isinstance(v, bool) or not isinstance(v, (int, float)) or not math.isfinite(v):        raise ValueError(f"{name} must be a finite number")​def percent_of(percent, whole):    _finite("percent", percent)    _finite("whole", whole)    return percent / 100 * whole​def what_percent(part, whole):    _finite("part", part)    _finite("whole", whole)    if whole == 0:        raise ZeroDivisionError("whole must not be 0")    return part / whole * 100​def percent_change(start, end):    _finite("start", start)    _finite("end", end)    if start == 0:        raise ZeroDivisionError("percent change from 0 is undefined")    return (end - start) / abs(start) * 100​def whole_from_part(part, percent):    _finite("part", part)    _finite("percent", percent)    if percent == 0:        raise ZeroDivisionError("percent must not be 0")    return part / (percent / 100)

Percent change divides by the absolute value of the starting number, so a move from −50 to −25 reports +50%. Other tools use the signed start and return −50%, so pick one convention and state it.

Privacy and input safety

Every calculation runs in your browser. The numbers you enter are not sent to a server or stored.

  • Fields accept numbers only. Text, empty fields and NaN or Infinity are rejected with a message, never evaluated as code.
  • A comma followed by exactly three digits is read as a thousands separator, so 1,200 is 1200. Any other comma is a decimal point, so 12,50 is 12.50, and a number starting with 0, such as 0,500, is read as a decimal. Mixed formats such as 1.234,5 and ambiguous entries such as 1,2,3 are refused instead of guessed. Spaces, including no-break spaces, between digit groups are ignored.
  • A whole of 0 in "what percent" and a start of 0 in "percent change" return "undefined" with the reason, not a division error.
  • Results are rounded for display only. The unrounded value feeds every later step.

Common percentage mistakes

Common percentage mistakes
MistakeWhat goes wrongWhat the calculator does
Dividing by the wrong number60 ÷ 15 gives 400% when you wanted 15 ÷ 60 = 25%Labels the part and the whole and shows the division
Forgetting to convert the percent20% × 40 read as 20 × 40 = 800 instead of 8Divides the percentage by 100 first
Confusing percentage points and percentA rate moving from 4% to 6% is 2 percentage points but a 50% increaseReports the percent change and states the base
Averaging an up and a down+20% then −20% is not back to the start: 100 → 120 → 96, a 4% lossPercent change mode on 100 and 96 returns −4%
Using the new value as the baseA rise from 80 to 100 is 25%, not 20%, because the base is 80Always uses the starting value
Believing 100% is the limit150% of 40 is 60, and increases above 100% are validAccepts values above 100
Rounding earlySmall errors grow through later stepsRounds only the final figure

Which percentage calculator should you use?

The three modes above answer most questions. These dedicated calculators go further on one job each.

Which percentage calculator should you use?
Your questionFormulaCalculator
How much did a value change from a start to an end?(end − start) ÷ start × 100Percentage change
By what percent did a value grow?(new − old) ÷ old × 100Percentage increase
By what percent did a value fall?(old − new) ÷ old × 100Percentage decrease
How far apart are two values when neither is the reference?abs(a − b) ÷ ((a + b) ÷ 2) × 100Percentage difference
How far is a measurement from the accepted value?abs(measured − true) ÷ abs(true) × 100Percent error
What is the price after a discount?price × (1 − percent ÷ 100)Percent off
What was the number before a percentage was applied?result ÷ (1 ± percent ÷ 100)Reverse percentage
How do I add or take a percentage off a number?number × (1 ± percent ÷ 100)Add or subtract a percentage
What is the average of several percentages?sum of the values ÷ countAverage percentage

Percentage change, increase, decrease and difference

These four are easy to mix up. Change and its two halves, increase and decrease, compare a start with an end and use the start as the base. Difference compares two values that have equal standing, so it uses their average as the base and gives the same answer whichever order you enter them.

Percentage points vs percent

A percentage point is the plain gap between two percentages. A rate that moves from 4% to 6% has gone up 2 percentage points, which is a 50% increase. Finance also uses basis points, where 1 basis point is 0.01 of a percentage point, and per mille, which is parts per thousand. The percentage points guide covers the difference in full.

How to calculate percentage of marks

Percentage of marks is marks obtained ÷ total marks × 100. A score of 420 out of 500 is 420 ÷ 500 = 0.84, or 84%. In the calculator, use the "X is what percent of Y" mode, with the marks you scored as X and the total marks as Y.

For several subjects, add the marks obtained and add the totals, then divide once. Scores of 78, 85, 92, 66 and 79, each out of 100, total 400 out of 500, which is 80%. Add first when the totals differ: 45 out of 50 and 60 out of 100 make 105 out of 150, which is 70%, whereas averaging 90% and 60% gives 75% and over-rewards the short paper.

When every paper has the same total, the average percentage calculator gives the same answer. When papers count for different shares of the final grade, multiply each percentage by its weight and add: 80% × 0.6 + 70% × 0.4 = 76%. Grade boundaries and GPA depend on the exam board or school, so they sit outside this calculator.

Percentages in Excel and Google Sheets

In a spreadsheet, divide the part by the whole (=A2/B2) and format the cell as a percentage. For change, use =(B2-A2)/A2. The Excel percentage guide has copy-ready formulas for each case.

Frequently asked questions

What percentage is one number of another?

Divide the first number by the second and multiply by 100. 15 is 25% of 60 because 15 ÷ 60 × 100 = 25, and 42 is 84% of 50. The same sum answers "what percentage of" and "what is the percentage of" questions.

How do you calculate a percentage?

There are three versions, depending on what is missing. Percentage = part ÷ whole × 100, so 20 out of 80 is 25%. Part = percentage ÷ 100 × whole, so 25% of 80 is 20. Whole = part ÷ (percentage ÷ 100), so if 20 is 25% of a number, the number is 80.

How do I find a percentage?

To figure out a percentage, write the share as a fraction, divide to get a decimal, then move the decimal point two places to the right. 3 out of 8 is 3 ÷ 8 = 0.375, which is 37.5%. A result that is already a decimal, such as 0.2, is 20%.

How to find the percent of a number?

To get a percentage of a number, convert the percent to a decimal by dividing by 100, then multiply. 30% of 300 is 0.30 × 300 = 90, and 15% of 60 is 0.15 × 60 = 9.

How do I do percentages?

Name the whole first: it is the number the percentage is taken from. Then choose the sum, part ÷ whole × 100 for "what percent" or percent ÷ 100 × whole for "percent of". For a quick estimate, 10% is the number with its decimal point moved one place, so 15% of 80 is 8 + 4 = 12, where 4 is half of the 10%.

How do I do percentages on a calculator?

For "what percent", enter 15 ÷ 60 × 100 and read 25. For "percent of", enter 300 × 30 ÷ 100 to get 90, or 300 × 0.30. The % key behaves differently between calculators, so the explicit sum is the safer habit.

What is a percentage?

A number expressed as a part of 100. 1% is 1/100 or 0.01, 50% is one half, and 100% is the whole amount.