Permutation & Combination Calculator

Calculate permutations (nPr) and combinations (nCr) for any set of numbers. Includes factorial calculator and step-by-step explanations.

Permutation Calculator

Combination Calculator

Factorial Calculator

Permutation & Combination Formulas

Permutation (nPr)

nPr = n! / (n-r)!

Example: 5P3 = 5!/(5-3)! = 120/2 = 60 ways to arrange 3 items from 5

Combination (nCr)

nCr = n! / (r!(n-r)!)

Example: 5C3 = 5!/(3!×2!) = 120/(6×2) = 10 ways to choose 3 from 5

Factorial (n!)

n! = n × (n-1) × ... × 2 × 1

Example: 5! = 5×4×3×2×1 = 120. Note: 0! = 1 by definition

How to Use This Calculator

1

Choose Calculation Type

Select Permutation if order matters, Combination if order doesn't matter, or Factorial to calculate n!.

2

Enter Values

For permutation/combination, enter n (total items) and r (items to arrange/choose). For factorial, enter just n.

3

Calculate Result

Click Calculate to get the result. The calculator shows the formula used and the final answer.

4

Understand the Difference

Permutations count arrangements (order matters). Combinations count selections (order doesn't matter). nPr ≥ nCr always.

Example Calculations

Password Arrangements

How many 3-digit passwords can be made from 5 digits?

Solution: 5P3 = 5!/(5-3)! = 120/2 = 60

Order matters, so use permutation.

Team Selection

Choose 3 players from 5 for a team. How many ways?

Solution: 5C3 = 5!/(3!×2!) = 120/12 = 10

Order doesn't matter, so use combination.

Factorial Calculation

Calculate 6! for probability calculations

Solution: 6! = 6×5×4×3×2×1 = 720

Factorials grow very quickly with larger numbers.

Where Permutations & Combinations Are Used

Lottery & Games

Calculate lottery odds, poker hand probabilities, and game combinations. Essential for understanding chances of winning.

Password Security

Determine password strength and possible combinations. Calculate how many unique passwords can be created from character sets.

Tournament Scheduling

Calculate match-ups, round-robin schedules, and playoff brackets. Organize competitions efficiently with combinatorics.

Genetics & Biology

Calculate genetic combinations, DNA sequences, and inheritance patterns. Essential for genetic probability calculations.

Computer Science

Algorithm analysis, data structure optimization, and complexity calculations. Fundamental for computational theory.

Cryptography

Calculate encryption key possibilities, cipher combinations, and security strength. Critical for information security.

Frequently Asked Questions

What's the difference between permutation and combination?

Permutation is when order matters (ABC ≠ BAC). Combination is when order doesn't matter (ABC = BAC = CAB). Use nPr for arrangements, nCr for selections.

When do I use nPr vs nCr?

Use nPr (permutation) when the order of selection matters, like arranging books on a shelf. Use nCr (combination) when order doesn't matter, like choosing team members.

What is factorial?

Factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5×4×3×2×1 = 120. It's used in permutation and combination formulas.

Why is 0! = 1?

0! = 1 by mathematical convention. This definition makes formulas work correctly, especially in combinations where nC0 = 1 (there's exactly one way to choose nothing).

What's the maximum n value I can calculate?

The calculator supports factorials up to 170! due to JavaScript number limits. Beyond this, results would exceed maximum safe integer values and become inaccurate.

How are permutations and combinations used in probability?

They calculate the number of possible outcomes. For example, lottery odds use combinations (order doesn't matter), while race finishing orders use permutations (order matters).