Skip to main content

Permutation & Combination

Ready to calculate
P(n,r) = n!/(n−r)! Formula.
C(n,r) = n!/r!(n−r)! Formula.
Large Factorial Support.
100% Free.
No Data Stored.
Permutation & Combination How It Works component is missing.

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?

Enter Total Items (n): Input the total number of items in your set—the pool from which you're selecting or arranging. For example, if you have 52 playing cards, n = 52.
Enter Selection Size (r): Input how many items you want to select or arrange. If you're forming 3-card sequences from a deck, r = 3.
Choose Calculation Mode: Select 'nPr' for permutations (order matters) or 'nCr' for combinations (order doesn't matter).
Calculate & Interpret: Click Calculate to receive instant results with factorial breakdowns, formula applications, and plain-language interpretations of what the numbers mean.

Understanding Permutations and Combinations Mathematics

Our calculator uses factorial-based formulas to compute results with precision:

Permutation Formula (nPr)

P(n,r) = n! / (n - r)!

Use When:

Order matters—arrangements, sequences, rankings, passwords, lock combinations.

Combination Formula (nCr)

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 Example

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

  1. Identify favorable outcomes: Use combinations or permutations to count desired events.
  2. Identify total outcomes: Count all possible equally-likely outcomes.
  3. Calculate probability: P(Event) = Favorable Outcomes / Total Outcomes
  4. 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

Your health journey starts with understanding your baseline. Use the ToolsACE BMI Calculator to get accurate, actionable data about your body mass index today. By keeping your BMI within the healthy range, you significantly reduce the risk of chronic lifestyle diseases like heart disease and diabetes. Use these results as a compass to guide your nutrition, fitness, and overall wellness goals.

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?
Factorials elegantly express the concept of 'arranging all items.' n! (n factorial) means n × (n-1) × (n-2) × ... × 2 × 1, which is exactly the count of ways to arrange n distinct items. When we divide n! by (n-r)!, we're essentially 'cancelling out' the items we don't want to arrange. This mathematical elegance is why factorials are central to combinatorics.
What happens when n = r in permutations?
When you select all items (r = n), the permutation formula becomes P(n,n) = n! / (n-n)! = n! / 0! = n! / 1 = n!. This makes intuitive sense: arranging all n items can only be done in n! ways. (Note: by definition, 0! = 1.) For combinations, C(n,n) = 1, since there's only one way to choose all items from a set.
How large can the results get?
Extremely large! Factorials grow super-exponentially. 10! = 3,628,800, but 20! = 2,432,902,008,176,640,000 (2.4 quintillion). Our calculator uses BigInt arithmetic to handle these massive numbers accurately, displaying results in standard notation for smaller values and scientific notation for extremely large results.
Can I calculate permutations with repetition allowed?
This calculator handles permutations without repetition (each item can only be used once). For permutations with repetition, where items can be reused, the formula changes: if you have n choices for each of r positions, the count is n^r. For example, with 26 letters and 3-character passwords allowing repetition, there are 26³ = 17,576 possibilities.
What are some real-world applications of combinatorics?
Combinatorics appears everywhere: lottery probability (how many 6-number combinations exist?), password security (how long would it take to crack?), sports tournament brackets, genetic sequence analysis, network security, quality assurance testing combinations, and board game probability calculations. Any situation involving 'how many ways can something happen' uses combinatorics.
Why is combination count always less than permutation count?
Because combinations don't care about order, each unique combination of r items corresponds to r! different permutations (the r items can be arranged in r! ways). Since combinations merge these r! arrangements into one group, the combination count is exactly r! times smaller than the permutation count: C(n,r) = P(n,r) / r!. For example, the 3 people ABC can be arranged 6 different ways as permutations, but they're just 1 combination.
What is Pascal's Triangle and how does it relate to combinations?
Pascal's Triangle is a triangular array where each number is the sum of the two numbers above it. The nth row (starting with row 0) contains the combination values C(n,0), C(n,1), C(n,2), ..., C(n,n). This triangle reveals beautiful patterns and provides a quick way to calculate combination values without factorials. The triangle also relates to the binomial theorem and probability distributions.

Author Spotlight

The ToolsACE Team - ToolsACE.io Team

The ToolsACE Team

Our math tools team computes permutations using P(n,r) = n!/(n−r)! and combinations using C(n,r) = n!/[r!(n−r)!] — handling large factorials with arbitrary-precision integer arithmetic to avoid overflow on inputs with high n values.

Permutation & Combination FormulasLarge Factorial ComputationSoftware Engineering Team

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.