Permutation and Combination Calculator

Enter n (total items) and r (selected items) to compute P(n,r) for ordered selections and C(n,r) for unordered selections, plus repetition variants and n! factorial.

How to use this calculator

  1. Enter n (total items in the pool) and r (items to select).
  2. Read C(n,r) for combinations (order does not matter) and P(n,r) for permutations (order matters).
  3. Repetition variants and the factorial n! are also shown for reference.

Formula & method

Permutation and combination formulas

C(n,r) = n! / (r! × (n−r)!) · P(n,r) = n! / (n−r)! · C with rep = (n+r−1)! / (r! × (n−1)!) · P with rep = nʳ

n! = n × (n−1) × … × 1. Limited to n ≤ 170 to avoid floating-point overflow.

Example

n=10, r=3: C(10,3) = 10! / (3! × 7!) = 120. P(10,3) = 10! / 7! = 720.

Key insights

How to interpret your result

C(n,r) — Combination

The number of ways to choose r items from n without regard to order. Used in probability, lottery, and statistics.

P(n,r) — Permutation

The number of ways to arrange r items from n where order matters. Used in scheduling, race placements, and password generation.

Frequently asked questions

What is the difference between a permutation and a combination?
In a permutation, order matters (ABC ≠ BAC). In a combination, order does not (ABC = BAC). P(n,r) = r! × C(n,r).
When do I use combinations?
When selecting items without caring about their arrangement: lottery numbers, hand of cards, committee selection.
What does 'with repetition' mean?
Items can be chosen more than once. With repetition: C = (n+r−1)!/(r!(n-1)!), P = nʳ.

Related calculators

See all math calculators · Explore all online calculators