NPR / NCR Calculator
Use this tool to calculate permutations (nPr) and combinations (nCr) for non-negative integers.
What is nPr and nCr?
If you are counting possible outcomes, nPr and nCr are two of the most useful tools in combinatorics. They look similar, but they answer different questions.
- nPr (permutations): number of ways to arrange r items selected from n, where order matters.
- nCr (combinations): number of ways to choose r items from n, where order does not matter.
Think of it this way: if choosing captain and vice-captain from a team, order matters (permutation). If selecting a committee, order does not matter (combination).
Formulas
Permutation Formula (nPr)
nPr = n! / (n - r)!
This counts ordered selections. Example: from 5 people, selecting 2 roles (President, Secretary) gives 5P2 = 20 possible assignments.
Combination Formula (nCr)
nCr = n! / (r!(n - r)!)
This counts unordered selections. From the same 5 people, choosing any 2 for a committee gives 5C2 = 10 possible groups.
When to Use nPr vs nCr
- Use nPr when positions, rankings, or sequence matter.
- Use nCr when only the chosen set matters.
Quick Examples
- PIN code order matters → permutation idea.
- Lottery number set (ignoring draw order) → combination idea.
- Awarding gold/silver/bronze medals → permutation.
- Selecting 4 books to bring on a trip → combination.
Worked Example
Suppose n = 10 and r = 3.
- 10P3 = 10 × 9 × 8 = 720
- 10C3 = (10 × 9 × 8) / (3 × 2 × 1) = 120
The permutation value is larger because each selected group can be arranged in multiple orders.
Common Mistakes to Avoid
- Using nCr when the problem includes rankings, positions, or sequence.
- Forgetting that r cannot be larger than n in standard counting without repetition.
- Mixing factorial arithmetic (especially with large values) and getting overflow in calculators.
Practical Applications
You can use nPr and nCr in many real settings:
- Probability and statistics problems
- Scheduling and seat arrangements
- Team and committee selection
- Cryptography and code-space analysis
- Game design and puzzle generation
FAQ
Can n and r be decimals?
No. In this calculator, n and r are whole numbers only.
What if r = 0?
There is exactly one way to choose nothing, so nC0 = 1. Also, nP0 = 1.
Why are results sometimes huge?
Factorial-based growth is very fast. Even moderate values of n produce very large counts. This calculator uses integer arithmetic to preserve exact values.
Final Note
If you remember one rule, make it this: order matters = nPr, order does not matter = nCr. Use the calculator above to quickly compute both values and verify your homework, exam prep, or project work.