Toolstia / Permutation and combination calculator
Permutation and combination calculator
Enter the number of items n and the number you pick r, and get both the number of permutations (where order matters) and combinations (where order does not matter). Results are exact whole numbers, not rounded approximations.
Enter whole numbers from 0 to 5000 for n and r.
Example: choosing 3 people from 10 for a team (order does not matter) gives 120 combinations. Choosing a president, a secretary and a treasurer from 10 (order matters) gives 720 permutations.
How it works
- Enter n and r.
- Tick Allow repeats if an item can be chosen more than once.
- Read nPr and nCr, and copy the exact value if you need it.
Permutations
nPr = n! ÷ (n − r)!. It counts the ordered arrangements of r items chosen from n. Choosing a first, second and third place from 10 runners gives 720 possibilities.
Combinations
nCr = n! ÷ (r! × (n − r)!). It counts the groups of r items, ignoring order. Choosing 3 people from 10 for a team gives 120 groups. Each group can be arranged in r! ways, which is why nPr = nCr × r!.
With repeats
If items can be reused, the number of ordered choices is n^r, and the number of unordered choices is the combination of n + r − 1 items taken r at a time.
Big numbers
Values are calculated with exact big-integer arithmetic. Long results are shortened on screen, with the number of digits shown, and the Copy button gives you the full number.
Questions
What if r is bigger than n?
Without repeats the answer is 0, because you cannot choose more items than you have.
How large can n be?
Up to 5000.
Is anything uploaded?
No. Your numbers stays in your browser and is never sent anywhere.