Exact answers for huge numbers, with steps
Permutation and Combination CalculatornPr, nCr, Repetition, Lists & Word Arrangements
Solve any counting problem in one place. Enter n and r, and this permutation and combination calculator gives nPr, nCr and both repetition cases at once, with exact answers and step-by-step working. It can also list every arrangement of your own items and count the ways to arrange the letters of any word.
- 4 formulas at once
- Exact results to thousands of digits
- Live Pascal's triangle
- 3 tools in one
Try an example
Order matters? Use a permutation. Order does not matter? Use a combination. Exact results work for n up to 5,000.
Step-by-step working
nPrOrder matters, no repeatsnCrOrder does not matter, no repeatsnʳOrder matters, repeats allowed(n+r−1)CrOrder does not matter, repeats allowedShows up to 2,000 results. Duplicate items are treated as different items.
Try a word
Working
Permutation and combination formulas
Both permutations and combinations count ways to pick r items from n. The only question is whether order matters. In a permutation, ABC and CBA are different. In a combination, they are the same group, so there are fewer combinations than permutations.
Permutation
nPr = n! ÷ (n − r)!Combination
nCr = n! ÷ (r! × (n − r)!)Link between them
nPr = nCr × r!Permutation with repetition
nʳCombination with repetition
(n + r − 1)! ÷ (r! × (n − 1)!)Repeated letters
n! ÷ (a! × b! × c! …)The exclamation mark means factorial: 5! = 5 × 4 × 3 × 2 × 1 = 120, and 0! is defined as 1.
Which formula should I use?
Ask two questions: does the order matter, and can an item be used more than once? The answers point to one of four formulas.
| Situation | Order matters? | Repeats? | Formula | Answer |
|---|---|---|---|---|
| Gold, silver, bronze from 8 runners | Yes | No | 8P3 | 336 |
| Pick 6 lottery numbers from 49 | No | No | 49C6 | 13,983,816 |
| 4-digit PIN using 0 to 9 | Yes | Yes | 10⁴ | 10,000 |
| 3 scoops from 5 ice cream flavours | No | Yes | 7C3 | 35 |
| 5-card poker hand from 52 cards | No | No | 52C5 | 2,598,960 |
Memory trick: Permutation is about Position, and Combination is about Choosing a group.
More than an nCr calculator
Most calculators return one rounded number. This one shows all four answers, keeps every digit and explains how it got there.
Four answers at once
nPr, nCr and both repetition cases appear together, so you can see which one fits.
Exact big numbers
Results keep every digit, even with thousands of them, along with scientific notation.
Step-by-step working
See the formula, the cancelled factorials and the final multiplication, ideal for homework.
Pascal's triangle
The matching nCr value lights up in Pascal's triangle for n up to 15.
Combination generator
List every combination or permutation of your own items, then copy the list.
Word arrangements
Count distinct arrangements of any word, with repeated letters handled automatically.
How to use the permutation and combination calculator
Enter n
Type the total number of items you can choose from.
Enter r
Type how many items you pick or arrange each time.
Pick the answer
Read the card that matches your problem: order matters or not, repeats allowed or not.
Check the steps
Follow the working to learn the method, then list the results if the numbers are small.
Working out odds next? Use the probability calculator, or simplify the resulting fraction with the fraction calculator.
Benefits and exam tips
Check homework answers
Compare your working against the step-by-step solution to find exactly where an error crept in.
Cancel before multiplying
For nCr, cancel the larger factorial in the denominator first. It keeps the numbers small.
Use symmetry
nCr equals nC(n−r). So 20C18 is the same as 20C2, which is much quicker to work out.
Read the question twice
Words like arrange, order, rank and position mean permutation. Select, choose, team and group mean combination.
Verify with small lists
Use the list generator on a small case to confirm that your reasoning is right before scaling up.
Plan real choices
Count menu options, team line-ups, passwords or tournament pairings in seconds.
Permutation and combination FAQs
What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters, such as a race podium. A combination counts groups where order does not matter, such as a lottery ticket. For the same n and r, there are always at least as many permutations as combinations.
What is nCr?
nCr is the number of ways to choose r items from n when order does not matter. It equals n factorial divided by r factorial times (n minus r) factorial. For example, 10C3 is 120.
What is nPr?
nPr is the number of ways to arrange r items chosen from n when order matters. It equals n factorial divided by (n minus r) factorial. For example, 10P3 is 10 times 9 times 8, which is 720.
How do I calculate combinations with repetition?
Use (n plus r minus 1) choose r. For example, choosing 3 scoops from 5 flavours with repeats allowed gives 7C3, which is 35 ways.
How many ways can the letters of MISSISSIPPI be arranged?
MISSISSIPPI has 11 letters with I four times, S four times and P twice. The answer is 11! divided by (4! times 4! times 2!), which is 34,650 distinct arrangements.
Why is 0! equal to 1?
There is exactly one way to arrange zero items, which is to do nothing. Defining 0! as 1 also keeps formulas like nCn and nC0 equal to 1.
Can r be larger than n?
Without repetition, no. You cannot pick more distinct items than you have, so nPr and nCr are 0. With repetition, r can be larger than n, for example a 6-digit PIN uses only 10 digits.
How many 4-digit PIN codes are possible?
Each of the 4 positions can be any of 10 digits, and digits can repeat, so there are 10 to the power 4, or 10,000 possible PIN codes.
Count anything with confidence
From exam questions to lottery odds, this permutation and combination calculator gives exact answers with clear working. Try your own numbers, list the results and master counting in minutes.