🎲 Permutation & Combination Calculator

Calculate nPr, nCr, and factorials for counting and probability problems

Permutation (nPr)

Order matters - arrangements

nPr =
720
10P3 = 10!/(10-3)!

Combination (nCr)

Order doesn't matter - selections

nCr =
120
10C3 = 10!/(3!×7!)

Factorial (n!)

Total arrangements of n items

n! =
120
5! = 5×4×3×2×1

How to Use This Calculator

  1. Determine whether your problem involves permutations (order matters) or combinations (order doesn't matter)
  2. For permutations: Enter n (total items available) and r (how many you're arranging in order)
  3. For combinations: Enter n (total items available) and r (how many you're selecting, regardless of order)
  4. For factorials: Simply enter the number n to calculate n! (used in arrangements where you use all items)
  5. Important: r must be less than or equal to n, and both must be non-negative integers
  6. Results calculate instantly as you type—no need to click a button
  7. Review the formula displayed below each result to understand the calculation
  8. Key difference: nPr ≥ nCr always, because permutations count more arrangements (ABC, BAC, CAB are different permutations but one combination)
  9. Use factorial (n!) when you want to arrange all n items: arranging 5 books = 5! = 120 ways
  10. For large numbers, results may use scientific notation (e.g., 1.5e+12 = 1,500,000,000,000)

Understanding Permutations & Combinations

What Are Permutations and Combinations?

Permutations and combinations are counting methods used in probability, statistics, and discrete mathematics. Both answer "how many ways can I select items?" but differ based on whether order matters. Permutation (nPr): Counts arrangements where order is important. Formula: nPr = n! / (n-r)!, where n = total items, r = items selected. Example: Arranging 3 books from 8 on a shelf where position matters. First position has 8 choices, second has 7, third has 6 → 8×7×6 = 336 arrangements. Combination (nCr): Counts selections where order doesn't matter. Formula: nCr = n! / [r!(n-r)!]. Example: Choosing 3 books from 8 to take on vacation (order irrelevant). There are 336/6 = 56 ways (dividing by 3! removes duplicate orderings). Ask yourself: "If I swap two items, does it create a different scenario?" If yes → permutation. If no → combination. Factorial (n!) is the product of all positive integers up to n: 5! = 5×4×3×2×1 = 120. It represents total ways to arrange n distinct items.

When to Use Each: Permutations vs Combinations

Choosing between permutations and combinations depends on whether position or order creates different outcomes. Use Permutations when: Race results (1st, 2nd, 3rd place are distinct), passwords (ABC ≠ CBA), seating arrangements (who sits where), lock combinations (ironically, these are permutations—2-5-8 ≠ 8-5-2), medal assignments (gold/silver/bronze to different people), arranging letters to form words (CAT ≠ TAC), job rankings (VP, director, manager are different roles). Example: 8 runners, top 3 get medals. How many outcomes? 8P3 = 8×7×6 = 336 ways. Use Combinations when: Lottery numbers (1-5-10 same as 10-1-5), choosing team members (no positions assigned), selecting pizza toppings (pepperoni+mushrooms same as mushrooms+pepperoni), forming committees (no hierarchy), dealing poker hands (card order irrelevant), selecting items for a group (no ranking). Example: 12 people, choose 5 for a committee. How many ways? 12C5 = 12!/(5!×7!) = 792 ways. Quick test: Would "Alice-Bob-Charlie" and "Charlie-Bob-Alice" be different? If yes → permutation. If no → combination.

The Mathematics Behind the Formulas

Understanding why these formulas work helps you remember and apply them. Factorial (n!): If you have n items, there are n choices for the first position, (n-1) for the second, (n-2) for the third, etc. Total arrangements = n×(n-1)×(n-2)×...×2×1 = n!. Example: Arrange 4 books → 4×3×2×1 = 24 ways. Note: 0! = 1 by definition (useful in formulas). Permutation nPr = n!/(n-r)!: This formula calculates arrangements of r items from n. Example: 10 people, arrange 3 in line. Multiply top r factors: 10×9×8 = 720. Algebraically: 10! / (10-3)! = 10! / 7! = (10×9×8×7!)/ 7! = 10×9×8. The (n-r)! cancels out the trailing factors. Combination nCr = n!/[r!(n-r)!]: Start with permutations (nPr), then divide by r! to eliminate duplicate orderings. Example: Choose 3 from 10. Permutations = 720. But ABC, BAC, CAB, ACB, BCA, CBA are the same combination. There are 3! = 6 orderings per combination. So 720 / 6 = 120 combinations. The formula nCr = nPr / r! captures this. Relationship: nCr = nPr / r!, so nPr = r! × nCr (permutations are combinations times the ways to arrange r items).

Real-World Applications and Examples

Permutations and combinations appear in countless real-world scenarios. Probability & Gambling: Lottery odds are combinations. Mega Millions: choose 5 from 70, then 1 from 25 → (70C5)×(25C1) = 302,575,350 possible tickets. Poker hands: 52 cards, choose 5 → 52C5 = 2,598,960 hands. Calculating probabilities requires counting favorable outcomes (combinations) divided by total outcomes. Passwords & Security: How many 8-character passwords from 26 letters + 10 digits + 10 symbols = 46 options? With repetition allowed: 46⁸ ≈ 20 trillion. Without repetition: 46P8 ≈ 1.1 trillion. Biology & Genetics: DNA sequences (permutations of A, T, C, G), genetic diversity in populations. Sports: Tournament brackets (combinations of matchups), fantasy sports lineups. Business: Project scheduling (arranging tasks), inventory management (selecting products), quality control sampling (combinations of items to inspect). Computer Science: Algorithm complexity, generating all subsets/arrangements, cryptography keys. Everyday Life: Arranging furniture (permutations if placement matters), choosing toppings for a meal (combinations), planning itineraries (permutations of activities in order). Understanding these concepts enables better decision-making in planning, risk assessment, and optimization.

Frequently Asked Questions

What's the difference between permutations and combinations?

Permutations count arrangements where order matters. Combinations count selections where order doesn't matter. Example: Choosing 3 people from 5 for gold/silver/bronze medals (order matters) → permutation: 5P3 = 60 ways. Choosing 3 people from 5 for a committee (no ranking) → combination: 5C3 = 10 ways. Permutations always give a larger number because ABC and BAC are different arrangements but the same combination.

How do I calculate permutations (nPr)?

Use the formula nPr = n! / (n-r)!, where n is total items, r is items selected, and ! means factorial. Example: How many ways to arrange 3 books from 8? 8P3 = 8! / (8-3)! = 8! / 5! = (8×7×6×5!) / 5! = 8×7×6 = 336 ways. The formula counts ordered arrangements.

How do I calculate combinations (nCr)?

Use the formula nCr = n! / [r!(n-r)!]. Example: How many ways to choose 3 toppings from 8? 8C3 = 8! / [3!(8-3)!] = 8! / (3!×5!) = (8×7×6) / (3×2×1) = 336 / 6 = 56 ways. This divides by r! to remove duplicate orderings, since pepperoni-mushroom-olives is the same as olives-pepperoni-mushroom.

What is a factorial and how is it calculated?

A factorial (n!) is the product of all positive integers from 1 to n. Example: 5! = 5×4×3×2×1 = 120. Special case: 0! = 1 (by definition). Factorials grow extremely fast: 10! = 3,628,800. They represent the number of ways to arrange n items in order. Example: 5 books can be arranged on a shelf in 5! = 120 different orders.

When do I use permutations vs combinations in real life?

Use permutations when position/order matters: race rankings (1st, 2nd, 3rd), passwords (ABC ≠ CAB), seating arrangements, lock combinations (ironically misnamed—they're permutations!). Use combinations when order doesn't matter: lottery numbers (1-5-10 same as 10-1-5), choosing team members, selecting toppings, forming committees, dealing poker hands. Ask: 'Would swapping two items create a different outcome?' If yes, use permutation. If no, use combination.

What are some common examples of permutation and combination problems?

Permutation examples: How many 4-digit PINs? (10P4 if no repeats), arranging 7 people in 7 chairs (7! = 5,040 ways), assigning gold/silver/bronze medals to 8 runners (8P3 = 336). Combination examples: Lottery picking 6 numbers from 49 (49C6 = 13,983,816 combinations), choosing 5 players from 12 for a basketball team (12C5 = 792), selecting 3 toppings from 10 (10C3 = 120).

Is this permutation and combination calculator free?

Yes! Completely free with no limits on calculations, no hidden fees, and no account required. Use it for homework, exam prep, lottery analysis, or professional statistics work. All calculations happen in your browser for privacy.