Subset Calculator

A set with n elements has 2ⁿ subsets in total, counting the empty set and the full set itself. If you only want the subsets of a specific size r, that's the binomial coefficient C(n,r) = n!/(r!(n−r)!). Enter n, and optionally r, to get both counts.

—
—
—

Counting All Subsets: 2ⁿ

For a 3-element set {a, b, c}, there are 2³ = 8 subsets: ∅, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}. Each one corresponds to a unique yes/no decision for each of the three elements — list all 8 combinations of in/out and you've listed every subset.

Counting Subsets of a Given Size: C(n,r)

Of those 8 subsets of {a,b,c}, exactly 3 have size 2: {a,b}, {a,c}, {b,c}. The formula confirms it: C(3,2) = 3!/(2!×1!) = 6/2 = 3. Check the full breakdown — C(3,0)=1, C(3,1)=3, C(3,2)=3, C(3,3)=1 — and they sum to 1+3+3+1=8, matching 2³ exactly.

Subsets vs. Permutations

Subsets ignore order; permutations don't. Choosing 2 letters from {a,b,c} as a subset gives 3 results ({a,b},{a,c},{b,c}); choosing 2 letters as an ordered arrangement gives 6 (ab, ba, ac, ca, bc, cb) — each subset corresponds to 2! = 2 orderings, which is exactly why C(n,r) = P(n,r)/r!.

Frequently Asked Questions

Why does an n-element set have 2ⁿ subsets?

Each element has exactly two states, in the subset or not, and those choices are independent. Multiply the two options n times — 2×2×...×2 — and you get every possible combination of in/out decisions, which is exactly every subset, including the empty set and the whole set.

What's the difference between a subset and a proper subset?

A subset can equal the original set itself; a proper subset can't. If you need proper subsets only, subtract 1 from 2ⁿ to exclude the set equaling itself — the empty set still counts as a (proper) subset of any non-empty set.

How is C(n,r) different from the total subset count?

2ⁿ counts every subset regardless of size. C(n,r) counts only the subsets with exactly r elements. Summing C(n,r) for r=0 through n gives back 2ⁿ — splitting the total by size instead of counting it all at once.

What does C(n,r) equal when r=0 or r=n?

Both equal 1: there's exactly one subset of size 0 (the empty set) and exactly one subset of size n (the whole set), no matter how large n is.

Does order matter for subsets?

No — {1,2} and {2,1} are the same subset. That's what separates subsets (counted by C(n,r)) from arrangements (counted by permutations, n!/(n−r)!), which do care about order.