Permutation & Combination
What is a Permutation and Combination Calculator?
Calculate permutations and combinations (nPr and nCr) easily. This tool provides step-by-step solutions for your probability and statistics problems. It handles large numbers accurately using advanced math logic.
Pro Tip: For more relevant tools in the math and science category, try our Calculate Percentage.
How Does the Permutation Combination Calculator Work?
Understanding Permutations and Combinations Mathematics
Our calculator uses factorial-based formulas to compute results with precision:
P(n,r) = n! / (n - r)!
Use When:
Order matters—arrangements, sequences, rankings, passwords, lock combinations.
C(n,r) = n! / [r! × (n - r)!]
Use When:
Order doesn't matter—selections, teams, committees, lottery numbers.
The Factorial Foundation
Factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow extremely fast—10! equals 3,628,800, and 20! exceeds 2.4 quintillion. Our calculator uses BigInt arithmetic to handle these massive numbers accurately.
Real-World Calculation Examples
Example 1: Permutation - Password Combinations
How many different 3-letter passwords can be created from 26 letters if repetition is not allowed?
Given: n = 26, r = 3
Formula: P(n,r) = n! / (n - r)!
P(26,3) = 26! / 23!
P(26,3) = 26 × 25 × 24 = 15,600
Answer: 15,600 unique 3-letter passwords
Example 2: Combination - Committee Selection
How many ways can a committee of 4 people be chosen from 12 candidates?
Given: n = 12, r = 4
Formula: C(n,r) = n! / [r! × (n - r)!]
C(12,4) = 12! / [4! × 8!] = 479001600 / [24 × 40320]
C(12,4) = 479001600 / 967680 = 495
Answer: 495 different committees
Example 3: Permutation vs Combination Comparison
From 5 people (A, B, C, D, E), selecting 3:
Permutation (Order Matters): P(5,3) = 5! / 2! = 60
ABC, ABD, ABE, ACB, ACD, ACE... (60 different arrangements)
Combination (Order Doesn't): C(5,3) = 5! / (3! × 2!) = 10
ABC, ABD, ABE, ACD, ACE, ADE, BCD, BCE, BDE, CDE (10 groups)
The History of Combinatorics
The study of counting—how to determine 'how many'—is one of the oldest branches of mathematics, evolving from practical counting needs to a sophisticated theoretical framework that underpins modern computing and cryptography.
Ancient Origins
The earliest combinatorics problems appeared in ancient Egypt and Babylon around 3000 BCE, where mathematicians calculated combinations of objects. The Hebrew Bible's Book of Esther mentions casting lots—an early reference to probability. Chinese mathematicians around 1100 BCE systematically studied magic squares.
The Birth of Modern Probability
In 1654, French mathematicians Blaise Pascal and Pierre de Fermat developed the mathematical theory of probability while solving gambling problems. Their correspondence laid the foundation for counting principles, permutations, and combinations that we use today.
The Computer Age
Today, combinatorics is essential for algorithm analysis, cryptography, network security, and artificial intelligence. The RSA encryption algorithm, which secures internet transactions, relies on the difficulty of certain combinatorial problems involving large numbers.
Practical Applications in Everyday Life
Combinatorics isn't just abstract mathematics—it's woven into countless everyday decisions and activities. Understanding these applications helps illustrate why mastering permutations and combinations matters beyond the classroom.
License Plates
A typical license plate with 3 letters and 3 digits has 26³ × 10³ = 17,576,000 possible combinations—ensuring unique identification.
Pin Codes
A 4-digit ATM PIN has 10⁴ = 10,000 possibilities. A 6-character alphanumeric password has 56² (if uppercase only) or much more with mixed case and symbols.
Seating Arrangements
10 dinner guests can be seated in 10! = 3,628,800 different orders. This is why finding the 'perfect' seating arrangement matters at formal events.
Sports Tournaments
A 16-team single-elimination tournament has 15 possible bracket outcomes (C(16,2) = 120 if considering who beats whom), but only one champion.
The Birthday Problem
How many people need to be in a room for a 50% chance that two share a birthday? The answer is just 23 people—a counterintuitive result that demonstrates the power of combinatorial thinking.
P(no match) = 365/365 × 364/365 × 363/365 × ... × (365-22)/365 ≈ 49.3%
Combinatorics in Computer Science
Combinatorics forms the mathematical backbone of computer science, powering everything from algorithm efficiency to network security. Understanding these connections bridges the gap between abstract math and practical computing.
Algorithm Complexity
Understanding O(n!), O(n²), and other combinatorial complexity classes helps analyze algorithm efficiency and predict performance on large inputs.
Cryptography & Security
Modern encryption relies on the difficulty of certain combinatorial problems. A 256-bit key has 2²⁵⁶ possible values—more than the number of atoms in the observable universe.
Database Optimization
Query optimization, indexing strategies, and join operations all involve combinatorial considerations about possible execution paths and their costs.
Social Network Analysis
Counting friend groups, calculating network centrality, and identifying communities all use combinatorial formulas as their mathematical foundation.
The Brute Force Problem
If trying every possible combination is the only way to solve a problem, how large can the search space become?
8-Character Password
~200 billion combinations
Chess Positions
~10⁴⁰ possible games
Rubik's Cube
~4.3 × 10¹⁹ combinations
40-Card Poker Hands
~78 billion combinations
Probability and Statistics Connections
Permutations and combinations are the gateway to understanding probability. These formulas let us count possibilities and calculate the likelihood of specific outcomes—skills essential for data science, research, and informed decision-making.
Basic Probability Formula
- Identify favorable outcomes: Use combinations or permutations to count desired events.
- Identify total outcomes: Count all possible equally-likely outcomes.
- Calculate probability: P(Event) = Favorable Outcomes / Total Outcomes
- Interpret results: Convert to percentage or odds as needed.
Dice Probability
What's the probability of rolling a sum of 7 with two dice?
Total outcomes: 6 × 6 = 36
Favorable (sum=7): (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) = 6
Probability: 6/36 = 1/6 ≈ 16.67%
Card Probability
What's the probability of drawing 2 aces from a deck?
Total ways: C(52,2) = 1,326
Favorable: C(4,2) = 6
Probability: 6/1326 = 1/221 ≈ 0.45%
Lottery Mathematics
A typical lottery requires selecting 6 numbers from 49. What's the probability of winning the jackpot?
C(49,6) = 49! / (6! × 43!) = 13,983,816
So your chance is 1 in ~14 million
Technical Reference
Key Takeaways
Frequently Asked Questions
What is the ?
Calculate permutations and combinations (nPr and nCr) easily. This tool provides step-by-step solutions for your probability and statistics problems. It handles large numbers accurately using advanced math logic.
Pro Tip: For more relevant tools in the math and science category, try our Calculate Percentage.
Why do we use factorials in these formulas?
What happens when n = r in permutations?
How large can the results get?
Can I calculate permutations with repetition allowed?
What are some real-world applications of combinatorics?
Why is combination count always less than permutation count?
What is Pascal's Triangle and how does it relate to combinations?
Disclaimer
The results provided by this tool are for informational purposes only and do not constitute medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition.