Combination & Permutation Calculator

Calculate the number of ways to select items from a set

Quick Reference:

• Combinations - Order doesn't matter (choosing a team of 3 from 10 people)

• Permutations - Order matters (arranging 3 people in a line from 10 people)

Combinations vs. permutations

Both count ways to pick k items out of a set of n, but they disagree on whether order matters. A combination C(n,k) = n! / (k! × (n-k)!) counts unordered groups. A permutation P(n,k) = n! / (n-k)! counts ordered arrangements — since every group of k items can be arranged in k! different orders, P(n,k) is always C(n,k) × k! larger.

Worked example

Say there are 10 candidates and you need to fill a 3-person committee where every seat is identical. That's a combination: C(10,3) = 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. There are 120 possible committees.

Now say those same 10 candidates are competing for three distinct titles — president, vice-president, and secretary. Order matters because "Alex president, Sam VP" is a different outcome than "Sam president, Alex VP." That's a permutation: P(10,3) = 10 × 9 × 8 = 720. Notice 720 = 120 × 3!, exactly the relationship above.

How the calculator gets there

Rather than computing full factorials (which get enormous fast — 10! is already 3,628,800), the combination routine cancels terms first: it multiplies n × (n-1) × ... down to k terms, dividing by 1, 2, 3, ... k as it goes, and uses whichever of k or n-k is smaller to cut the number of iterations in half. The permutation routine is simpler — it just multiplies n × (n-1) × ... for k terms with no division.

Where this comes up

Combinations answer questions like "how many 5-card poker hands are possible from a 52-card deck" or "how many ways can I pick 6 lottery numbers from 49." Permutations answer questions like "how many ways can 4 runners finish 1st, 2nd, 3rd, and 4th out of 8" — anywhere the specific order or role assignment changes the outcome.