Permutation Calculator
Calculate the number of distinct ordered arrangements of r items chosen from a set of n items. Essential for counting passwords, race rankings, scheduling sequences, and any problem where order matters.
About this calculator
A permutation counts the number of ways to arrange r items selected from n distinct items when the order of selection matters. The formula is P(n, r) = n! / (n − r)!, where n! (n factorial) is the product of all positive integers up to n. For example, P(5, 2) = 5! / 3! = (5 × 4 × 3 × 2 × 1) / (3 × 2 × 1) = 20. Permutations differ from combinations in that swapping the order of chosen items counts as a different arrangement. This formula is fundamental in probability theory, cryptography, competition mathematics, and scheduling problems where sequence is critical.
How to use
Suppose you want to arrange 3 athletes from a group of 10 on a podium (1st, 2nd, 3rd place). Enter n = 10 and r = 3. The calculator computes P(10, 3) = 10! / (10 − 3)! = 10! / 7! = (10 × 9 × 8) = 720. There are 720 distinct ordered ways to assign the top three places. Notice only the top r terms of n! need to be multiplied — everything below (n − r)! cancels out.
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts ordered arrangements — choosing A then B is different from choosing B then A. A combination counts unordered selections — A and B together count as just one group regardless of order. The permutation formula is P(n, r) = n! / (n − r)!, while the combination formula is C(n, r) = n! / (r! × (n − r)!). Every combination corresponds to r! permutations, which is why P(n, r) = C(n, r) × r!. Use permutations when sequence matters (passwords, rankings) and combinations when it does not (lottery draws, committee selection).
How do factorials grow and why does that matter for permutations?
Factorials grow extremely rapidly: 10! = 3,628,800 and 20! exceeds 2.4 × 10¹⁸. This explosive growth means that even modest values of n produce astronomically large permutation counts, which is why passwords and encryption keys become so secure with just a few extra characters. For large n and r, the direct factorial calculation is simplified by cancellation: P(n, r) = n × (n−1) × … × (n−r+1), requiring only r multiplications. This optimisation is what allows permutation calculators to handle large inputs efficiently.
When should I use permutations instead of the multiplication counting principle?
The multiplication counting principle states that if event A can happen in m ways and event B in n ways, the sequence A then B can happen in m × n ways. Permutations are a specific application of this principle where you draw without replacement from the same pool of n items. If each selection reduces the available choices (no repetition allowed), use P(n, r) = n! / (n−r)!. If items can repeat — like a PIN where each digit can be 0–9 regardless of previous digits — use the multiplication principle directly: 10^r for r digits from 10 choices.