Advertisement
728x90 Ad Space

Permutation and Combination Calculator

This permutation and combination calculator computes the number of possible permutations (nPr) and combinations (nCr) when selecting r elements from a set of n elements. It includes step-by-step formula displays for both calculations, making it ideal for students, teachers, and professionals working with combinatorics problems.

Enter Values

Result

Permutations, nPr =
6!
(6 - 2)!
= 30
Combinations, nCr =
6!
2! × (6 - 2)!
= 15
Advertisement
300x250 or 320x100 Ad Space
permutation-and-combination-calculator overview

What Is a Permutation and Combination Calculator and Why You Need One

permutation-and-combination-calculator 1

A permutation and combination calculator is an essential mathematical tool that computes the number of ways to select and arrange items from a set. Combinatorics, the branch of mathematics dealing with counting and arrangement problems, forms the foundation for probability theory, statistics, and many areas of computer science. Whether you are a student learning about factorials for the first time or a data scientist calculating probabilities, this calculator simplifies complex counting problems into instant results.

The two fundamental operations in combinatorics are permutations (nPr) and combinations (nCr). Permutations count arrangements where order matters, while combinations count selections where order does not matter. Understanding when to use each is critical for solving problems correctly. This calculator handles both simultaneously, displaying the formulas and results side by side so you can see the relationship between the two calculations.

Our free online tool supports values up to 1,000 for n, using JavaScript's big number capabilities to compute factorials accurately. The step-by-step formula display shows the factorial expansion, making it an excellent teaching aid for classrooms and self-study. For more mathematical tools, explore our factor calculator and probability calculator.

How to Calculate Permutations

permutation-and-combination-calculator 2

Permutations refer to the number of ways to arrange r items selected from a set of n items, where the order of arrangement matters. The standard notation is nPr, read as "n permute r." The permutation formula accounts for the fact that each different ordering counts as a distinct outcome.

Permutation Formula

nPr = n! / (n - r)!

Where n! (n factorial) is the product of all positive integers from 1 to n. For instance, 5! = 5 × 4 × 3 × 2 × 1 = 120.

Permutation Example

In a soccer team of 11 members, find the number of ways to choose a team captain and a goalkeeper. These are two distinct roles, so order matters:

11P2 = 11! / (11 - 2)! = 11! / 9! = 11 × 10 = 110

There are 110 different ways to assign the captain and goalkeeper roles. Once a member is chosen as captain, they cannot also be the goalkeeper (selection without replacement), and swapping the two roles produces a different arrangement. Use our probability calculator to determine the probability of specific arrangements.

How to Calculate Combinations

permutation-and-combination-calculator 3

Combinations refer to the number of ways to select r items from a set of n items, where the order of selection does not matter. The standard notation is nCr, also written as C(n,r) or read as "n choose r." Combinations are used when you care only about which items are selected, not how they are arranged.

Combination Formula

nCr = n! / (r! × (n - r)!)

The key difference from the permutation formula is the extra division by r! in the denominator. This division removes the r! different orderings that make permutations distinct, since order does not matter for combinations.

Combination Example

From a soccer team of 11 members, find the number of ways to choose 2 strikers (order does not matter):

11C2 = 11! / (2! × (11 - 2)!) = 11! / (2! × 9!) = 55

Unlike the permutation example where assigning distinct roles gave 110 possibilities, choosing 2 strikers gives only 55 possibilities. This is because the pair (Player A, Player B) is the same combination as (Player B, Player A). For more on counting problems, visit our statistics calculator.

Key Differences Between Permutations and Combinations

permutation-and-combination-calculator 4

Understanding the difference between permutations and combinations is the most important skill in combinatorics. The fundamental question to ask is: does the order matter? If yes, use permutations. If no, use combinations. Here is a comparison table to help clarify the distinction:

Feature Permutations (nPr) Combinations (nCr)
Order matters? Yes No
Formula n! / (n - r)! n! / (r! × (n - r)!)
Example First, second, third place in a race Selecting 3 finalists (no ranking)
Value comparison Always larger for r > 1 Always smaller than nPr
Real-world use Passwords, PIN codes, rankings Lotteries, committees, teams

