Permutation and Combination Calculator
The permutation and combination calculator works out nPr and nCr from n and r. A permutation counts arrangements where order matters; a combination counts selections where it does not, so 5 cards from 52 give 2,598,960 hands.
Sources: OpenStax Precalculus 2e, Wikipedia Updated
Choosing 3 from 10
nCr = 120
nPr = 720
- Combinations (order does not matter)
- 120
- Permutations (order matters)
- 720
Show steps Here’s how we got it
Decide whether order matters
Order matters → permutation (nPr)
Order does not matter → combination (nCr)
Picking a president and a deputy is a permutation. Picking two people for a committee is a combination.
Count the permutations
nPr = n!/(n − r)! = 10!/7!
= 10 × 9 × 8 = 720
Everything from 7 down cancels, leaving the top 3 factors.
Divide by r! to remove the different orders
nCr = n!/r!(n − r)! = nPr/r! = 720/6 = 120
Each group of 3 items can be arranged in 3! = 6 orders, and a combination counts them once.
Permutation and combination formulas
n is the number of items to choose from and r is the number chosen. The exclamation mark is a factorial: n! = n × (n − 1) × … × 2 × 1, and 0! = 1. These are the formulas in OpenStax Precalculus.
With repetition allowed, ordered results are n to the power r, which the exponent calculator works out step by step.
| Order matters | Order does not matter | |
|---|---|---|
| No repetition | ||
| Repetition allowed |
How to calculate nCr: 5-card hands from a 52-card deck
How many 5-card hands can be dealt from a standard 52-card deck? The order of the cards in a hand does not matter, so this is a combination.
Decide whether order matters
Order matters → permutation (nPr)
Order does not matter → combination (nCr)
Picking a president and a deputy is a permutation. Picking two people for a committee is a combination.
Count the permutations
nPr = n!/(n − r)! = 52!/47!
= 52 × 51 × 50 × 49 × 48 = 311,875,200
Everything from 47 down cancels, leaving the top 5 factors.
Divide by r! to remove the different orders
nCr = n!/r!(n − r)! = nPr/r! = 311,875,200/120 = 2,598,960
Each group of 5 items can be arranged in 5! = 120 orders, and a combination counts them once.
Answer: nCr = 2,598,960 nPr = 311,875,200
So the chance of being dealt one particular hand is 1 in 2,598,960. To see the actual groups for a short list instead of counting them, use the all possible combinations generator. More counting and data tools are on the statistics calculators page.
Permutation and combination practice question
Eight runners are in a race. In how many ways can the gold, silver and bronze medals be awarded? And how many different groups of three medal winners are possible?
Check your answer
Answer: nCr = 56 nPr = 336
Decide whether order matters
Order matters → permutation (nPr)
Order does not matter → combination (nCr)
Picking a president and a deputy is a permutation. Picking two people for a committee is a combination.
Count the permutations
nPr = n!/(n − r)! = 8!/5!
= 8 × 7 × 6 = 336
Everything from 5 down cancels, leaving the top 3 factors.
Divide by r! to remove the different orders
nCr = n!/r!(n − r)! = nPr/r! = 336/6 = 56
Each group of 3 items can be arranged in 3! = 6 orders, and a combination counts them once.
Permutation and Combination Calculator: FAQ
What is the difference between a permutation and a combination?
In a permutation the order matters, so ABC and BAC count as two different results. In a combination the order does not matter, so they count as one. Choosing a president, a deputy and a treasurer from 10 people is a permutation. Choosing 3 people for a committee is a combination.
How do you calculate nCr?
nCr = n! ÷ (r! × (n − r)!). For 10 choose 3: 10 × 9 × 8 = 720 arrangements, divided by 3! = 6 orders of each group, gives 120 combinations.
How do you calculate nPr?
nPr = n! ÷ (n − r)!, which is the product of the r largest numbers up to n. For 10 and 3 it is 10 × 9 × 8 = 720.
Why is nPr always at least as big as nCr?
Each combination of r items can be put in r! different orders, and each order is a separate permutation. So nPr = nCr × r!.
What changes when repetition is allowed?
With repetition, an item can be picked more than once. The number of ordered results is n to the power r. The number of unordered results is (n + r − 1)! ÷ (r! × (n − 1)!). A 4-digit PIN from the digits 0 to 9 is an ordered choice with repetition: 10⁴ = 10,000.
How do I list the combinations instead of counting them?
Use the combinations generator, which writes out every combination of a list of items.
Sources
- OpenStax Precalculus 2e, 11.5 Counting Principles — permutations, combinations and the formulas for nPr and nCr (checked October 16, 2026)
- Wikipedia: Combination — combinations with and without repetition (checked October 16, 2026)