What Are Permutations and Combinations?
Permutations and combinations are methods of counting the number of ways to select or arrange items from a set. The key distinction between them is whether the order of selection matters. When order matters, you use permutations. When only the selection matters and order is irrelevant, you use combinations. These concepts are central to probability theory, statistics, and many fields including cryptography, genetics, and logistics.
What This Calculator Does
Enter n (the total number of items available) and r (the number of items you want to select or arrange). The calculator computes both the permutation P(n,r) and combination C(n,r) simultaneously, along with the factorials used in each calculation.
Inputs Required
- n: The total number of distinct items in the set
- r: The number of items to select or arrange (r must be less than or equal to n)
Outputs Provided
- P(n,r): Number of permutations (order matters)
- C(n,r): Number of combinations (order does not matter)
- Factorials: n!, r!, and (n-r)! where applicable
How the Calculation Works
Both formulas use factorials. The factorial of a number n (written n!) is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120.
Permutation: P(n,r) = n! / (n-r)!
Combination: C(n,r) = n! / (r! x (n-r)!)
The combination formula divides the permutation result by r! to remove duplicate arrangements of the same group. For example, choosing {A, B, C} from a set is the same combination whether you pick A first, B first, or C first. The r! factor removes all those equivalent orderings.
How to Use the Calculator
- Enter n, the total number of items in your set
- Enter r, the number of items you want to select or arrange
- Read P(n,r) for order-sensitive problems and C(n,r) for selection problems
- Review the factorials shown to understand how the result was derived
Example Calculation
How many ways can you arrange 3 books chosen from a shelf of 10?
- n = 10, r = 3
- P(10,3): 10! / 7! = 10 x 9 x 8 = 720 arrangements
How many ways can you choose 3 books from 10 to take on a trip (order of selection does not matter)?
- C(10,3): 10! / (3! x 7!) = 720 / 6 = 120 selections
There are 720 ordered arrangements but only 120 distinct groups of 3 books, because each group of 3 can be arranged in 3! = 6 different orders.
Real World Scenarios
Lottery and Gambling
In a lottery where you choose 6 numbers from 49, the order of the numbers does not matter. This is a combination problem: C(49,6) = 13,983,816. That is the number of possible tickets, which directly determines your odds of winning.
Team Selection
A manager needs to select 5 employees from 20 for a special project. The order of selection does not matter, only who is chosen. C(20,5) = 15,504. This is how many distinct teams are possible.
Password and Security
A security system requires a 4-digit PIN from the digits 0-9 where each digit can only be used once and order matters. P(10,4) = 5,040 possible PINs. Understanding this helps security teams assess password strength.
Why This Calculation Matters
Counting problems underpin probability. Without knowing how many ways an event can occur, you cannot calculate the probability of any specific outcome. Permutations and combinations are used in probability, genetics, computer science, cryptography, and statistical sampling to count possible outcomes accurately.
Common Mistakes to Avoid
- Using permutations when order does not matter: If the problem asks how many groups or committees can be formed, use combinations. Permutations overcount by treating each rearrangement as a different result
- Forgetting that 0! = 1: The factorial of zero is defined as 1, not 0. This is required for the formulas to work correctly when r = n or r = 0
- Allowing r to exceed n: You cannot choose more items than are available. P(n,r) and C(n,r) are zero when r is greater than n
- Confusing with replacement: These formulas apply to sampling without replacement. If items can be repeated, different counting rules apply