Permutation & Combination Calculator

Calculate permutations (nPr) and combinations (nCr) with and without repetition. Enter your set of elements and selection size to find all possible arrangements and selections.

Your Results

Calculated
Permutations (nPr)
0
Order matters, no repetition
Permutations with Repetition
0
Order matters, repetition allowed
Combinations (nCr)
0
Order doesn't matter, no repetition
Combinations with Repetition
0
Order doesn't matter, repetition allowed

Key Takeaways

  • Permutations count arrangements where ORDER MATTERS (ABC is different from CBA)
  • Combinations count selections where ORDER DOES NOT MATTER (ABC = CBA)
  • Formula for nPr: n! / (n-r)! - used for rankings, passwords, seating arrangements
  • Formula for nCr: n! / (r!(n-r)!) - used for lottery odds, team selection, poker hands
  • With 10 items choosing 3: nPr = 720 possible arrangements, nCr = 120 possible selections
  • Repetition formulas allow the same element to be selected multiple times

What Are Permutations and Combinations? A Complete Explanation

Permutations and combinations are fundamental concepts in combinatorics - the branch of mathematics that studies counting, arrangement, and selection of objects. These concepts appear everywhere from probability calculations to computer science algorithms, and understanding the difference between them is crucial for solving countless real-world problems.

The key distinction is simple but powerful: permutations care about the order of selection (arrangement matters), while combinations only care about which items are selected (order is irrelevant). Think of it this way: arranging 3 people in a line is a permutation problem because person A-B-C creates a different arrangement than C-B-A. However, selecting 3 people for a committee is a combination problem because the committee {A, B, C} is the same regardless of the order you name them.

These concepts form the foundation of probability theory and are essential for understanding statistics, data science, cryptography, and even everyday decision-making. Whether you are calculating lottery odds, determining password strength, planning schedules, or solving complex optimization problems, permutations and combinations provide the mathematical framework for accurate counting.

Quick Comparison: Set {A, B, C}, Selecting 2 Elements

Permutations 6
Arrangements AB, BA, AC, CA, BC, CB
Combinations 3
Selections AB, AC, BC

Notice: Permutations count AB and BA separately (order matters), while combinations count them as one selection.

The Permutation Formula Explained (nPr)

A permutation is an ordered arrangement of objects. When you need to count how many ways you can arrange r items from a set of n items where the order matters, you use the permutation formula.

nPr = n! / (n - r)!
n = Total number of items in the set
r = Number of items being selected/arranged
! = Factorial (e.g., 5! = 5 x 4 x 3 x 2 x 1 = 120)

Permutations with Repetition

When elements can be repeated (like choosing a PIN code where digits can repeat), the formula simplifies to:

n^r
This counts arrangements where each position can use any of the n elements

Pro Tip: When to Use Permutations

Ask yourself: "Would rearranging the selected items create a DIFFERENT outcome?" If yes, use permutations. Examples include: race finishing orders, password combinations, phone numbers, license plates, and seating arrangements where position matters.

The Combination Formula Explained (nCr)

A combination is a selection of objects where the order does not matter. When you need to count how many ways you can choose r items from n items without regard to arrangement, you use the combination formula.

nCr = n! / (r! x (n - r)!)
n = Total number of items available
r = Number of items being chosen
Also written as C(n,r) or "n choose r"

Combinations with Repetition

When elements can be repeated in selections (like choosing scoops of ice cream where you can pick the same flavor multiple times), the formula is:

C(n + r - 1, r) = (n + r - 1)! / (r! x (n - 1)!)
This uses the "stars and bars" method from combinatorics

How to Use This Calculator (Step-by-Step)

1

Enter Your Set of Elements

Input your elements separated by commas in the first field. You can use numbers (1, 2, 3, 4) or letters (A, B, C, D). Each element should be unique for standard permutation/combination calculations.

2

Specify the Selection Size

Enter how many elements you want to select or arrange at a time. This is the "r" value in nPr and nCr formulas. It must be less than or equal to the total number of elements.

3

Click Calculate

Press the Calculate button to instantly compute all four values: permutations, permutations with repetition, combinations, and combinations with repetition.

4

Verify Specific Sequences (Optional)

Enter a specific sequence in the optional field and click "Check Sequence" to verify if it's a valid arrangement from your set.

Permutations vs. Combinations: Complete Comparison

Understanding when to use permutations versus combinations is essential for solving counting problems correctly. Here's a comprehensive comparison:

Feature Permutations (nPr) Combinations (nCr)
Order Matters (ABC differs from CBA) Does not matter (ABC = CBA)
Formula n! / (n-r)! n! / (r!(n-r)!)
Result Size Always larger or equal Always smaller or equal
Relationship nPr = nCr x r! nCr = nPr / r!
5 items, choose 3 60 arrangements 10 selections
Common Uses Rankings, passwords, schedules Lottery, teams, poker hands

Real-World Applications of Permutations and Combinations

Business Applications

In business, permutations and combinations help with inventory management, scheduling, and product bundling. A retailer with 10 products wanting to display 4 in a window can arrange them in 5,040 different ways (permutation) or create 210 different product groupings (combination). Marketing teams use these calculations to test A/B variations, plan promotional campaigns, and optimize product placement strategies.

Education and Academia

Students encounter these concepts in probability, statistics, and discrete mathematics courses. Teachers use permutation problems for arranging students in groups, creating test question variations, and explaining sampling methods. A class of 30 students selecting a 5-person committee involves C(30,5) = 142,506 possible committees - demonstrating how quickly combinations grow.

Computer Science and Cryptography

Password security directly relies on permutation counting. A 4-digit PIN using digits 0-9 has 10^4 = 10,000 possible combinations (with repetition). Extending to an 8-character alphanumeric password with 62 possible characters yields 62^8 = 218 trillion possibilities, illustrating why longer passwords are exponentially more secure.

Security Insight

Adding just one character to a password dramatically increases security. An 8-character alphanumeric password has 218 trillion possibilities, but a 9-character password has 13.5 quadrillion possibilities - 62 times more secure with just one additional character!

Daily Life Applications

From selecting lottery numbers (combination problem) to arranging photos in an album (permutation problem), these concepts appear in everyday situations. Planning a road trip with 5 stops out of 10 possible destinations involves both: choosing which stops (combination) and determining the route order (permutation).

Common Mistakes to Avoid

Watch Out for These Errors

  • Confusing order significance: Always ask "Does rearranging create a different outcome?" before choosing your formula
  • Forgetting repetition rules: Standard formulas assume no repetition - use repetition formulas when elements can be reused
  • Overflow with large factorials: Factorial values grow extremely fast - 20! exceeds 2 quintillion
  • Selection size exceeding set size: Without repetition, r cannot exceed n
  • Double counting: Ensure you are not counting the same arrangement multiple times

Advanced Concepts in Combinatorics

Circular Permutations

When arranging objects in a circle, one position is fixed as a reference point, reducing the count. For n distinct objects in a circle, there are (n-1)! arrangements. Seating 6 people around a round table has 5! = 120 distinct arrangements, not 6! = 720.

Permutations with Identical Items

When some objects are identical, we divide by the factorial of each repeated group. The word "MISSISSIPPI" has 11 letters with M(1), I(4), S(4), P(2). The distinct arrangements equal 11! / (4! x 4! x 2!) = 34,650.

The Multiplication Principle

When making sequential independent choices, multiply the options at each stage. Choosing a shirt (5 options), pants (4 options), and shoes (3 options) yields 5 x 4 x 3 = 60 possible outfits.

Pro Tip: Pascal's Triangle for Combinations

Pascal's Triangle provides combination values without calculation. Each number is the sum of the two numbers above it. Row n contains all values of C(n,r) for r from 0 to n. Row 5 reads: 1, 5, 10, 10, 5, 1 - showing C(5,0) through C(5,5).

Worked Examples with Step-by-Step Solutions

Example 1: Lottery Odds

Problem: A lottery requires selecting 6 numbers from 1-49. What are the odds of winning?

Solution: Order does not matter (same 6 numbers win regardless of selection order), so we use combinations.

C(49,6) = 49! / (6! x 43!) = 13,983,816

Result: Your odds of winning are 1 in 13,983,816 (approximately 0.0000072%).

Example 2: Password Combinations

Problem: How many 6-character passwords can be made using uppercase letters only?

Solution: Order matters and repetition is allowed (same letter can appear multiple times).

26^6 = 308,915,776 possible passwords

Result: Adding digits (36^6) increases this to 2.18 billion possibilities.

Example 3: Committee Selection

Problem: From 12 employees, select a 4-person committee. How many ways?

Solution: Order does not matter for committee membership.

C(12,4) = 12! / (4! x 8!) = 495 possible committees

Bonus: If positions matter (president, VP, secretary, treasurer), use P(12,4) = 11,880.

Frequently Asked Questions

The fundamental difference is whether order matters. In permutations, the arrangement ABC is different from CBA (6 permutations of 3 items). In combinations, ABC and CBA represent the same selection (only 1 combination). Use permutations for rankings, sequences, and arrangements. Use combinations for groups, teams, and selections where position is irrelevant.

For nPr, multiply n by (n-1) by (n-2) and continue for r terms. For example, 5P3 = 5 x 4 x 3 = 60. This avoids calculating large factorials. You are essentially multiplying the first r terms of n!. For 8P4: 8 x 7 x 6 x 5 = 1,680.

Use permutations with repetition when elements can be reused in each position. Common examples include: PIN codes (same digit can appear multiple times), license plates with repeating letters/numbers, binary sequences, product SKU codes, and any scenario where the same choice is available at each decision point. The formula is n^r.

Factorial (n!) means multiplying all positive integers from 1 to n. For example: 5! = 5 x 4 x 3 x 2 x 1 = 120. By definition, 0! = 1. Factorials grow extremely fast: 10! = 3,628,800 and 20! exceeds 2 quintillion. This rapid growth is why large permutation calculations require computational tools.

Since lottery drawings do not consider order (the same numbers win regardless of selection sequence), use combinations. For a 6/49 lottery: C(49,6) = 13,983,816 possible combinations. Your odds of winning with one ticket are 1 in 13,983,816. For Powerball-style games with a separate bonus number, multiply by the bonus ball pool size.

Permutations and combinations are directly related: nPr = nCr x r! or equivalently nCr = nPr / r!. This makes sense because permutations count every arrangement of a selection, while combinations count each selection once. Dividing permutations by r! (the number of ways to arrange r items) gives combinations.

A standard poker hand is 5 cards from a 52-card deck. Total possible hands: C(52,5) = 2,598,960. Individual hand probabilities use specific combinations. For example, a flush (5 cards same suit) has 4 x C(13,5) = 5,148 possibilities, giving odds of about 1 in 505. Royal flushes have only 4 possibilities (one per suit), making odds 1 in 649,740.

Without repetition: No, r cannot exceed n (you cannot select more items than exist). With repetition: Yes, r can exceed n because items can be reused. For example, with 3 flavors and 5 scoops, repetition allows C(3+5-1, 5) = 21 combinations. Standard formulas return 0 or undefined when r exceeds n without repetition.

Ready to Calculate Your Permutations and Combinations?

Use our free calculator above to instantly compute permutations and combinations for any set of elements. Perfect for homework, probability problems, password analysis, and more.