TFT

Permutation & Combination Calculator (nPr & nCr)

Solve counting problems instantly. Calculate the number of permutations (order matters) or combinations (order doesn't matter) for selecting items from a set.

Permutation & Combination Calculator

Calculate permutations and combinations with or without repetition

About Permutations & Combinations

Permutation: The number of ways to arrange r items from n distinct items where order matters. For example, ABC and BAC are different permutations.

Combination: The number of ways to select r items from n distinct items where order doesn't matter. For example, ABC and BAC are the same combination.

With Repetition: Items can be selected multiple times. For example, selecting 3 flavors from 5 ice cream flavors where you can pick the same flavor twice.

How the Permutation & Combination Calculator Works

Enter n (total number of items) and r (number of items to select). Both must be non-negative integers, with r ≤ n. The calculator handles values up to very large numbers using arbitrary precision arithmetic.

Permutations (nPr) count arrangements where order matters. The formula is nPr = n! / (n-r)!. Combinations (nCr) count selections where order doesn't matter. The formula is nCr = n! / (r! × (n-r)!).

Results show both nPr and nCr values with step-by-step calculations. The relationship nPr = nCr × r! is displayed, showing that permutations equal combinations multiplied by the arrangements of selected items.

When You'd Actually Use This

Password security analysis

Calculate possible password combinations. An 8-character password from 95 characters has 95^8 possibilities. Understand brute-force resistance.

Lottery odds calculation

Find your odds of winning. Choosing 6 numbers from 49 gives C(49,6) = 13,983,816 combinations. That's why jackpots grow so large.

Committee formation

Determine ways to form a 5-person committee from 20 employees. Order doesn't matter, so use combinations: C(20,5) = 15,504 ways.

Seating arrangement planning

Calculate ways to seat 8 guests at a table. If seats are distinct, it's P(8,8) = 8! = 40,320 arrangements. Circular tables divide by 8.

Menu combination analysis

Count possible meal combinations. Choose 3 sides from 8 options: C(8,3) = 56 combinations. Helps design menu variety and pricing.

Sports bracket possibilities

Calculate tournament outcome combinations. A 64-team single-elimination bracket has 2^63 possible outcomes - explaining why perfect brackets are impossible.

What to Know Before Using

Order matters for permutations.ABC and BAC are different permutations but the same combination. Ask: does rearranging create a different outcome?

Factorials grow extremely fast.10! = 3,628,800. 20! exceeds 2 quintillion. Large factorials explain why exhaustive search is impossible for many problems.

Combinations are always fewer than permutations.nCr = nPr / r!. For each combination of r items, there are r! ways to arrange them. More arrangements mean more permutations.

Special cases have simple answers.nPn = n! (all arrangements). nCn = 1 (only one way to choose all). nC0 = 1 (one way to choose nothing). nP1 = n (n ways to pick one).

Pro tip: For "at least" or "at most" problems, use the complement. C(52,5) - C(48,5) gives hands with at least one ace, easier than counting hands with 1, 2, 3, or 4 aces separately.

Common Questions

When do I use permutation vs combination?

Ask: does order matter? Lock combinations (1-2-3 vs 3-2-1) are actually permutations. Lottery picks are combinations - order of drawing doesn't matter.

What does factorial mean?

n! = n × (n-1) × (n-2) × ... × 2 × 1. It's the number of ways to arrange n distinct items. By convention, 0! = 1.

Can r be larger than n?

No. You can't select more items than available. Both nPr and nCr equal 0 when r > n. The calculator will show an error.

What about repetition?

These formulas assume no repetition. For permutations with repetition: n^r. For combinations with repetition: C(n+r-1, r).

Why is 0! equal to 1?

It's defined that way for mathematical consistency. There's exactly one way to arrange zero items (do nothing). It makes formulas work correctly.

How do I calculate by hand?

For nPr: multiply n × (n-1) × ... for r terms. For nCr: calculate nPr then divide by r!. Cancel common factors to simplify.

What's Pascal's triangle?

A triangular array where each entry is a combination value. Row n, position r gives C(n,r). Each entry equals the sum of two entries above it.