Permutations
Ordered arrangements.
What does Permutations mean?
A permutation is an ordered arrangement of items selected from a set. Unlike combinations, the order in which items are arranged matters in permutations. For example, the arrangements ABC and BAC are considered different permutations. Permutations are used to count the number of ways to arrange r items out of a total of n items, and are fundamental in probability, statistics, and combinatorics.
How to calculate Permutations
Permutations are calculated with the formula: nPr = n! / (n - r)!, where n is the total number of items and r is the number of items being arranged. The exclamation mark (!) denotes factorial — the product of all positive integers up to that number. For example, P(10, 3) = 10! / (10 - 3)! = 10! / 7! = 10 × 9 × 8 = 720. This means there are 720 different ways to arrange 3 items from a set of 10.
FAQ
Permutations count ordered arrangements where the sequence matters (e.g., a password or race finishing order). Combinations count unordered selections where the sequence does not matter (e.g., choosing team members). For the same n and r, the number of permutations is always greater than or equal to the number of combinations.
Use permutations whenever the order of selection matters. Common examples include: arranging books on a shelf, assigning ranked positions (1st, 2nd, 3rd), creating PIN codes or passwords, and determining the order of speakers at an event.
0! equals 1 by definition. This is a mathematical convention that ensures formulas like nPr work correctly when r equals n. For example, P(5, 5) = 5! / 0! = 120 / 1 = 120, which correctly gives the number of ways to arrange all 5 items.
Yes. When r equals n, you are arranging all items in the set. The result is simply n! (n factorial). For example, P(4, 4) = 4! / 0! = 24, meaning there are 24 ways to arrange 4 items in a line.
JavaScript numbers can only accurately represent values up to about 1.8 × 10^308. Since 170! is approximately 7.26 × 10^306, it is the largest factorial that fits within this range. Values of 171! and above exceed the maximum representable number and would return Infinity.
Related calculators
- Combinations— Unordered selections.
- Factorial— Product of descending integers.
- Probability— Likelihood of outcome.
- Expected Value— Weighted average outcome.