Skip to content
Toolcroft

Math Calculators

Permutations & Combinations Calculator - nPr and nCr

Calculate permutations P(n,r) and combinations C(n,r) with step-by-step factorial work. Supports large values with BigInt arithmetic.

P(10,3) - Permutations

720

Order matters

C(10,3) - Combinations

120

Order doesn't matter

Formulas

P(10,3) = 10! / (10-3)! = 10! / 7!

C(10,3) = 10! / (3! × 7!) = P(10,3) / 3!

Steps

  1. nPr numerator: 10 × 9 × 8 = 720
  2. r! = 3! = 6
  3. nCr = 720 ÷ 6 = 120

Permutations vs. combinations

Permutations P(n, r) count ordered arrangements: picking a president, vice president, and secretary from 10 candidates is a permutation because the roles are distinct. Combinations C(n, r) count unordered selections: choosing 3 players from 10 for a team is a combination because the order of selection doesn't matter.

Formulas

P(n, r) = n! / (n − r)!: multiply n down to (n − r + 1).

C(n, r) = n! / (r! × (n − r)!): also written as the binomial coefficient "n choose r".

Example: poker hands

A standard 5-card hand dealt from a 52-card deck: C(52, 5) = 2,598,960. Since the cards in a hand are unordered, combinations are used, not permutations.

Real-world problems guide

ScenarioOrdered?Use
Selecting a committee of 3 from 10 people No C(10, 3) = 120
Arranging 4 books on a shelf from 8 choices Yes P(8, 4) = 1,680
4-digit PIN from digits 0–9 (no repeats) Yes P(10, 4) = 5,040
Lottery: pick 6 numbers from 49 No C(49, 6) = 13,983,816
How many ways to rank 1st, 2nd, 3rd from 20 runners? Yes P(20, 3) = 6,840

Combinations with repetition

When repetition is allowed (you can choose the same item more than once) and order doesn't matter, the count is the "multiset coefficient": C(n + r − 1, r). For example, choosing 3 flavors from 5 options with repetition allowed = C(5 + 3 − 1, 3) = C(7, 3) = 35. This covers scenarios like choosing 3 scoops of ice cream where you can pick the same flavor multiple times.

Why n! grows so fast

Factorial growth is faster than exponential growth. 10! = 3,628,800. 20! ≈ 2.4 × 10¹⁸ - larger than the number of seconds in the age of the universe. 52! (the number of ways to shuffle a standard deck of cards) ≈ 8 × 10⁶⁷ - more than the number of atoms in the observable universe. This is why brute-force search of large combinatorial spaces is computationally infeasible.