A helpful mnemonic: "P" in permutations stands for "position" (order matters), while "C" in combinations stands for "collection" (order does not matter). The permutation of a combination lock is actually a misnomer — mathematically it should be called a combination lock since 1-2-3 is different from 3-2-1. For more on probability and counting, try our probability calculator.

Permutation With Repetition vs Without Repetition

When working with permutations, it is essential to determine whether repetition (replacement) of items is allowed. The standard permutation formula nPr assumes without replacement — once an item is selected, it cannot be selected again. However, many real-world scenarios allow repetition, and the formula changes accordingly.

Permutations Without Repetition

This is the standard nPr formula: n! / (n - r)!. Example: In a race with 8 runners, the number of ways to award gold, silver, and bronze medals is 8P3 = 8! / 5! = 336. No runner can win more than one medal, so selection is without replacement. Each distinct ordering of the same three runners on the podium counts as a different permutation. This is the most common type of permutation problem and applies whenever items cannot be reused.

Permutations With Repetition

When repetition is allowed and order matters, the formula is simply n^r (n raised to the power of r). Example: A 4-digit PIN code using digits 0-9 gives 10^4 = 10,000 possible codes. Each digit can be any of 10 choices, and digits can repeat (1111 is valid). Another example: how many 3-letter words can be formed from the 26 letters of the alphabet if letters can repeat? Answer: 26^3 = 17,576. If letters could not repeat, the answer would be 26P3 = 15,600 — notably smaller because 2,976 arrangements with repeated letters are excluded.

The key insight is that n^r grows much faster than nPr for small r, but nPr overtakes n^r when r approaches n. For n = 10 and r = 3: n^r = 1,000 and 10P3 = 720. But for n = 10 and r = 8: n^r = 100,000,000 and 10P8 = 1,814,400 — nPr is larger because the factorial-based formula includes all arrangements of nearly all items. Understanding when to use each formula is essential for accurate combinatorics problem-solving. Our calculator computes the standard nPr (without repetition). For problems involving repetition, manually compute n^r. For further counting tools, check our number sequence calculator.

Combination With Repetition vs Without Repetition

Similarly, combinations can be with or without repetition. The standard nCr formula assumes without replacement. When repetition is allowed, the formula changes to accommodate the possibility of selecting the same item multiple times.

Combinations Without Repetition

This is the standard nCr formula: n! / (r! × (n - r)!). Example: How many ways to choose 3 toppings from a menu of 10? Answer: 10C3 = 120. Each topping can be selected at most once. Another example: a poker hand consists of 5 cards from a 52-card deck. The number of possible hands is 52C5 = 2,598,960. Since each card appears only once in the deck, this is a combination without repetition. The enormous number of possible hands explains why poker is a game of skill rather than pure luck — even after many hands, you are unlikely to see the same combination twice.

Combinations With Repetition

When repetition is allowed (also called multisets or the stars and bars method), the formula is (n + r - 1)C(r) = (n + r - 1)! / (r! × (n - 1)!). Example: Choosing 3 scoops of ice cream from 5 flavors, where you can repeat flavors, gives (5 + 3 - 1)C3 = 7C3 = 35 possible combinations. This counts selections like (chocolate, chocolate, vanilla) as distinct from (chocolate, vanilla, vanilla). The stars and bars method is a powerful combinatorial technique that converts combination-with-repetition problems into standard combination problems by adding n - 1 dividers to the r items being selected.

Another common example: how many ways can you distribute 10 identical candies to 4 children? This is a combination-with-repetition problem where n = 4 (children) and r = 10 (candies), giving (4 + 10 - 1)C10 = 13C10 = 286 ways. The candies are identical, so we only care about how many each child receives, not which specific candies. Our calculator computes standard nCr (without repetition). For help with advanced counting problems, use our statistics calculator for data analysis or probability calculator for event probability.

Real-World Applications of Permutations

Permutations appear in countless real-world scenarios where arrangement and order are important. Understanding these applications helps build intuition for when to use permutations in problem-solving.

Rankings and Competitions

Awarding first, second, and third place in a competition is a classic permutation problem. With 10 participants, there are 10P3 = 720 ways to award the three medals. Each distinct ordering of the same three people on the podium counts as a different outcome.

Password and Code Generation

Creating passwords, PIN codes, and license plates all involve permutations. A 6-character password using letters and digits has 36^6 possible permutations with repetition. Security systems rely on the vast number of possible permutations to prevent unauthorized access.

Schedule and Timetable Planning

Arranging meetings, classes, or flights into a schedule involves permutation problems. The number of ways to schedule 5 one-hour meetings in 5 time slots is 5! = 120 permutations. When constraints are added (prerequisite classes, room availability), the counting becomes more complex but still builds on permutation principles.

Genetics and Molecular Biology

DNA sequences are permutations of four nucleotides (A, T, G, C). A sequence of length n has 4^n possible permutations. Understanding permutation counting is fundamental to genetics research and bioinformatics. For further analysis tools, visit our sample size calculator for research planning.

Real-World Applications of Combinations

Combinations are even more common in everyday life than permutations because many selection problems do not care about order. From lotteries to committee formation, combinations provide the counting framework for group selection.

Lottery and Gambling

A typical lottery requires choosing 6 numbers from 1 to 49. The number of possible tickets is 49C6 = 13,983,816 — nearly 14 million combinations. This enormous number explains why winning the lottery is so unlikely. The order in which numbers are drawn does not matter, only which numbers appear on your ticket.

Committee and Team Selection

Choosing a committee of 3 people from a group of 20 candidates gives 20C3 = 1,140 possible committees. Unlike assigning specific roles (president, treasurer, secretary), a simple committee membership is a combination because all members have equal standing.

Poker and Card Games

A standard poker hand consists of 5 cards from a 52-card deck, giving 52C5 = 2,598,960 possible hands. The probability of specific hands (royal flush, four of a kind, etc.) is calculated using combination counting. Poker players use these probabilities to make strategic decisions about betting and folding.

Quality Control and Sampling

Manufacturers use combinations to determine how many ways a sample can be selected for quality testing. If a batch of 100 items contains 5 defects, the number of ways to select a sample of 10 that contains exactly 2 defects is 5C2 × 95C8. For help with sample-related calculations, use our sample size calculator or standard deviation calculator.

Relationship Between Permutations and Combinations

The relationship between permutations and combinations is elegantly simple: nPr = nCr × r!. This formula reveals that every combination of r items can be arranged (permuted) in r! different ways. Understanding this relationship deepens your grasp of both concepts.

Why This Relationship Matters

Suppose you want to know both how many ways you can select a committee of 3 from 10 people (combinations) and how many ways you can assign them roles of president, treasurer, and secretary (permutations). The answer: 10C3 = 120 committees, and 10P3 = 720 role assignments. Notice that 720 = 120 × 3! = 120 × 6. Each committee of 3 can have its members arranged in 3! = 6 distinct role assignments.

Using the Relationship to Check Work

You can verify your permutation and combination calculations using this relationship. If nPr ÷ r! does not equal nCr (or equivalently, nCr × r! does not equal nPr), then one of your calculations is wrong. This cross-check is especially useful when solving complex combinatorics problems with multiple steps.

Numerical Examples

For n = 5, r = 2: 5P2 = 20, 5C2 = 10, and 20 = 10 × 2!

For n = 6, r = 3: 6P3 = 120, 6C3 = 20, and 120 = 20 × 3!

For n = 10, r = 4: 10P4 = 5,040, 10C4 = 210, and 5,040 = 210 × 4!

Our permutation and combination calculator computes both values simultaneously so you can see this relationship in action. For more mathematical tools, try our mean, median, mode, range calculator or Z-score calculator.

Tips for Solving Combinatorics Problems

Solving permutation and combination problems requires a systematic approach. Here are proven strategies to tackle even complex combinatorics questions with confidence.

1. Identify Whether Order Matters

This is the first and most important question. Ask yourself: would swapping two selected items produce a different outcome? If yes, use permutations (nPr). If no, use combinations (nCr). When in doubt, test with a small example. For selecting 2 letters from {A, B, C}, AB and BA are the same combination but different permutations.

2. Determine if Repetition Is Allowed

Check whether items can be selected more than once. PIN codes allow repetition (digits can repeat). Team selection typically does not allow repetition (one person cannot be chosen twice). If repetition is allowed, use n^r (permutations) or (n+r-1)Cr (combinations) instead of the standard formulas.

3. Break Down Complex Problems

Many combinatorics problems involve multiple steps. Break them into smaller sub-problems using the addition rule (OR means add) and multiplication rule (AND means multiply). For example, "choose a committee of 3 with at least 2 women from a group of 5 men and 6 women" requires adding the cases of exactly 2 women and exactly 3 women.

4. Check for Symmetry

Note that nCr = nC(n-r). Choosing 3 items from 10 is the same as choosing 7 items to leave behind. This symmetry can simplify calculations: 100C97 = 100C3, and computing 100C3 is much faster than 100C97.

5. Use Factorial Simplification

When computing nPr and nCr by hand, cancel common factors before multiplying. For 10P3 = 10! / 7!, instead of computing 10! = 3,628,800 and 7! = 5,040, simply compute 10 × 9 × 8 = 720. This cancellation makes mental calculation practical. Our calculator handles the computation automatically, but understanding the simplification helps with estimation and verification.

6. Watch for Hidden Constraints

Real-world problems often include hidden constraints that change the counting approach. For instance, "arrange the letters in the word 'MISSISSIPPI'" seems like a simple 11! permutation, but the repeated letters (4 S's, 4 I's, 2 P's) mean you must divide by 4! × 4! × 2! to avoid counting identical arrangements multiple times. Always check whether items are distinguishable or identical before applying standard formulas.

7. Use Complementary Counting

Sometimes it is easier to count what you do NOT want and subtract from the total. For example, "how many committees of 5 from 10 people include at least one woman?" Instead of adding cases for exactly 1, 2, 3, 4, or 5 women, compute total committees minus committees with no women: 10C5 - 5C5 = 252 - 1 = 251. This complementary approach simplifies many complex counting problems.

8. Draw Diagrams and Trees

For small problems, drawing a tree diagram helps visualize all possible outcomes. Each branch represents a choice, and the total number of paths from root to leaves equals the total number of outcomes. Tree diagrams are especially helpful for understanding dependent versus independent choices and for verifying your formulas on small cases before scaling up. For further practice, try our factor calculator or fraction calculator.

Common Mistakes to Avoid in Combinatorics

Even experienced mathematicians make errors in combinatorics. Being aware of these common pitfalls will help you avoid them and ensure your calculations are accurate.

Confusing Permutations and Combinations

The most frequent mistake is using permutations when combinations are needed, or vice versa. Always ask: does order matter? A classic example: "How many ways to choose 3 students from a class of 20?" is a combination (20C3 = 1,140). "How many ways to assign 3 distinct awards to 3 students from a class of 20?" is a permutation (20P3 = 6,840).

Forgetting the r! Factor in Combinations

Some beginners use the permutation formula and forget to divide by r! when computing combinations. Remember: nCr = nPr / r!. If you forget this division, your combination result will be r! times too large. For r = 3, that means being off by a factor of 6.

Misapplying the Multiplication Rule

The multiplication rule (if there are m ways to do A and n ways to do B, then m × n ways to do both) applies only to independent choices. If choices are not independent (selecting without replacement), use permutation or combination formulas instead.

Overlooking the r = 0 Case

Remember that nP0 = nC0 = 1 for any n. There is exactly one way to select nothing from a set: choose nothing. This follows from the definition 0! = 1. Likewise, nPn = n! (all items arranged) and nCn = 1 (choose all items).

Calculator Entry Errors

When using a calculator, ensure n and r are entered correctly. Common errors include swapping n and r (nPr is not the same as rPn) or entering n - r instead of r. Double-check your inputs before relying on results. For example, 10P3 = 720 but 10P7 = 604,800 — these are vastly different results. Always verify that r is less than or equal to n, and remember that both must be non-negative integers.

Assuming Independence Without Checking

The multiplication rule (m × n) assumes the choices are independent. If selecting items from the same set without replacement, the choices are dependent — the second choice depends on what was selected first. In such cases, use nPr or nCr instead of simple multiplication. A common trap: "how many ways to choose a president and vice president from 10 people?" is 10P2 = 90, not 10 × 10 = 100, because the same person cannot hold both offices.

Forgetting to Consider Order in Word Problems

Many word problems require careful reading to determine whether order matters. For instance, "how many ways to select a team of 3 from 10 players" is a combination (order does not matter). But "how many ways to select a team of 3 with positions of captain, pitcher, and catcher" is a permutation (order matters because positions are distinct). The phrasing "select" versus "assign" or "arrange" often signals whether permutations or combinations are needed. For additional math tools, visit our fraction calculator or percentage calculator.

Final Thoughts

Permutations and combinations are fundamental counting tools that appear throughout mathematics, science, and everyday decision-making. From calculating lottery odds to arranging tournament brackets, understanding these concepts empowers you to make sense of the countless ways items can be selected and arranged. The ability to count possibilities accurately is not just an academic exercise — it is a practical skill used in data science, game theory, logistics, cryptography, and many other fields.

Our permutation and combination calculator makes these calculations instant and accessible. By entering n (total items) and r (items to select), you get both nPr and nCr results with step-by-step formulas. This dual display helps reinforce the relationship between permutations and combinations, making it a valuable learning tool as well as a practical calculator. The formula visualization shows exactly how the factorial cancellation works, helping you understand the underlying mathematics rather than just getting a number.

We encourage you to experiment with different values to build your intuition. Try setting n = 5 and r = 3, then compare with n = 5 and r = 2. Notice that 5P3 = 60 but 5P2 = 20 — decreasing r actually decreases the number of permutations, which makes sense since you have fewer positions to fill. For combinations, 5C3 = 10 and 5C2 = 10 (they are equal because nCr = nC(n-r)). Try larger values like n = 20 and r = 5 to see how quickly the numbers grow: 20P5 = 1,860,480 and 20C5 = 15,504. These large numbers illustrate why combinatorics is essential for understanding probability and risk in fields like gambling, insurance, and finance.

Remember the golden rule of combinatorics: always ask whether order matters. If the answer is yes, use permutations (nPr). If the answer is no, use combinations (nCr). With practice, this decision becomes automatic, and you will be able to tackle increasingly complex counting problems with confidence. Whether you are a student preparing for an exam, a teacher planning a lesson, or a professional analyzing data, this calculator is designed to support your combinatorial journey.

For further exploration, try our related tools: the probability calculator for event probability, the statistics calculator for data analysis, the standard deviation calculator for variability measures, the Z-score calculator for standardized scores, the average calculator for central tendency, and the sample size calculator for research planning.

To learn more about permutation and combination calculator, visit NIST.

Frequently Asked Questions

What is the difference between permutations and combinations?

In permutations, the order of selection matters. Arranging 3 books on a shelf gives 6 different permutations (3! = 6) because each ordering is distinct. In combinations, the order does not matter. Selecting 3 books from a shelf of 10 to take on a trip gives 120 combinations because which book is picked first or last does not change the group. Use permutations when order matters and combinations when it does not.

What does nPr stand for in permutations?

nPr stands for the number of permutations of n items taken r at a time. The formula is nPr = n! / (n - r)!. For example, 5P3 = 5! / (5-3)! = 5! / 2! = 120 / 2 = 60. This means there are 60 ways to arrange 3 items selected from a set of 5 when order matters.

What does nCr stand for in combinations?

nCr stands for the number of combinations of n items taken r at a time. The formula is nCr = n! / (r! × (n - r)!). For example, 5C3 = 5! / (3! × (5-3)!) = 5! / (3! × 2!) = 120 / (6 × 2) = 10. This means there are 10 ways to choose 3 items from a set of 5 when order does not matter.

What is the rule of multiplication in combinatorics?

The multiplication rule states that if there are m ways to do one thing and n ways to do another, then there are m × n ways to do both. For example, if you have 3 shirts and 4 pants, you have 3 × 4 = 12 possible outfits. This rule extends to any number of independent choices and is the foundation of both permutation and combination formulas.

When should I use permutations vs combinations?

Use permutations when the order or arrangement matters. Examples include ranking runners in a race (1st, 2nd, 3rd place), creating passwords, arranging books on a shelf, or assigning roles like captain and treasurer. Use combinations when the group or selection matters but order does not. Examples include choosing committee members, picking lottery numbers, selecting team players, or choosing toppings for a pizza.

Can nCr be equal to nPr?

nCr equals nPr only when r = 0 or r = 1. When r = 0, both equal 1 (there is exactly one way to choose nothing). When r = 1, both equal n (there are n ways to choose one item from n, regardless of order). For all other values of r, nPr is always greater than nCr because permutations consider order while combinations do not. Specifically, nPr = nCr × r!.

What is the relationship between nPr and nCr?

The relationship between permutations and combinations is: nPr = nCr × r!. This means that for every combination of r items, there are r! ways to arrange them (permute them). So the number of permutations is always r! times larger than the number of combinations for the same n and r. For example, 5P3 = 60 and 5C3 = 10, and indeed 60 = 10 × 3! = 10 × 6.

What does 'without replacement' mean in combinatorics?

Without replacement means each item can be selected at most once. After an item is chosen, it is removed from the pool and cannot be chosen again. This is the standard assumption for both permutations (nPr) and combinations (nCr). For example, when choosing a captain and goalkeeper from 11 soccer players, the same person cannot hold both positions, so selection is without replacement. This contrasts with 'with replacement' problems where items can be reused.

How do I calculate permutations with repetition?

When repetition is allowed and order matters, use n^r (n raised to the power of r). For example, the number of possible 4-digit PIN codes (where each digit can be 0-9) is 10^4 = 10,000. This is because you have 10 choices for each of the 4 positions, and digits can repeat. This is different from nPr, which assumes no repetition. Our calculator computes nPr (without repetition), so use n^r for problems with repetition allowed.

What are the real-world applications of combinations?

Combinations are used in lottery calculations (choosing 6 numbers from 49), poker hand probabilities (5 cards from 52), committee selection (choosing 3 members from 20 candidates), quality control testing (selecting which items to inspect), medical trial group assignment, and menu or pizza topping combinations. Any situation where you need to count the number of ways to select a subset without caring about order uses combinations.

What is Pascal's triangle and how does it relate to combinations?

Pascal's triangle is a triangular array of numbers where each number is the sum of the two numbers directly above it. The numbers in Pascal's triangle correspond exactly to combination values nCr. Row n contains the values nC0, nC1, nC2, ..., nCn. For instance, row 4 is 1, 4, 6, 4, 1 which equals 4C0, 4C1, 4C2, 4C3, 4C4. Pascal's triangle provides a quick way to find combination values without using factorials.

How do I use the permutation and combination calculator?

Using the calculator is simple. Enter the total number of items (n) in the 'Total Amount in a Set' field. Enter the number of items to select (r) in the 'Amount in each Sub-Set' field. The calculator instantly displays both the permutation (nPr) and combination (nCr) results, along with the step-by-step formulas. You can click Calculate to update results manually or adjust any input and the results will update automatically. Use Clear to reset to default values.

Advertisement
970x250 or 728x90 Ad Space