Permutation & Combination Calculator
Calculate nPr and nCr instantly with step-by-step solutions
What Are Permutations and Combinations?
Permutations and combinations are fundamental concepts in combinatorics—the branch of mathematics that deals with counting, arranging, and selecting objects. They help us answer questions like "How many different ways can I arrange these items?" or "How many possible groups can I form from a larger set?"
The key difference lies in whether order matters. With permutations, the sequence or arrangement is important—so "ABC" is different from "CBA." With combinations, only the selection matters—so "ABC" and "CBA" count as the same group.
Permutation Formula (nPr)
A permutation counts the number of ways to arrange r items selected from a set of n distinct items, where the order of arrangement is significant. The notation nPr (read as "n permute r") represents this count.
Where n! (n factorial) equals n × (n−1) × (n−2) × ... × 2 × 1.
Example: How many ways can you arrange 3 books on a shelf chosen from 5 distinct books?
Combination Formula (nCr)
A combination counts the number of ways to select r items from a set of n distinct items, where the order does not matter. The notation nCr (read as "n choose r") is used.
Example: How many different 3-topping pizzas can you create from 8 available toppings?
Key Differences Between Permutation and Combination
| Feature | Permutation (nPr) | Combination (nCr) |
|---|---|---|
| Order Matters? | ✅ Yes | ❌ No |
| Formula | n! / (n−r)! | n! / (r! × (n−r)!) |
| Result Size | Larger (more arrangements) | Smaller (fewer unique groups) |
| Example Use Case | Race finishing orders, passwords, seating arrangements | Lottery numbers, team selection, handshakes |
| Same n & r? | nPr ≥ nCr always | nCr = nPr / r! |
How to Use This Calculator
- Choose the mode – Click Permutation (nPr) if order matters, or Combination (nCr) if only the selection counts.
- Enter n – The total number of distinct items in your set (must be a non-negative integer).
- Enter r – The number of items you want to select or arrange (must be ≤ n).
- Click Calculate – Instantly see the result along with a detailed step-by-step breakdown showing how the answer is derived from the formula.
- Review the steps – The tool shows factorial expansion and simplification to help you understand the calculation.
Real-World Applications
- 💻 Password Security: Calculating possible password combinations for given character sets.
- 🎲 Probability & Statistics: Determining outcomes in card games, dice rolls, and lotteries.
- 📊 Data Science: Feature selection, sampling methods, and A/B testing design.
- 🏗️ Project Management: Task sequencing and resource allocation scenarios.
- 🧬 Genetics: Calculating possible gene combinations in hereditary studies.
- 🏆 Sports: Tournament bracket possibilities and team formation strategies.
Frequently Asked Questions
Q: What does nPr stand for?
nPr stands for "n Permute r" and counts the number of ordered arrangements of r items chosen from n distinct items. The formula is nPr = n! / (n−r)!.
Q: What does nCr stand for?
nCr stands for "n Choose r" and counts the number of unordered selections of r items from n distinct items. It's also written as C(n,r) or the binomial coefficient.
Q: When should I use permutation vs combination?
Use permutation when the order or arrangement matters (e.g., ranking, sequencing, passwords). Use combination when only the group membership matters (e.g., team rosters, lottery picks).
Q: What happens if r = 0 or r = n?
nP0 = 1 and nC0 = 1 (there's exactly one way to select nothing). nPn = n! (all items arranged in every possible order) and nCn = 1 (only one way to select everything).
Q: Can r be larger than n?
No. You cannot select or arrange more items than are available. If r > n, the result is undefined. Our calculator will alert you with an error message.