Combination & Permutation
Compute combinations (nCr) and permutations (nPr) for counting problems. Includes formulas, a lottery example and when order matters.
Results
nPr (permutations)
nCr (combinations)
You might also need
Educational estimates · not financial advice · free, no signup
Formula / how it works
nPr = n! ÷ (n − r)! (order matters). nCr = n! ÷ (r! × (n − r)!) (order does not matter). nCr = nPr ÷ r!.
Detailed guide
What it is, how to use it, how to read the numbers, common mistakes, a worked example, formulas, and FAQs.
What this calculator is
Counting problems turn on one question: does order matter? If you are picking a president, vice president and treasurer from ten people, order matters and you count permutations. If you are choosing a three-person committee, order does not matter and you count combinations. This calculator gives both numbers for a total of n items taken r at a time. Students use it for probability and discrete mathematics; analysts and game designers use it to size possibility spaces such as lottery draws, passwords and card hands. Factorials grow fast, so values can become huge, and very large inputs may exceed what a browser can represent exactly.
When to use / who it helps
- You need the number of ways to arrange r items out of n when order counts.
- You need the number of ways to choose r items out of n when order does not matter.
- You are computing the denominator of a probability in a lottery, card game or committee problem.
- You are checking a combinatorics homework answer.
- You want to see how quickly possibilities grow as n and r increase.
How to use
Steps
- Enter n, the total number of distinct items.
- Enter r, how many you pick; it must not exceed n.
- Read nPr for ordered arrangements.
- Read nCr for unordered selections.
- Divide a favourable count by the total count to get a probability.
- For repeated items or replacement, use different formulas; this tool assumes distinct items without repetition.
How to interpret results
- nPr is always at least nCr; they differ by a factor of r!, the number of orderings of the chosen items.
- nCr is symmetric: choosing r items to include is the same as choosing n − r to leave out.
- Counts rise rapidly; 52 choose 5 is already about 2.6 million.
- A probability is favourable outcomes divided by total outcomes, both counted the same way.
- If the numbers are enormous, expect rounding in the display.
Common mistakes & gotchas
- Using permutations when order does not matter, which overcounts by r!.
- Using combinations when order matters, which undercounts.
- Entering r greater than n, which has no valid arrangements.
- Forgetting that items are assumed distinct and unrepeated.
- Mixing up counting the favourable outcomes with the total outcomes.
Worked example
Worked example — 10 items taken 3 at a time
- Permutations: 10 × 9 × 8 = 720 ordered arrangements.
- Each group of 3 can be ordered 3! = 6 ways.
- Combinations: 720 ÷ 6 = 120 unordered selections.
- Lottery check: choosing 6 numbers from 49 gives 49C6 = 13,983,816 possible tickets, so one ticket wins with probability about 1 in 14 million.
Result: 10P3 = 720 and 10C3 = 120.
To load the form's own demo values, tap Try example above the Calculate button.
How to calculate / formula
nPr = n! ÷ (n − r)! (order matters). nCr = n! ÷ (r! × (n − r)!) (order does not matter). nCr = nPr ÷ r!.
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts ordered arrangements, a combination counts unordered selections. ABC and CBA are different permutations but the same combination.
What is nCr?
The number of ways to choose r items from n distinct items when order does not matter, also written as C(n, r) or "n choose r".
What does n! mean?
The product of all positive integers up to n, such as 5! = 120. By convention 0! = 1.
How many five-card poker hands are there?
52C5 = 2,598,960.
Can I use this when items repeat?
No. For repeated items or choices with replacement, other formulas such as n^r apply.
Why does the result sometimes show as a rounded number?
Factorials get very large and floating-point numbers lose exactness, so very big results are approximate.