Permutation and Combination Calculator
There are 2,598,960 different 5-card hands in a 52-card deck (52C5). Arranging 5 of 10 items in order gives 30,240 ways (10P5).
How to use
- Enter n, the total number of items, and r, how many you choose.
- Combinations C(n, r) is the main result, where order does not matter. Permutations P(n, r) is listed below it, where order matters.
- Large results switch to scientific form with the digit count. Copy result copies the full exact number.
How it works
Permutations: P(n, r) = n! ÷ (n − r)! = n × (n − 1) × ... × (n − r + 1). Use it when the order of the chosen items matters.
Combinations: C(n, r) = n! ÷ (r! × (n − r)!) = P(n, r) ÷ r!. Use it when order does not matter.
With repetition allowed, permutations are n^r and combinations are C(n + r − 1, r).
The tool uses exact integer arithmetic, not floating point, so even 1000! is computed in full without rounding. n and r must be whole numbers, 0 ≤ r ≤ n ≤ 1000.
Permutation or combination
| Question | Order matters? | Use |
|---|---|---|
| Ways to pick a president, vice president and treasurer from 10 people | Yes | P(10, 3) = 720 |
| Ways to choose a committee of 3 from 10 people | No | C(10, 3) = 120 |
| Possible 6-number lottery tickets from 49 numbers | No | C(49, 6) = 13,983,816 |
| Five-card poker hands from 52 cards | No | C(52, 5) = 2,598,960 |
FAQ
What is the difference between a permutation and a combination?
A permutation counts arrangements, so ABC and CBA are different. A combination counts selections, so they are the same group.
Why is 0! equal to 1?
There is exactly one way to arrange nothing, and it keeps formulas such as C(n, 0) = 1 and C(n, n) = 1 consistent.
Why must r not be larger than n?
You cannot pick more distinct items than you have, so P and C are not defined. With repetition allowed that limit would not apply, but this tool keeps r ≤ n for all four results.
How big can the numbers get?
n up to 1000, which gives numbers with thousands of digits. They are shown in scientific form, and Copy result copies the full number for C(n, r).