How a Combinations & Permutations Calculator Works
This calculator tells you how many ways you can select r items from a set of n items, both when order matters (permutations) and when it does not (combinations). Enter the total number of items and the number you want to choose, and both results appear at once, along with the formula filled in with your numbers.
Because counting problems grow extremely fast, the calculator uses exact big-integer arithmetic. That means results like the number of possible lottery draws or card hands are computed precisely rather than rounded.
The Formulas
- Combinations: C(n, r) = n! / (r! × (n − r)!)
- Permutations: P(n, r) = n! / (n − r)!
- Relationship: P(n, r) = C(n, r) × r!
When to Use Each
The key question is always the same: does the order of selection matter? If it does, use permutations; if it does not, use combinations.
- Combinations: choosing a 5-card poker hand, picking lottery numbers, or selecting a committee.
- Permutations: ranking the top 3 finishers in a race, arranging letters in a word, or assigning seats.
- Combinations are always less than or equal to permutations for the same n and r.
- When r equals n, P(n, n) equals n! and C(n, n) equals 1.
Frequently Asked Questions
What is the difference between a combination and a permutation?
A combination is a selection where order does not matter, while a permutation is an arrangement where order does matter. For example, choosing {A, B} is the same combination as {B, A}, but AB and BA are two different permutations.
Why are there always more permutations than combinations?
Each combination of r items can be arranged in r! different orders, and each of those orders is a distinct permutation. That is why P(n, r) equals C(n, r) multiplied by r!.
Can r be larger than n?
No. You cannot choose more items than are available, so r must be less than or equal to n. If you enter an r larger than n, the calculator will ask you to correct it.