Calculator

Permutation and Combination Calculator: Calculate nPr and nCr with Formulas

Free permutation and combination calculator with formulas, examples, and step-by-step solutions. Calculate nPr, nCr, factorials with detailed explanations and comparison tables.
Permutation and Combination Calculator

Permutation and Combination Calculator

A permutation and combination calculator is a mathematical tool that computes the number of ways to arrange or select items from a set, using factorial notation and combinatorial formulas to solve nPr (permutations where order matters) and nCr (combinations where order doesn't matter) problems. These fundamental counting principles enable students, statisticians, probability theorists, and researchers to calculate arrangements, selections, lottery odds, sample spaces, binomial coefficients, and probability distributions for discrete mathematics, statistics courses, competitive exams, cryptography, genetics, quality control sampling, and any application requiring systematic counting of possible outcomes in ordered or unordered selections.

🔢 Interactive Permutation & Combination Calculator

Calculate nPr, nCr, and Factorials

Permutation Calculator (nPr)

Calculate arrangements where order matters

Combination Calculator (nCr)

Calculate selections where order doesn't matter

Factorial Calculator (n!)

Calculate factorial of a number

Understanding Permutations and Combinations

Permutations and combinations are fundamental concepts in combinatorics that count the number of ways to arrange or select items. The key difference is whether the order of selection matters.

Permutation Formula

Definition and Formula

Permutation Formula (nPr):

\[ P(n,r) = \frac{n!}{(n-r)!} \]

Where:

\( n \) = Total number of items

\( r \) = Number of items to arrange

\( n! \) = n factorial = \( n \times (n-1) \times (n-2) \times ... \times 2 \times 1 \)

Notation: \( nPr \) or \( P(n,r) \) or \( ^nP_r \)

Permutation Example

Problem: How many ways can you arrange 3 books from a shelf of 5 books?

Given: n = 5, r = 3

Formula: \( P(5,3) = \frac{5!}{(5-3)!} = \frac{5!}{2!} \)

Step 1: Calculate factorials

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

2! = 2 × 1 = 2

Step 2: Apply formula

\( P(5,3) = \frac{120}{2} = 60 \)

Answer: There are 60 different ways to arrange 3 books from 5 books.

Combination Formula

Definition and Formula

Combination Formula (nCr):

\[ C(n,r) = \frac{n!}{r!(n-r)!} \]

Where:

\( n \) = Total number of items

\( r \) = Number of items to select

\( n! \) = n factorial

Notation: \( nCr \) or \( C(n,r) \) or \( \binom{n}{r} \) or \( ^nC_r \)

Combination Example

Problem: How many ways can you select 3 students from a class of 10?

Given: n = 10, r = 3

Formula: \( C(10,3) = \frac{10!}{3!(10-3)!} = \frac{10!}{3! \times 7!} \)

Step 1: Simplify

\( C(10,3) = \frac{10 \times 9 \times 8 \times 7!}{3! \times 7!} = \frac{10 \times 9 \times 8}{3!} \)

Step 2: Calculate

\( C(10,3) = \frac{720}{6} = 120 \)

Answer: There are 120 different ways to select 3 students from 10.

Key Differences: Permutation vs Combination

AspectPermutation (nPr)Combination (nCr)
OrderOrder mattersOrder doesn't matter
Formula\( \frac{n!}{(n-r)!} \)\( \frac{n!}{r!(n-r)!} \)
ResultArrangementsSelections
ExampleSeating arrangementsTeam selection
ValueAlways ≥ nCrAlways ≤ nPr
Keywords"arrange", "order", "rank""choose", "select", "group"

Factorial Definition

Factorial (n!):

\[ n! = n \times (n-1) \times (n-2) \times ... \times 3 \times 2 \times 1 \]

Special Cases:

\( 0! = 1 \) (by definition)

\( 1! = 1 \)

Examples:

3! = 3 × 2 × 1 = 6

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

10! = 3,628,800

Factorial Reference Table

nn!nn!
01840,320
119362,880
22103,628,800
361139,916,800
42412479,001,600
5120151,307,674,368,000
6720202.43 × 10¹⁸
75,040251.55 × 10²⁵

Relationship Between nPr and nCr

Relationship Formula:

\[ nPr = nCr \times r! \]

Or equivalently:

\[ nCr = \frac{nPr}{r!} \]

This shows that permutations are combinations multiplied by all possible arrangements (r!) of selected items.

Common Formulas and Properties

Combination Properties

PropertyFormula
Symmetry\( C(n,r) = C(n,n-r) \)
Choosing None\( C(n,0) = 1 \)
Choosing All\( C(n,n) = 1 \)
Pascal's Identity\( C(n,r) = C(n-1,r-1) + C(n-1,r) \)
Sum Property\( \sum_{r=0}^{n} C(n,r) = 2^n \)

Special Cases

Permutation of n objects all taken: \( P(n,n) = n! \)

Permutation with repetition: \( n^r \)

Circular permutation: \( (n-1)! \)

Permutation with identical objects: \( \frac{n!}{n_1! \times n_2! \times ... \times n_k!} \)

Real-World Applications

Permutation Applications

  • Password creation: Number of possible passwords with ordered characters
  • Race rankings: Different podium finishes (gold, silver, bronze)
  • Seating arrangements: Ways to arrange people in specific seats
  • Lock combinations: Ordered digit sequences
  • Competition rankings: First, second, third place awards
  • DNA sequences: Order of nucleotide bases

Combination Applications

  • Lottery selections: Choosing winning numbers (order irrelevant)
  • Committee formation: Selecting team members
  • Card hands: Poker hands, bridge deals
  • Menu choices: Selecting pizza toppings
  • Sample selection: Quality control sampling
  • Genetics: Possible gene combinations

Step-by-Step Problem Solving

How to Identify Permutation vs Combination

Decision Flowchart:

  1. Does order matter?
    • YES → Use Permutation (nPr)
    • NO → Use Combination (nCr)
  2. Key words for Permutation: arrange, order, rank, sequence, position
  3. Key words for Combination: choose, select, group, pick, committee
  4. Test question: If I swap two items, is it a different outcome?
    • YES → Permutation
    • NO → Combination

Sample Calculation Table

nrnPrnCrRelationship
52201020 = 10 × 2!
53601060 = 10 × 3!
62301530 = 15 × 2!
103720120720 = 120 × 3!
841,680701,680 = 70 × 4!

Common Problem Types

Problem Type 1: Arranging Letters

Question: How many different 4-letter arrangements can be made from the word "COMPUTER"?

Solution: n = 8 letters, r = 4 positions

\( P(8,4) = \frac{8!}{(8-4)!} = \frac{8!}{4!} = \frac{40,320}{24} = 1,680 \)

Answer: 1,680 arrangements

Problem Type 2: Committee Selection

Question: A committee of 4 people is to be formed from 9 candidates. How many ways can this be done?

Solution: n = 9, r = 4 (order doesn't matter)

\( C(9,4) = \frac{9!}{4!(9-4)!} = \frac{9!}{4! \times 5!} = \frac{362,880}{24 \times 120} = 126 \)

Answer: 126 ways

Problem Type 3: Probability Applications

Question: What is the probability of being dealt 2 aces from a standard deck of 52 cards?

Solution:

Favorable outcomes: C(4,2) = 6 ways to choose 2 aces from 4

Total outcomes: C(52,2) = 1,326 ways to choose any 2 cards

Probability = 6/1,326 = 1/221 ≈ 0.0045 or 0.45%

Important Constraints and Conditions

⚠️ Conditions to Remember

  • n ≥ r: Cannot select more items than available
  • n ≥ 0, r ≥ 0: Both must be non-negative integers
  • n! grows rapidly: 20! is already over 2 quintillion
  • nPr ≥ nCr: Permutations always greater than or equal to combinations
  • Calculator limits: Factorials beyond 170! may cause overflow
  • 0! = 1: This is a convention, not intuitive but essential

Tips for Solving Problems

Problem-Solving Strategy:

  1. Read carefully: Identify if order matters
  2. Identify n and r: Determine total items and selection size
  3. Choose formula: Permutation or combination
  4. Check constraints: Ensure n ≥ r
  5. Calculate step-by-step: Break down factorials
  6. Verify answer: Does result make logical sense?
  7. Consider special cases: Restrictions, identical items

Frequently Asked Questions

What is the difference between permutation and combination?

Permutations count arrangements where order matters (ABC ≠ BAC), using formula nPr = n!/(n-r)!. Combinations count selections where order doesn't matter (ABC = BAC = CAB), using formula nCr = n!/[r!(n-r)!]. Example: Arranging 3 books from 5 is permutation (60 ways); selecting 3 books from 5 is combination (10 ways). Test: If swapping items creates different outcome, use permutation.

How do I calculate nPr and nCr manually?

For nPr: Calculate n!, then divide by (n-r)!. Example: 5P3 = 5!/(5-3)! = 120/2 = 60. For nCr: Calculate n!, divide by r! and (n-r)!. Example: 5C3 = 5!/(3!×2!) = 120/(6×2) = 10. Simplify before calculating: Cancel common terms in numerator and denominator to avoid large numbers. Use calculator for factorials above 10.

When should I use permutation vs combination?

Use permutation when: arranging items in order (seating charts, rankings, passwords), position matters (race medals), or swapping items changes outcome. Use combination when: selecting groups (committees, teams), order irrelevant (lottery numbers, card hands), or swapping items doesn't change outcome. Keywords: "arrange/order" → permutation; "choose/select" → combination.

What does 0! equal and why?

0! = 1 by mathematical convention and necessity. Reasons: (1) Maintains consistency in formulas like nC0 = n!/[0!×n!] = 1 (one way to choose nothing). (2) Recursive definition: n! = n×(n-1)!, so 1! = 1×0!, thus 0! = 1. (3) Empty product: Product of no numbers is multiplicative identity = 1. This definition makes formulas work correctly for all cases.

How do I solve problems with restrictions?

Identify restrictions first: Must together (treat as single unit), must separate (subtract restricted cases), specific positions (fix those positions, arrange rest), or excluded items (reduce n). Example: Arrange 5 people where 2 must sit together: Treat pair as 1 unit, arrange 4 units = 4! = 24, then arrange pair internally = 2! = 2, total = 24×2 = 48 ways.

What is circular permutation?

Circular permutation arranges n items in circle where rotation doesn't create new arrangement. Formula: (n-1)! instead of n!. Example: Seating 5 people at round table = (5-1)! = 24 arrangements. Rationale: Fix one person's position to eliminate rotational duplicates. If reflections also identical (like necklace), divide by 2: (n-1)!/2. Used for round tables, necklaces, circular arrangements.

Key Takeaways

Permutations and combinations are fundamental counting principles that solve arrangement and selection problems. Understanding when order matters determines which formula to apply for accurate calculation of possible outcomes.

Essential principles to remember:

  • Permutation (nPr): Order matters, formula = n!/(n-r)!
  • Combination (nCr): Order doesn't matter, formula = n!/[r!(n-r)!]
  • Relationship: nPr = nCr × r!
  • Factorial: n! = n × (n-1) × ... × 2 × 1, with 0! = 1
  • Keywords: "arrange/order" → permutation; "choose/select" → combination
  • Always check: n ≥ r (cannot select more than available)
  • nPr ≥ nCr for same n and r values
  • Circular permutation: (n-1)! arrangements
  • Pascal's Identity: C(n,r) = C(n-1,r-1) + C(n-1,r)
  • Applications: Probability, lottery, passwords, committees, genetics

Getting Started: Use the interactive calculator at the top of this page to compute permutations, combinations, and factorials. Enter your values for n (total items) and r (items to select/arrange) to get instant results with step-by-step explanations. Practice with different values to build intuition for when each formula applies.

Shares: