Key takeaway
What percentage is A of B = (A ÷ B) × 100. 8 is what percent of 40? (8 ÷ 40) × 100 = 20%. A is the part, B is the whole — divide A by B, then scale to 100. Swapping them inverts the answer.
Scope and assumptions
General arithmetic. B must be the full whole in your context. This site is informational and not official.
Short answer: What percentage is A of B = (A ÷ B) × 100. 8 is what percent of 40? (8 ÷ 40) × 100 = 20%. A is the part, B is the whole — divide A by B, then scale to 100. Swapping them inverts the answer. This page uses the compact "A of B" notation common in formulas and algebra; for "X is what percent of Y", see X Is What Percent of Y, and for the whole-named-first form, see What Percent of Y Is X.
Quick navigation
- X is what % of Y → x-is-what-percent-of-y
- Two numbers → calculate-percentage-of-two-numbers
- The formula → percentage-formula
- The calculator → Percentage Calculator
1. The method
% = (A ÷ B) × 100
A is the piece; B is the whole it comes from.
2. Worked examples
| What % is A of B | (A÷B)×100 | Result |
|---|---|---|
| 8 of 40 | (8÷40)×100 | 20% |
| 50 of 40 | (50÷40)×100 | 125% |
| 25 of 200 | (25÷200)×100 | 12.5% |
| 90 of 120 | (90÷120)×100 | 75% |
3. Quick reference
- A = B/2 → 50%
- A = B/4 → 25%
- A = B/10 → 10%
- A = B → 100%
- A = 2B → 200%
4. A stock example
A warehouse holds 40 pallets; 8 are damaged.
What % is 8 of 40? (8 ÷ 40) × 100 = 20%
So 20% of inventory is affected.
5. Common mistakes
- Dividing B by A — that answers "B is what % of A" instead (40÷8 = 500%).
- Forgetting ×100 — 8÷40 = 0.20, which is 20% only after ×100.
- Wrong whole — B must be the full total.
- Mixing units — A and B must match.
6. Quick reference pairs
| A | B | A is % of B |
|---|---|---|
| 8 | 40 | 20% |
| 25 | 200 | 12.5% |
| 90 | 120 | 75% |
| 50 | 40 | 125% |
| 1 | 4 | 25% |
The table doubles as a check: if you compute 8 of 40 as anything but 20%, recheck that A is on top and B is the base.
7. A is the part, B is the whole
The phrasing "A of B" always puts A in the numerator. 8 of 40 is 8 ÷ 40, never 40 ÷ 8. When the question is written "what percentage is A of B", that word order is your formula: divide A by B, scale to 100. Swapping them is the one error that turns a small percent into a huge one, so let the wording set the division.
8. Let the wording set the division
The phrase "A of B" is a formula in words: A goes on top, B is the base. 8 of 40 is 8 ÷ 40, never 40 ÷ 8. When the question is "what percentage is A of B", trust that order and the division is decided before any arithmetic. Swapping them is the single error that turns a small percent into a huge one, so let the wording — not a guess — set the fraction. Once A is over B, scale to 100 and the percent is the share of the correct whole, exactly as the sentence asked, with no ambiguity about which number is the part.
9. The word 'of' is the clue
"What percentage is A of B" — the word "of" tells you B is the base, so A goes on top. 8 of 40 is 8 ÷ 40, never the reverse. The preposition is doing the math for you; trust it and the division is decided before you calculate. Swapping A and B is the single move that turns a small, sensible percent into a huge, wrong one, so let the "of" fix the fraction and then scale the result to 100 without second-guessing the order the sentence already gave you.
FAQ
Q: What percentage is A of B? (A ÷ B) × 100. 8 of 40 = (8 ÷ 40) × 100 = 20%.
Q: What percent is 8 of 40? (8 ÷ 40) × 100 = 20%.
Q: What if A is bigger than B? The percent exceeds 100%. 50 of 40 = 125%.
Q: Why did I get a huge number? You likely divided B by A. Keep A on top, B on the bottom.
Sources: Khan Academy percentage basics; Maths is Fun — Introduction to Percentages.
Disclaimer: General arithmetic. B must be the full whole in your context. This site is informational and not official.
Sources and references
- Khan Academy percentage basicshttps://www.khanacademy.org/math/pre-algebra/x31947de81e3f6453:percentages
- Maths is Fun — Introduction to Percentageshttps://www.mathsisfun.com/percentage.html