March 28, 20264 min read

Permutation & Combination Calculator — nPr and nCr Formulas

Calculate permutations (nPr) and combinations (nCr) instantly. Learn the factorial formulas, when order matters, with lottery, card, and seating examples.

permutation combination nPr nCr calchub
Ad 336x280

Here's the classic stumbling block: you're counting arrangements and you know whether order matters — but you're not sure which formula to reach for. Permutations and combinations are both about choosing from a group, with one key difference. Calculate both with the CalcHub Permutation & Combination Calculator.

The Core Difference

Permutation (nPr): Order matters. Choosing first, second, and third place is different from choosing third, first, and second. Combination (nCr): Order doesn't matter. Choosing teammates {Alice, Bob, Carol} is the same regardless of who you pick first.

A useful way to remember: your PIN code is a permutation (order matters). Your pizza toppings are a combination (doesn't matter what order they're listed).

Permutation Formula

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

Where n is the total number of items and r is how many you're selecting.

Example: How many ways can 3 runners finish in 1st, 2nd, and 3rd from a field of 8?

P(8, 3) = 8! / (8−3)! = 8! / 5! = (8 × 7 × 6 × 5!) / 5! = 336 ways

Combination Formula

$$C(n, r) = \frac{n!}{r!(n-r)!} = \binom{n}{r}$$

Example: How many ways can you choose 3 people from a group of 8 to form a committee?

C(8, 3) = 8! / (3! × 5!) = (8 × 7 × 6) / (3 × 2 × 1) = 336 / 6 = 56 ways

The ratio P(8,3) / C(8,3) = 336 / 56 = 6 = 3! — exactly the number of ways to arrange 3 chosen items. This makes sense: every combination corresponds to 3! permutations.

Factorial Reference Table

nn!
01
11
22
36
424
5120
6720
75,040
840,320
103,628,800
12479,001,600
Note: 0! = 1 by convention — it's the empty product, meaning there's exactly one way to arrange nothing.

Real-World Examples

Lottery (Combination): India's lottery picks 6 numbers from 1–49. C(49, 6) = 49! / (6! × 43!) = 13,983,816 possible tickets. Order doesn't matter — matching the same 6 numbers wins regardless of draw order. Password (Permutation): A 4-digit PIN from digits 0–9, no repeats. P(10, 4) = 10!/6! = 10 × 9 × 8 × 7 = 5,040 combinations Card Hands (Combination): 5-card poker hand from 52 cards. C(52, 5) = 52! / (5! × 47!) = 2,598,960 possible hands Seating Arrangements (Permutation): 5 people in 5 chairs. P(5, 5) = 5! = 120 arrangements

Permutations with Repetition Allowed

If items can repeat: n^r

Example: 4-digit PIN allowing repeated digits: 10⁴ = 10,000 possible PINs (0000 through 9999)

How do I know if a problem is a permutation or combination?

Ask yourself: if I swap the order of my chosen items, do I get a different result? A different race finish — yes, it's a permutation. A different team roster — no, it's a combination. Phrases like "arrangements," "ranking," "sequence" suggest permutations. "Groups," "teams," "selections," "subsets" suggest combinations.

What does C(n,r) = C(n, n-r) mean?

Choosing 3 items from 10 is equivalent to choosing which 7 items to leave out. So C(10,3) = C(10,7) = 120. This symmetry is also reflected in Pascal's Triangle, where C(n,r) appears at row n, position r.

Why does 0! equal 1?

Mathematically, 0! = 1 makes combinatorics consistent: C(n, 0) = n! / (0! × n!) = 1, which correctly represents "there's exactly one way to choose nothing from a set." It also makes the gamma function and many series expansions work cleanly.

Ad 728x90