Permutation and Combination Calculator – P(n,r) and C(n,r) Calculator with Factorial

Free online permutation and combination calculator. Calculate P(n,r), C(n,r), and factorials with step-by-step solutions. Compare permutations vs combinations and understand when to use each.

Permutation and Combination Calculator

Advanced Tool for Computing Arrangements and Selections with Complete Analysis

Permutations and Combinations

Compare both calculations side-by-side

Permutation Calculator

P(n,r) = n! / (n-r)! - Order matters

Combination Calculator

C(n,r) = n! / (r! × (n-r)!) - Order doesn't matter

Factorial Calculator

n! = 1 × 2 × 3 × ... × n

Understanding Permutations & Combinations

Permutations and combinations are fundamental counting principles. Both answer "how many ways?" but with different perspectives. The key distinction: permutations count ordered arrangements (order matters), while combinations count unordered selections (order doesn't matter).

Permutations: Used when arrangement order is critical. Example: selecting first, second, third place winners. (1st, 2nd, 3rd) = (Alice, Bob, Carol) differs from (Bob, Alice, Carol). Password formation, race placements, word arrangements—all use permutations.

Combinations: Used when selection is all that matters. Example: choosing 3 people for a committee. {Alice, Bob, Carol} same as {Carol, Alice, Bob}. Lottery draws, team selection, committee formation—all use combinations.

Mathematically, permutations always exceed combinations for same n and r (except when r=0 or r=n). This is because ordering creates more possibilities. Permutation P(n,r) = Combination C(n,r) × r! (the r! accounts for all possible orderings of r items).

Key Distinction: Ask yourself: "Does the order matter?" If yes → permutation. If no → combination. This single question determines which formula to use.

Key Features & Capabilities

This comprehensive calculator provides complete analysis:

🔄 Permutations Calculate P(n,r) with order
🔄 Combinations Calculate C(n,r) without order
🔄 Compare Both Side-by-side comparison
🔢 Factorial n! calculation directly
📋 Formula Display Shows exact formula used
📊 Step-by-Step Detailed breakdown shown
🔍 Relationship Explains P vs C ratio
📊 Multiple Stats Comprehensive analysis
📋 Large Numbers Handles big values
📋 Copy Function One-click copy results
🎓 Educational Learn combinatorics
📱 Responsive Works all devices

How to Use This Calculator

Step-by-Step Guide

  1. Determine Need: Ask "does order matter?" for your problem.
  2. Choose Tab: Select Permutation, Combination, Compare Both, or Factorial tab.
  3. Identify n and r: n = total items, r = items to select/arrange.
  4. Enter Values: Input n and r (r must not exceed n).
  5. Click Calculate: Press Calculate to get instant result.
  6. Review Details: See formula used, step-by-step calculation, and statistics.
  7. Compare (Optional): Use Compare Both tab to see P(n,r) vs C(n,r) relationship.
  8. Copy Results: Copy result or clear for new calculation.

Tips for Accurate Use

  • Constraint Check: Ensure r ≤ n. Result is 0 or invalid if r > n.
  • Integer Values: Both n and r must be non-negative integers.
  • Large Factorials: For n > 100, factorials become astronomically large. Results shown in scientific notation when needed.
  • Real-World Context: Always verify formula choice matches your problem context.
  • Order Verification: If unsure, compare P(n,r) and C(n,r)—P will always be larger or equal.

Complete Formulas Guide

Permutation Formula

Permutation: P(n,r) or ₙPᵣ
P(n,r) = n! / (n-r)!

Or equivalently:
P(n,r) = n × (n-1) × (n-2) × ... × (n-r+1)

Where:
n = total number of items
r = number of items to arrange
! = factorial (n! = 1×2×3×...×n)

Combination Formula

Combination: C(n,r) or ₙCᵣ or (n choose r)
C(n,r) = n! / (r! × (n-r)!)

Or equivalently:
C(n,r) = P(n,r) / r!

Where:
n = total number of items
r = number of items to select
r! removes duplicate combinations

Factorial Formula

Factorial: n!
n! = 1 × 2 × 3 × 4 × ... × n

Special cases:
0! = 1 (by definition)
1! = 1

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

Relationship Between P and C

Why Permutations Exceed Combinations
P(n,r) = C(n,r) × r!

Permutation counts all orderings.
Combination counts once per selection.
Multiply combination by r! = all orderings of r items

Example: P(3,2) = 6, C(3,2) = 3
6 = 3 × 2! means 3 selections × 2 orderings each

Key Concepts Explained

Order Matters (Permutations)

In permutations, arrangement sequence is critical. {1,2,3}, {1,3,2}, {2,1,3}, {2,3,1}, {3,1,2}, {3,2,1} are all different permutations. Example scenarios: password digits, race placements, word letter arrangements, seating positions.

Order Doesn't Matter (Combinations)

In combinations, only the selection matters. {1,2,3}, {1,3,2}, {2,1,3}, etc. are all the SAME combination—just one selection. Example scenarios: lottery number selection, committee member choice, team formation, subset selection.

Factorial Growth

Factorials grow extremely fast. 5! = 120, 10! = 3,628,800, 20! ≈ 2.4×10¹⁸. This is why permutation and combination results explode with larger n. Computing 100! requires scientific notation.

Zero and One Cases

P(n,0) = 1 (one way to arrange nothing). P(n,n) = n! (all arrangements). C(n,0) = 1 (one way to select nothing). C(n,n) = 1 (one way to select everything). C(n,1) = n (one way to select each item). These edge cases are mathematically elegant.

When P(n,r) = C(n,r)

Only when r = 0 or r = 1. P(n,0) = C(n,0) = 1. P(n,1) = C(n,1) = n. Otherwise, P(n,r) > C(n,r) because multiple orderings exist for each combination.

Worked Examples

Example 1: Password Combinations

Problem: How many 3-digit passwords from digits 0-9 with no repetition?

Solution:
This is permutation (order matters: 123 ≠ 321)
n = 10 (digits 0-9)
r = 3 (3 digits in password)

P(10,3) = 10! / (10-3)! = 10! / 7!
= 10 × 9 × 8
= 720 possible passwords

Example 2: Lottery Selection

Problem: Choose 6 numbers from 49 for lottery. How many combinations?

Solution:
This is combination (order doesn't matter)
n = 49 (available numbers)
r = 6 (numbers to select)

C(49,6) = 49! / (6! × 43!)
= (49 × 48 × 47 × 46 × 45 × 44) / (6 × 5 × 4 × 3 × 2 × 1)
= 10,068,347,520 / 720
≈ 13,983,816 combinations

Example 3: Committee Selection

Problem: Choose 4 people from 8 for a committee. How many ways?

Solution:
This is combination (committee members equal)
n = 8 (total people)
r = 4 (committee size)

C(8,4) = 8! / (4! × 4!)
= (8 × 7 × 6 × 5) / (4 × 3 × 2 × 1)
= 1,680 / 24
= 70 ways

Example 4: Race Placements

Problem: Award 1st, 2nd, 3rd place from 10 runners. How many ways?

Solution:
This is permutation (positions matter)
n = 10 (total runners)
r = 3 (places to award)

P(10,3) = 10! / (10-3)! = 10! / 7!
= 10 × 9 × 8
= 720 different placements

Example 5: Arranging Letters

Problem: How many ways to arrange 5 distinct letters?

Solution:
Arrange all 5 letters (order matters)
n = 5, r = 5

P(5,5) = 5! = 5 × 4 × 3 × 2 × 1 = 120

Or P(n,n) formula: 5! / (5-5)! = 5! / 0! = 120 / 1 = 120

Frequently Asked Questions

How do I know if I need permutation or combination?
Ask: "Does order matter?" If yes (arranging, ranking, sequencing) → permutation. If no (selecting, choosing, grouping) → combination. This single question decides everything.
Why is P(n,r) always ≥ C(n,r)?
Because permutation counts each combination r! times (once for each ordering of r items). P(n,r) = C(n,r) × r! shows this relationship directly.
What if r > n?
Result is mathematically undefined or zero. Cannot arrange/select more items than available. Calculator will show error if r > n.
What does 0! = 1 mean?
By mathematical definition, 0! = 1. This makes formulas work consistently at boundaries. P(n,0) = 1 (one way to arrange nothing).
Can I have repeated items?
These formulas assume distinct items without repetition. With repetition allowed, formulas become: nʳ for permutations, more complex for combinations. Not covered here.
Why grow so fast?
Factorials multiply all integers up to n. Each additional number multiplies the result. 10! is 3.6 million; 20! is 2.4×10¹⁸. Exponential growth.
What's binomial coefficient?
Binomial coefficient = combination = C(n,r) = "n choose r". It appears in binomial expansion and probability. Same formula, different context.
Real-world applications?
Permutations: passwords, logins, arrangements, rankings. Combinations: lottery, committees, teams, samples, subsets. Both in probability, statistics, cryptography.
What's the difference between P(n,r) and nʳ?
P(n,r) = arrangements without repetition. nʳ = arrangements with repetition allowed. Passwords allowing repeated digits use nʳ; distinct items use P(n,r).
Can I verify my answer?
Yes. Check: P(n,r) = C(n,r) × r!. If this holds true, calculations correct. Also verify r ≤ n and all values non-negative integers.

Calculate Permutations & Combinations

Whether you're solving combinatorics problems, analyzing probabilities, planning arrangements, or selecting subsets, this calculator provides instant answers with complete analysis. Understand when to use permutations vs combinations. Fast, accurate, and completely free.