Permutation and Combination Calculator
Calculate permutations (nPr) and combinations (nCr), exact even for large numbers.
Runs in your browser — nothing is sent or saved.
How to use the permutation and combination calculator
- Enter n, the total number of items.
- Enter r, how many you choose.
- Read the combinations (nCr) and permutations (nPr).
- Copy the link to save or share it.
Permutations versus combinations
The difference is whether order matters. As an nCr calculator and nPr calculator in one, it covers both. A permutation counts arrangements where order matters, so choosing 3 runners for gold, silver, and bronze from 8 is a permutation. A combination counts selections where order does not matter, so choosing 3 winners from 8 with no ranking is a combination. Because permutations count each ordering separately, nPr is always at least as large as nCr for the same n and r.
The formulas
Both are built from factorials. The number of permutations is nPr equals n! divided by (n minus r) factorial. The number of combinations is nCr equals n! divided by r! times (n minus r) factorial, which is nPr divided by r!. The phrase "n choose r" means exactly nCr. Note that 0! equals 1, so nC0 and nCn are both 1: there is one way to choose nothing and one way to choose everything.
Exact for large numbers
Factorials grow enormous fast, so a naive calculator overflows and returns infinity for something like 100 choose 50. This tool computes with exact big-integer arithmetic, so large results stay correct, and it switches to scientific notation only when a number is too long to show in full. If r is larger than n, both counts are 0, since you cannot choose more items than you have.
A worked example
How many ways can you choose 2 letters from A, B, C? For combinations, nCr with n equal to 3 and r equal to 2 is 3: AB, AC, BC. For permutations, nPr is 6, because each pair can be ordered two ways: AB and BA, AC and CA, BC and CB.
FAQ
What is the difference between a permutation and a combination?
Order. Permutations count ordered arrangements; combinations count unordered selections. For the same n and r, there are always at least as many permutations as combinations.
What does n choose r mean?
It is the number of combinations, nCr: how many ways to choose r items from n when order does not matter. For 5 choose 2, the answer is 10.
Why is 0! equal to 1?
By definition, so the formulas work out. It gives exactly one way to arrange or choose nothing, which keeps nC0 and nCn equal to 1.
Can it handle very large numbers?
Yes. It uses exact big-integer maths so results like 100 choose 50 do not overflow, showing scientific notation only when a value is very long.
Is my information private?
Yes. Everything is calculated in your browser and nothing you enter is uploaded or saved.