What is a permutation?
A permutation counts the ways to arrange things when the order matters. If you pick 3 people out of 10 to fill the roles of captain, vice-captain and wicketkeeper, the order matters — the same three people in different roles are different outcomes. The number of ways is P(10, 3) = 10 × 9 × 8 = 720. That is what this calculator works out, along with the combination count and the factorial, so you can compare all three at a glance.
The difference between a permutation and a combination is the whole point. A combination counts groups where order does not matter: picking any 3 of 10 people for a committee is C(10, 3) = 120 ways, because the same three people in any order are one committee. The permutation count is always bigger — 720 against 120 here — because each group of 3 can be arranged in 3! = 6 orders, and 120 × 6 = 720. If the question cares about order, you need a permutation; if it does not, you need a combination.
This calculator takes n, the number of items to choose from, and r, the number you pick, and returns P(n, r), C(n, r) and n! instantly. The results update live as you type. Everything runs in your browser, so nothing is uploaded and nothing is stored. It is built for students working through counting problems, and for anyone who needs a quick answer to a real arranging or ordering question.
The permutation formula, explained with real numbers
The formula is P(n, r) = n! ÷ (n − r)!. In practice you rarely need the full factorials: P(10, 3) is 10! ÷ 7!, and the 7! cancels out, leaving 10 × 9 × 8 = 720. That is the pattern — start at n and multiply r numbers, counting down. P(10, 3) is three multiplications; P(10, 10) is ten of them, and equals 10! itself, 3,628,800.
The combination formula is C(n, r) = n! ÷ (r! × (n − r)!), which is the permutation count divided by r!, the number of ways to order the chosen items. C(10, 3) is 720 ÷ 6 = 120. The calculator computes these by iterative multiplication rather than by dividing huge factorials, which keeps the arithmetic exact for the sizes people actually use.
A factorial is the product of all the whole numbers from 1 up to n: 5! is 1 × 2 × 3 × 4 × 5 = 120, and 10! is 3,628,800. Factorials grow extremely fast — 20! is already about 2.4 × 10¹⁸, and 170! is near the largest number a computer can store as an ordinary floating-point value. This calculator caps n at 170 for that reason; above it, the results show a dash rather than a wrong number.
The n and r inputs — what people get wrong
The most common mistake is swapping n and r. n is the pool you choose from, and r is how many you pick. Choosing 3 people out of 10 is n = 10, r = 3, giving P = 720. Typing n = 3, r = 10 instead is meaningless — you cannot pick 10 people out of 3 — and the calculator shows a dash for that. If you see a dash, check which box holds the bigger number: n must be at least as large as r.
The second mistake is using a permutation when the question is really about combinations. Ask yourself: if I swap two of the chosen items, do I have a different outcome? If the three chosen people become captain, vice-captain and wicketkeeper, swapping them changes the outcome, so it is a permutation. If they just form a committee, swapping changes nothing, so it is a combination. The calculator shows both numbers side by side, so you can see the difference — 720 against 120 for n = 10, r = 3 — and pick the one the question actually asks for.
The third mistake is forgetting the edge cases. P(n, 0) is 1, not 0: there is exactly one way to pick nothing. P(n, n) is n!, because arranging all n items is a full permutation. And P(n, 1) is just n, since there are n choices for a single pick. A factorial calculator is handy for checking the n! row, and a probability calculator is the next step once you have the counts and want the chance of a particular outcome.
A worked example: P(10, 3) = 720
Work through the default example on this page: n = 10, r = 3. For the first pick there are 10 choices. For the second pick, one item is gone, so there are 9 choices. For the third pick there are 8 choices. Multiply: 10 × 9 × 8 = 720. That is P(10, 3), and it is the main result this calculator shows.
The combination count for the same inputs is 720 ÷ 3! = 720 ÷ 6 = 120. Each group of 3 can be ordered in 6 ways, so the 720 permutations collapse into 120 distinct groups. The factorial row shows 10! = 3,628,800, which is the number of ways to arrange all ten items — far more than the 720 ways to arrange just three of them.
Now try a smaller case to feel the pattern: n = 5, r = 2. The first pick has 5 choices, the second has 4, so P(5, 2) = 5 × 4 = 20. The combination count is 20 ÷ 2! = 10, and 5! is 120. Twenty permutations, ten combinations, one factorial — three numbers, one idea. Change r to 5 and the permutation count jumps to 120, which is 5! itself, because arranging all five items is the full factorial.
Where permutations show up in real life
Passwords and PINs are permutations. A 4-digit PIN with no repeated digits has P(10, 4) = 10 × 9 × 8 × 7 = 5,040 possibilities — that is why a 4-digit PIN is not very strong, and why banks add a card and a lockout. Allow repeats and the count becomes 10⁴ = 10,000, a different calculation, but the ordering idea is the same: the digits 1-2-3-4 and 4-3-2-1 are different PINs.
Sport and competitions run on permutations. The number of ways to award gold, silver and bronze among 10 runners is P(10, 3) = 720, because the order of the medals matters. A raffle that draws three names in order for three different prizes is the same problem. A draw that just picks three winners for identical prizes is a combination instead — 120 ways, not 720.
Scheduling is the quietest use. The number of ways to order 5 jobs on a machine is 5! = 120, and factories and delivery companies search through orderings like these to find the fastest schedule. The count grows so fast that checking every ordering becomes impossible beyond a dozen items, which is why scheduling software uses clever shortcuts instead of brute force. An average calculator can tell you the mean time per job, but only permutations tell you how many schedules exist at all.
Permutation calculator vs combination calculator
These two tools answer two different questions, and the calculator on this page shows both answers so you can compare them. P(n, r) counts arrangements where order matters; C(n, r) counts groups where it does not. For n = 10, r = 3, the answers are 720 and 120. The ratio between them is always r! — the number of ways to order the r chosen items — so P(n, r) = C(n, r) × r!.
Use a permutation when the positions are different: first, second and third place; president, secretary and treasurer; the first three letters of a code. Use a combination when the positions are identical: a committee, a team, a hand of cards. If you are unsure, imagine swapping two chosen items and ask whether anything changed. If nothing changed, it is a combination.
The factorial row is the bridge between the two. n! counts the arrangements of all n items, and both formulas are built from factorials: P(n, r) = n! ÷ (n − r)! and C(n, r) = n! ÷ (r! × (n − r)!). Knowing one formula and the r! relationship lets you get the other without memorising two separate expressions. A percentage calculator is useful when you want to express a count as a share of all possibilities — for example, 120 winning combinations out of 720 arrangements is about 16.67%.
Common permutation mistakes
The first mistake is using a permutation for a combination problem, which overcounts by a factor of r!. Picking a 3-person committee from 10 people is 120 ways, not 720 — the 720 counts each committee six times, once per ordering. Always ask whether the order matters before you pick the formula.
The second mistake is forgetting that the pool shrinks. After each pick, one item is gone, so the choices go 10, 9, 8 — not 10, 10, 10. Multiplying 10 × 10 × 10 = 1,000 counts arrangements with repeats, which is a different problem (a 3-digit code where digits can repeat). If repeats are allowed, say so clearly; the permutation formula assumes no repeats.
The third mistake is the factorial trap: computing n! and (n − r)! separately and then dividing. For n = 100, 100! is about 9.3 × 10¹⁵⁷, far beyond what most calculators display exactly, and the division can lose precision or overflow. The right way is to cancel first and multiply only the r terms — 100 × 99 × 98 for P(100, 3). This calculator does exactly that, by iterative multiplication.
The fourth mistake is treating P(n, r) as a probability. A count is not a chance. The chance of one particular arrangement is 1 divided by the count — 1 in 720 for a specific ordering of 3 out of 10. To turn counts into chances, divide by the total number of outcomes, which is what a probability calculation does.
How to use this permutation calculator
Type n, the size of the pool you are choosing from, and r, how many you pick. Both must be whole numbers, with r no larger than n, and n no larger than 170. The permutation count, the combination count and n! update live as you type, so you can watch how fast the numbers grow as you change either input.
Read the main result first: P(n, r), the number of ordered arrangements. The combination row underneath shows the same choice without order, and the factorial row shows n! for reference. If any row shows a dash, the inputs are out of range — usually r is larger than n, or n is above 170 — so adjust them and the results will appear.
Everything runs in your browser. No account, no sign-up, no data sent anywhere. Use it to check homework, to work out the odds in a game or a draw, or to see how quickly arrangements multiply. If you need to compare several scenarios, a scientific calculator is handy for the follow-up arithmetic, and the formula is shown on this page so you can check the result by hand.