Power Set Calculator

Count the subsets instantly.

How it is calculated

A set of n elements has 2n subsets: each element is either in or out of a subset, giving two choices per element. The tool reports this total (which includes the empty set and the whole set) and the number of proper subsets, 2n − 1, which leaves out the whole set itself. n must be a whole number from 0 to 62; larger values, negatives and fractions give no result. For n = 0 (the empty set) there is 1 subset and 0 proper subsets. Results are integers with thousands separators, and they stay exact digit for digit even at n = 62 (4,611,686,018,427,387,904), the largest power of two the tool can represent exactly.

Worked example

A set has 5 elements, for example {a, b, c, d, e}. Each element can be in or out, so the number of subsets is 2 × 2 × 2 × 2 × 2 = 25 = 32. Proper subsets exclude the full set itself: 32 − 1 = 31. The calculator shows 32 subsets and 31 proper subsets. The 32 include the empty set and the set {a, b, c, d, e}.

Try this example →

Common mistakes

  • Counting 2 × n instead of 2n. The count doubles with every added element.
  • Forgetting that the empty set counts as a subset. A set with 3 elements has 8 subsets, not 7.
  • Mixing up subsets and proper subsets. Proper subsets leave out the full set, so the count is one lower.
  • Expecting the empty set to be left out of the proper subsets. Here only the full set is removed.
  • Entering the number of subsets instead of the number of elements, or a value above 62, which the tool refuses to calculate.

About this calculator

The power set of a set with n elements is the collection of all its possible subsets, including the empty set and the set itself, and its size is always exactly 2 raised to the power of n — a result that follows because each of the n elements independently can either be included in a given subset or excluded from it, giving two choices per element. The count of proper subsets, which excludes the full set itself, is one less: 2^n − 1.

This result is foundational in set theory and combinatorics, and it shows up constantly in computer science: algorithms that enumerate all subsets of a set of items (as in brute-force solutions to the knapsack or subset-sum problems) commonly use a bitmask from 0 to 2^n − 1, where each bit represents whether one element is included.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators