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

Frequently Asked Questions

What is the difference between permutation and combination?

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.

How do I calculate nPr without a calculator?

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.

When should I use permutations with repetition?

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.

What does n! (factorial) mean?

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.

How do I calculate lottery odds using combinations?

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.

What is the relationship between nPr and nCr?

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.

How are poker hands calculated using 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.

Can r be larger than n in permutations or combinations?

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.

What is a permutation and how is it different from a combination?
A permutation is an arrangement of items where the ORDER matters. A combination is a selection where order does NOT matter. Key question to ask: "Does changing the order create a different result?" If YES → permutation. If NO → combination. Examples: Permutation (order matters): Arranging 3 books on a shelf: ABC ≠ BAC ≠ CAB (these are different arrangements). Horse race podium: 1st, 2nd, 3rd place — changing who gets which medal matters. PIN code 1234 ≠ 4321 (order matters for security). Combination (order doesn't matter): Choosing 3 students for a team: {Alice, Bob, Carol} = {Bob, Alice, Carol}. Lottery: picking 6 numbers — {1,2,3,4,5,6} = {6,5,4,3,2,1}. Pizza toppings: choosing cheese, pepperoni, mushrooms — order irrelevant. Mathematical difference: Permutation: P(n,r) = n!/(n−r)!. Combination: C(n,r) = n!/(r!(n−r)!). Relationship: P(n,r) = C(n,r) × r! — permutations count each combination r! more times because of ordering. Example: From {A, B, C}, choosing 2: Combinations: {AB, AC, BC} → C(3,2) = 3. Permutations: AB, BA, AC, CA, BC, CB → P(3,2) = 6 = 3 × 2!
How do you calculate permutations step by step?
Formula: P(n, r) = n! / (n − r)!. Where: n = total number of items to choose from. r = number of positions/items to arrange. Step-by-step examples: Example 1: How many ways can you arrange 3 books from a shelf of 8? P(8, 3) = 8! / (8−3)! = 8! / 5! = (8 × 7 × 6 × 5 × 4 × 3 × 2 × 1) / (5 × 4 × 3 × 2 × 1) = (8 × 7 × 6) = 336. Shortcut: P(n,r) = n × (n−1) × (n−2) × ⋯ for r terms. P(8,3) = 8 × 7 × 6 = 336. Example 2: How many ways can 5 people line up? P(5,5) = 5! = 5 × 4 × 3 × 2 × 1 = 120. Example 3: First and second place in a race of 12 runners. P(12, 2) = 12 × 11 = 132. Example 4 — WITH repetition (password of 4 digits from 0–9): n^r = 10^4 = 10,000 (repetition allowed). P(n,r) WITHOUT repetition = 10 × 9 × 8 × 7 = 5,040. Key edge cases: P(n, 0) = 1 (one way to choose nothing). P(n, n) = n! (arrange all items). 0! = 1 (by definition). Calculator shortcut: Look for the nPr button on scientific calculators or use the formula above.
What are real-world examples of permutations?
Permutations appear whenever order or sequence matters: Lock combinations (actually permutations): 3-digit lock from digits 0–9 (no repeats): P(10,3) = 10×9×8 = 720 ways. 4-digit PIN (with repeats): 10⁴ = 10,000 possible codes. Race/competition results: Top 3 finishers from 20 runners: P(20,3) = 20×19×18 = 6,840 podium arrangements. If only 1st place matters: P(20,1) = 20 ways. Scheduling and arrangements: Seating 8 guests at a dinner table: P(8,8) = 8! = 40,320 arrangements. If 2 people must sit at end seats: Fixed those 2 × P(6,6) = 2 × 720 = 1,440. Passwords: 8-character password, lowercase only, no repeats: P(26,8) = 62,990,928,000. 8-character password with repeats: 26⁸ = 208,827,064,576. Language and anagrams: Arrangements of the word "MATH": P(4,4) = 4! = 24 anagrams (MATH, MAHT, MTAH, MTHA...). Word with repeated letters uses divided factorial: "MISSISSIPPI" = 11! / (4!×4!×2!) = 34,650 arrangements. Data/ranking: Rankings of top 5 movies from 100: P(100,5) ≈ 9.03 billion. Playlist order: 10 songs, play 5: P(10,5) = 30,240 unique play orders.
What is a factorial and how is it used in permutations?
A factorial (written n!) is the product of all positive integers from 1 to n. Definition: n! = n × (n−1) × (n−2) × ⋯ × 2 × 1. Special case: 0! = 1 (by mathematical definition). Factorial values: 1! = 1. 2! = 2. 3! = 6. 4! = 24. 5! = 120. 6! = 720. 7! = 5,040. 10! = 3,628,800. 20! ≈ 2.43 × 10¹⁸. Why factorials grow so fast: 10! = 3.6 million. 20! = 2.4 quintillion. 52! (deck of cards) ≈ 8 × 10⁶⁷ — more than atoms in the observable universe. Role in permutations: P(n,r) = n!/(n−r)!. The denominator (n−r)! "cancels out" the items you're NOT arranging. This is the shortcut P(n,r) = n × (n−1) × ⋯ × (n−r+1). Role in combinations: C(n,r) = n!/(r!(n−r)!). The r! in the denominator accounts for all r! orderings of the same selection. Factorial in probability: Probability of a specific arrangement of n items = 1/n!. Probability that 52 cards dealt in a specific order: 1/52! ≈ 0 (effectively impossible).

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

Permutation Formula Reference
Notation Formula Description
P(n, r)n! / (n−r)!Permutations of r items from n
P(n, n)n!All permutations of n items
P(n, 1)nChoose any 1 from n
P(n, 0)1Empty selection (1 way)
n!n×(n−1)×⋯×2×1Factorial of n
0!1By definition
Permutation vs Combination Quick Reference
Scenario Order Matters? Formula Type
Arranging 3 books on a shelfYesP(n,r) = n!/(n−r)!Permutation
Choosing 3 books from 10 to readNoC(n,r) = n!/(r!(n−r)!)Combination
Horse race: 1st, 2nd, 3rd placeYesP(n,r)Permutation
Lottery: pick 6 numbers from 49NoC(n,r)Combination
4-digit PIN from digits 0–9Yes (with repeats)nʳ = 10⁴ = 10,000Repetition allowed
Anagram of MATHYes (all letters)P(4,4) = 4! = 24Permutation
Common Permutation Values
n P(n,1) P(n,2) P(n,3) P(n,n)
33666
44122424
552060120
6630120720
885633640,320
1010907203,628,800

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.

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.