Calculate permutations (nPr), combinations (nCr), and factorials instantly.
A Permutation and Combination Calculator computes the number of ways to arrange or select items from a set, distinguishing between situations where order matters (permutations) and situations where it doesn't (combinations). This tool is fundamental in probability, statistics, and combinatorics, used for calculating odds, planning arrangements, and solving counting problems across many practical and academic contexts.
Permutations (order matters): P(n,r) = n! / (nār)!, calculating the number of ways to arrange r items from a set of n distinct items. Combinations (order doesn't matter): C(n,r) = n! / [r!(nār)!], calculating the number of ways to select r items from n without regard to arrangement order, where n! (factorial) means multiplying all positive integers up to n.
Enter the total number of items (n) and how many you want to select or arrange (r), and choose whether order matters (permutation) or doesn't (combination). The calculator returns the total count of possible arrangements or selections based on these inputs.
Example 1: The number of ways to arrange 3 people from a group of 5 in a specific order (a permutation, since order matters for positions like 1st, 2nd, 3rd place) is P(5,3) = 5!/(5-3)! = 120/2 = 60.
Example 2: The number of ways to choose 3 people from a group of 5 for a committee (a combination, since order doesn't matter for committee membership) is C(5,3) = 5!/(3!Ć2!) = 120/(6Ć2) = 10.
Permutations count arrangements where the order or sequence matters (like race finishing positions), while combinations count selections where order is irrelevant (like choosing team members), which is why permutations always produce a larger or equal count compared with combinations for the same n and r values.
Since combinations treat different orderings of the same group as identical, multiple permutations collapse into a single combination, specifically r! permutations correspond to each single combination, explaining the mathematical relationship C(n,r) = P(n,r)/r!.
Factorial (n!) represents the total number of ways to arrange all n items in a sequence, forming the foundational building block for both permutation and combination formulas, since both concepts ultimately derive from counting arrangements of a full or partial set.
Use permutations whenever the specific order or position matters, such as assigning first, second, and third place winners, passwords with specific character sequences, or scheduling tasks in a particular order.
Lottery odds calculations typically use combinations, since the order in which numbers are drawn doesn't matter for winning, only which specific numbers were selected, making combination formulas essential for accurately calculating the astronomically low odds of winning most lottery games.
Since factorial growth is extremely fast (multiplying together an increasing sequence of numbers), even modest increases in the total number of items n can produce enormous permutation and combination counts, a phenomenon known as combinatorial explosion.
The standard formulas here assume distinct items without repetition; permutations or combinations with repetition allowed use different, though related, formulas, so it's important to identify whether repetition is permitted in your specific problem before applying the standard formula.
Understanding how many possible arrangements or combinations exist for a given set of elements underlies password strength calculations, algorithm complexity analysis, and various cryptographic key-space calculations, making combinatorics a foundational mathematical tool across computer science.
Many probability problems involve dividing a combination or permutation count representing favorable outcomes by the total possible combinations or permutations, forming the basic structure of classical probability calculations in games, card draws, and similar scenarios.
By mathematical convention and consistency with the combinatorics formulas, there is exactly one way to arrange zero items (doing nothing), which is why 0! is defined as 1 rather than 0, keeping the permutation and combination formulas mathematically consistent.
Card game odds, such as the probability of drawing a specific poker hand, rely heavily on combination calculations to count how many ways a particular hand can occur out of the total possible combinations of cards from the deck.
Permutation calculations directly answer how many distinct ways a group can be seated or scheduled when order matters, a practical application for event planners arranging tables or coordinators building rotation schedules.