About the Permutation and Combination Calculator
Many counting questions come down to one decision: does the order of the chosen items matter? Arranging runners on a podium is a permutation, because gold-silver-bronze differs from bronze-silver-gold. Choosing three people for a committee is a combination, because the same three people form the same committee in any order.
This calculator covers the four standard cases: permutations and combinations without repetition, permutations with repetition (like PIN codes) and combinations with repetition (like choosing scoops of ice cream from a set of flavours). It works with exact whole numbers, so even very large counts such as the number of poker hands are shown in full rather than rounded.
What are permutations and combinations?
A permutation is an ordered arrangement of items chosen from distinct items. The count is , the product of the first factors of . A combination is an unordered selection, counted by .
The two are linked: every combination of items can be ordered in ways, so . The calculator uses this identity as a check on every nPr and nCr answer.
How to use the Permutation and Combination Calculator
- Choose what to count: combinations, permutations, permutations with repetition or combinations with repetition.
- Enter the total number of items n.
- Enter the number of items chosen r.
- Press Calculate.
- Read the count, the formula used and the cancellation steps.
Formulas
Permutations
Combinations
Permutations with repetition
Combinations with repetition
Worked example: C(10, 3)
The example finds , the number of ways to choose 3 items from 10 when order does not matter. First count ordered choices: .
Each group of three appears times in that list, once for every ordering, so . The check confirms .
The solution below is generated by the same engine that powers the calculator above.
Final answer
How we read your problem
Combinations nCr (order does not matter)
Step-by-step solution
Use the combination formula
Divide the permutations by r! because order does not matter
Formulas used
Combinations nCr (order does not matter)
There are 120 ways to choose 3 items from 10 when order does not matter.
Verification
- Check: P(10, 3) = C(10, 3) × 3! = 120 × 6 = 720.
Detailed explanation
Why the factorials cancel
Writing looks like it requires huge numbers, but most factors cancel. For only remains: eight choices for first place, seven for second and six for third. The calculator shows this shortcut instead of computing full factorials.
Combinations divide out the orderings of each selection. That is why is always smaller than or equal to , and why : choosing which items to take is the same as choosing which to leave behind.
Counting with repetition
When items can be reused and order matters, each of the positions has options, giving . A four-digit PIN has possibilities.
When items can be reused but order does not matter, the stars-and-bars method gives . Choosing 4 scoops from 3 flavours, with repeats allowed, can be done in ways. In this mode may be larger than .
Large numbers and edge cases
The number of five-card poker hands is , and the calculator keeps such answers exact using whole-number arithmetic. By convention , since there is exactly one way to choose nothing.
Without repetition you cannot choose more items than exist. Asking for produces a clear message suggesting a repetition mode or a smaller , rather than a meaningless zero.
Combinations and Pascal's triangle
The values form Pascal's triangle, where each entry is the sum of the two above it: . The identity has a counting explanation. Fix one particular item; every selection either includes it, leaving more to choose from the other , or excludes it, leaving all to choose from the other .
The same numbers are the coefficients in the binomial expansion , which is why they are called binomial coefficients. Adding a full row gives , the total number of subsets of an -item set, since each item is either in or out.
Common mistakes
- Using permutations when order does not matter, which overcounts by a factor of .
- Using combinations for arrangements such as passwords, rankings or seatings.
- Forgetting that repetition changes the formula entirely.
- Computing full factorials by hand instead of cancelling, which invites arithmetic errors.
- Choosing r larger than n in a problem where items cannot repeat.
Tips
- Ask 'would swapping two chosen items give a different outcome?' If yes, use permutations.
- Use to simplify calculations by hand.
- Break complex problems into stages and multiply the counts for each stage.
- Divide a count by the total number of outcomes to turn it into a probability.
- Use the probability calculator's binomial mode when you need probabilities of k successes rather than raw counts.
- Estimate first: if a selection count comes out larger than the matching arrangement count, something has gone wrong.
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts ordered arrangements; a combination counts unordered selections. Choosing 3 of 10 items gives 720 permutations but only 120 combinations.
How do you calculate nCr?
Use n! ÷ (r!(n − r)!). In practice, multiply the first r factors of n! and divide by r!. For C(10, 3) that is 720 ÷ 6 = 120.
How do you calculate nPr?
Multiply the first r factors of n!: P(8, 3) = 8 × 7 × 6 = 336.
How many five-card poker hands are there?
C(52, 5) = 2,598,960, because the order in which you receive the cards does not matter.
What does 'with repetition' mean?
Each item can be chosen more than once, like digits in a PIN. Ordered selections with repetition number nʳ; unordered ones number C(n + r − 1, r).
Why is C(n, 0) equal to 1?
There is exactly one way to choose no items: the empty selection. The same reasoning gives 0! = 1.
Can r be bigger than n?
Only when repetition is allowed. Without repetition the calculator explains that you cannot choose more items than there are.
Count your arrangements
Choose a counting mode above and enter n and r to get the exact number with steps.