Permutation and Combination Calculator
Enter n, the number of items, and r, the number you choose. You get permutations (order matters) and combinations (order does not), exact even for large numbers, and the versions with repeats.
A permutation counts different orders as different. A combination does not.
Worked examples
Card hands
n = 52, r = 5
2,598,960 combinations, 311,875,200 permutations
311,875,200 is 120 times 2,598,960.
A podium
n = 10, r = 3
720 permutations, 120 combinations
10 × 9 × 8 = 720.
About Permutation and Combination Calculator
A combination is a way of choosing items when the order does not matter, such as picking a hand of cards, a committee or lottery numbers. A permutation is a way of choosing when the order does matter, such as a podium of first, second and third place. The number of combinations of r from n is n! divided by r!(n - r)!, written nCr, and the number of permutations is n! divided by (n - r)!, written nPr. The permutation count is always r! times the combination count.
There are 2,598,960 possible five-card hands from a 52-card pack, and 311,875,200 ways to deal five cards in order. This page uses whole-number arithmetic, so even very large counts are exact, up to n of 20,000. It also gives the counts when items can be used more than once: n to the power of r ordered lists, and the number of combinations with repeats allowed, which is (n + r - 1) choose r. The formulas are shown so you can see how the answers are built.
How to use Permutation and Combination Calculator
- Enter n, the number of items you are choosing from.
- Enter r, the number you are choosing.
- Read the combinations and permutations in the large boxes.
- Look in the table for the versions where repeats are allowed.
Common uses
- Probability questions with cards, dice and lotteries
- Counting committee, team or seating choices
- Working out how many passwords or codes are possible
- Checking combinatorics homework
Frequently asked questions
What is the difference between a permutation and a combination?
In a permutation, order matters, so ABC and CBA are different. In a combination, order does not matter, so they count as one choice.
How many ways can I choose 6 from 49?
There are 13,983,816 combinations, which is the number of different lottery tickets for a 6 from 49 game.
What if r is bigger than n?
You cannot choose more different items than you have, so there are none. The page explains this, and still gives the counts with repeats allowed.
What does with repeats mean?
It means an item can be chosen more than once, like digits in a PIN. Ordered choices with repeats number n to the power of r.
Why is nCr the same as nC(n - r)?
Choosing r items to take is the same as choosing n - r items to leave behind.