Combination Calculator

How many ways to choose k of n items when order doesn’t matter, with the formula worked out

Combination Calculator

Total items (n)
Items chosen (k)

How to Count Combinations: n Choose k

C(n, k) = n! / (k! (n − k)!): multiply k numbers counting down from n, then divide by k!.

Example: 4 choose 2

C(4, 2) = 4! / (2! · 2!)

= (4 × 3) / (2 × 1)
= 12 / 2

= 6

Common mistakes

  • k larger than n gives 0, not an error: 1 choose 3 = 0, because you can't choose 3 different items from 1. Usually the numbers were swapped — 3 choose 1 = 3.
  • 0! = 1, so choosing none and choosing all are one way each: 5 choose 0 = 5 choose 5 = 1.
  • If order matters, count permutations P(n, k) = n! / (n − k)! instead: 4 choose 2 = 6, but P(4, 2) = 12 — each pair counted in 2 orders.
  • If items may repeat (3 scoops from 4 flavours, two of a kind allowed), use C(n + k − 1, k): C(6, 3) = 20, not 4 choose 3 = 4.
  • nCr, ⁿCₖ, C(n, k) and the binomial coefficient “n over k” are the same number: 4C2 = C(4, 2) = 6.

See Also

FAQ

What is the combination formula?

C(n, k) = n! / (k! (n − k)!). The factorials cancel down to a short product: multiply k numbers counting down from n and divide by k!. For 5 choose 2 that is (5 × 4) / (2 × 1) = 10.

What is the difference between combinations and permutations?

Combinations ignore order — {A, B} and {B, A} are one choice; permutations count every order separately. So P(n, k) = C(n, k) × k!: from 5 items there are 10 pairs but 20 ordered pairs.

Why is C(n, k) equal to C(n, n − k)?

Choosing k items is the same as choosing the n − k you leave out. So 10 choose 8 = 10 choose 2 = 45, and it is quicker to compute through the smaller k.