ToolLineup

Permutation & Combination Calculator

Count how many ways r items can be chosen from a set of n. The hard part of this problem is never the arithmetic — it is deciding whether the order matters and whether an item can be picked twice — so all four answers are shown at once: combinations, permutations, and each of those again with repetition allowed. Every result is an exact whole number however large it gets, computed multiplicatively rather than by dividing one factorial by another, which is what stops the intermediate values overflowing long before the answer would. That means 100 choose 50 comes out in full rather than as a rounded value in scientific notation.

How it works

Choose r items from a set of n. The two questions to settle first: does the order they come out in matter, and can the same item be picked twice? Those two answers pick the formula — all four are shown below so you can see what the other choices would have given.

Answers are exact whole numbers however large they get, so 100C50 is not rounded off into scientific notation.

Try:
Combinations nCr — 52 choose 5
2,598,960

All four ways of counting

The same n and r under each of the four rules.

Combinations nCr
2,598,960
the option you selected
Permutations nPr
311,875,200
Combinations with repetition
3,819,816
Permutations with repetition
380,204,032

Details

Digits in the answer
7
Formula used
n! ÷ (r! × (n − r)!)
52!
8.065817 × 10^67
5!
120
(52 − 5)!
2.586232 × 10^59

Frequently asked questions

What is the difference between a permutation and a combination?

Order. A permutation counts arrangements, so ABC and CBA are different; a combination counts selections, so they are the same. Picking a race podium is a permutation; picking a poker hand is a combination.

When should I allow repetition?

When the same item can be chosen more than once — a four-digit PIN can repeat digits, whereas dealing cards from a deck cannot.

How large can n and r be?

Up to 100,000 each. Answers are exact whole numbers of unlimited length, so a result with hundreds of digits is shown in full.

Why do I get an error when r is larger than n?

Without repetition you cannot choose more items than exist. Switch to one of the with-repetition modes and r may exceed n freely.

What is nCr used for?

Binomial coefficients, lottery and card probabilities, and any question of the form "how many ways can I pick k things from n" where the order of picking does not matter.

Is the calculation done on my device?

Yes. Nothing you enter is sent anywhere.

Related tools