Statistics

Combination & Permutation Calculator

Enter n (total items) and r (items chosen) to calculate both the number of combinations (order doesn't matter) and permutations (order matters) at once.

n and r

Combinations (nCr)
Enter n and r to calculate.

How the Combination & Permutation formula works

The combination and permutation formulas:

nPr = n! / (n − r)!
nCr = n! / (r! × (n − r)!)

Permutations count every distinct ordering, while combinations group orderings of the same items together, which is why nCr is always less than or equal to nPr.

Step-by-step calculation

  1. Calculate n factorial (n!) — the product of all whole numbers from 1 to n.
  2. Calculate (n − r)! the same way.
  3. For permutations, divide n! by (n − r)!.
  4. For combinations, additionally divide that result by r! to remove duplicate orderings of the same chosen items.

Worked example

Choosing 3 items from 5 (n=5, r=3): nPr = 5!/(5−3)! = 120/2 = 60 distinct orderings. nCr = 60 / 3! = 60/6 = 10 distinct groups, regardless of order.

Frequently asked questions

When should I use a combination instead of a permutation?

Use combinations when order doesn't matter, like picking a group of 3 people from 10 for a committee. Use permutations when order matters, like awarding 1st, 2nd, and 3rd place among the same 10 people.

Why does the calculator cap how large n can be?

Factorials grow extremely fast — 170! already exceeds what standard double-precision numbers can represent accurately, so extremely large values of n are capped to keep results numerically reliable.