Power Set Calculator - Subsets, Cardinality, and 2^n
Use this power set calculator to enumerate every subset of a finite set, return the 2^n count, and see proper and non-empty subset totals in one step.
Power Set Calculator
Results
Full Subset Listing (P(S))
Every member of P(S) is shown in canonical order, with the empty set first and the full set S last, and subsets of the same size grouped together.
Showing all 0 subsets of the current set.
What Is a Power Set Calculator?
A power set calculator is a set-theory tool that takes a finite set, counts its subsets, and lists every member of P(S). The power set of a set S is the set of all subsets of S, including the empty set and S itself, and its cardinality is always 2^n.
- • Discrete math homework: Confirm the power set of small sets in a proof, including the count and the explicit listing when the prompt asks for both.
- • Combinatorics checks: Spot-check the 2^n rule in introductory combinatorics, including the count of proper, non-empty, and non-empty proper subsets.
- • Sample space sizing: Size a sample space in a probability exercise by treating every subset of the outcomes as an event, so the number of possible events is the power set cardinality.
- • Canonical listing demos: Demonstrate the canonical listing of subsets, where subsets of the same size stay grouped and the empty set comes first.
The power set is one of the first constructions students meet in a discrete-math course, and the 2^n identity is a favorite exercise because the formula is short but the listing scales fast.
A power set calculator is the right tool for anything beyond four or five elements, since this page handles the parsing, deduplication, size cap, and listing.
How the Power Set Is Computed
The page implements the standard power-set identity. You type or paste the elements, the page deduplicates them, counts the distinct elements, and returns the cardinality 2^n together with the full subset listing in canonical order.
- S: The finite set you enter, parsed from a comma- or whitespace-separated list of tokens and deduplicated to keep the cardinality meaningful.
- n = |S|: The number of distinct elements in S after deduplication, an integer from 0 up to the page's safety cap of 12.
- P(S): The power set of S, the set of all subsets of S, including the empty set and S itself.
- |P(S)| = 2^n: The cardinality identity: the number of subsets of S is 2 raised to n, the number of elements in S.
Each element of S is independently either included in or excluded from any given subset, so there are 2 choices per element and 2 * 2 * ... * 2 = 2^n subsets in total.
The listing starts with the empty set {} and ends with S itself, which is the conventional order, and the subsets are returned in the same order you would write them by hand.
For n = 0 the empty set has 0 non-empty proper subsets, so the page clamps the 2^n - 2 expression to 0 to keep the result non-negative for every n. The 2^n - 1 proper and 2^n - 1 non-empty formulas stay non-negative on their own.
Worked example: the power set of {1, 2, 3}
Set: {1, 2, 3}, so n = 3.
|P({1, 2, 3})| = 2^3 = 2 * 2 * 2 = 8 subsets.
Total: 8. Proper: 7. Non-empty: 7. Non-empty proper: 6.
Listing: {}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}.
According to Wolfram MathWorld, the power set of a finite set S is the set of all subsets of S, and its cardinality equals 2 raised to the cardinality of S.
Because the cardinality of the power set is literally 2 raised to the number of elements, Power of 2 Calculator is the natural peer when you need to see the underlying 2^n value in isolation.
Key Concepts Behind the Power Set
Four ideas cover everything the power set is, the count of subsets, and the difference between full subsets and the smaller variants that show up in proofs.
Subset
A subset of a set S is any set whose elements are all members of S. The empty set and S itself are subsets of S, and the relation is written A is a subset of B when every element of A also belongs to B.
Cardinality of a set
The cardinality of a finite set is the count of distinct elements it contains, written |S| or n(S). Duplicates in the input are collapsed so the cardinality reflects the underlying set.
Proper subset
A proper subset of S is any subset of S that is not equal to S itself. The count of proper subsets is 2^n - 1, since exactly one of the 2^n subsets of S equals S, and the empty set is a proper subset whenever n is at least 1.
Empty set
The empty set, written {} or the symbol with a circle, is the unique set with no elements. The power set of the empty set has exactly one member, namely the empty set itself, so P({}) = {{}} and 2^0 = 1.
These four definitions are the only ones the page leans on. The 2^n identity drops out of the choice per element: for each of the n elements, you either include it or you do not, and those n independent binary choices combine into 2^n distinct subsets.
When a problem asks for the number of non-empty subsets, you can read it directly off the page as 2^n - 1, and when it asks for non-empty proper subsets, the answer is 2^n - 2. The three derived counts share the same 2^n backbone.
When the same counting exercise generalizes to arrangements of the elements instead of subsets, Factorial Calculator is the closest peer because factorials share the same counting-combinations background as 2^n.
How to Use This Calculator
Five short steps cover every common case, from a single-element sanity check to a ten-element listing that fits on the page.
- 1 Type or paste the elements: Write the elements of your set in the input box, separated by commas, spaces, semicolons, or new lines. The default is 1, 2, 3, which gives a clean eight-subset example.
- 2 Deduplicate by reading the result: The Elements in set (n) output shows the count of distinct elements the page found. If the number looks lower than expected, you probably have duplicates the page merged.
- 3 Read the cardinality: The Total subsets (2^n) output is the size of the power set. For n = 3, the result is 8. For n = 10, the result is 1,024. For an empty input, the result is 1, which is the baseline for the empty set.
- 4 Scroll the subset listing: The Full Subset Listing panel below the counts shows every member of P(S) in canonical order, with {} first and S last. For n > 8 the listing scrolls inside its own box.
- 5 Cross-check the derived counts: Read the Proper, Non-empty, and Non-empty proper subset counts. Their differences should match the formula, and the listing should end with the full set S.
Try the set {red, green, blue, yellow}. The page reads n = 4, so the power set has 2^4 = 16 members, with {} first and the full set last.
If you want to see how subsets combine under union, intersection, and complement, Binary Operations Calculator works on the same bitwise representation that the power set listing is built on.
Benefits of the Power Set Calculator
The page is built for the kinds of problems where a hand listing is short enough to attempt but long enough to get wrong, and where the formula alone is not the full answer.
- • Skip the manual listing mistakes: Hand-listing subsets is easy to get wrong at the four-element mark. The page enumerates all 2^n subsets in canonical order, so the listing agrees with the formula by construction.
- • See the 2^n identity in action: Watching the total count jump from 8 to 16 to 32 as n grows by one drives the exponential identity home.
- • Get the derived counts for free: Proper, non-empty, and non-empty proper subset counts fall out of the same enumeration, so the page returns all four numbers in one pass.
- • Handle noisy input gracefully: Duplicates, stray commas, and extra whitespace are normalized in the input, so the cardinality reflects the set the user meant.
- • Connect to counting and power peers: When the next question is about n! instead of 2^n, the page links out to the closest peer calculators so the next click is one step away.
The most useful moment for this page is when a problem gives you a small set and asks for the number of subsets, the number of non-empty subsets, and the listing. The page returns all three plus the n count, so the work on paper is reduced to writing the answer.
If the next problem is about counting arrangements, the counting peers below carry the same 2^n-style scaling into a factorial context.
When the next question is about powers of 10 rather than powers of 2, Power of 10 Calculator is the natural side-by-side peer because the 2^n and 10^n identities share the same exponential shape.
Factors That Affect the Power Set Result
The 2^n identity holds for every finite set, but a few factors change how the result should be read.
Distinctness of the input elements
A set is defined by its members, so a duplicate in the input does not change the underlying set. The page deduplicates and the cardinality reflects the count of distinct tokens.
Size of the set versus the cap
Beyond 12 distinct elements the page refuses the input, because 2^12 = 4,096 subsets is already the limit where the listing fits on a normal screen.
Including the empty set in the count
The empty set is one of the 2^n subsets for every n, including n = 0. Removing it gives the non-empty count of 2^n - 1, which is the count that most counting problems actually need.
Reordering the subsets in the listing
The page lists subsets in canonical order, with subsets of the same size grouped and the empty set first, which matches the order a reader would write them by hand.
- • The page treats the input as a set of tokens, not a set of numbers with arithmetic meaning. The set {1, 2, 3} and {3, 1, 2} share the same power set, and the page does not add or multiply the elements.
- • The page caps at 12 distinct elements, so a 20-element set will return an error message rather than a 1,048,576-line listing. The 2^n identity still holds for any finite n.
According to Wikipedia (Power set), for a finite set S with n elements, the power set of S has exactly 2^n elements, and this identity is the standard answer to the question of how many subsets a finite set can have.
According to Wolfram MathWorld (Subset), a subset A of a set S is a set whose elements are all members of S, and the family of all subsets of S, including the empty set, is the power set P(S), whose cardinality is 2^|S|.
The bitmask interpretation that drives the listing is what Binary Converter uses to translate between decimal indices and binary strings, so the connection between a subset and its mask is one click away.
Frequently Asked Questions
Q: What is a power set in math?
A: The power set of a set S is the set of all subsets of S, including the empty set and S itself. It is written P(S), and its cardinality is 2 raised to the number of elements in S, so a 3-element set has 2^3 = 8 subsets and a 10-element set has 2^10 = 1,024.
Q: How many subsets does a set with n elements have?
A: A set with n elements has exactly 2^n subsets in total, of which 2^n - 1 are proper subsets, 2^n - 1 are non-empty subsets, and 2^n - 2 are non-empty proper subsets for n of 1 or more. For n = 0 the empty set has 0 non-empty proper subsets, so the page clamps the result to 0.
Q: What is the power set of the empty set?
A: The power set of the empty set is {{}}, the set that contains the empty set and nothing else, with exactly one member. This matches the 2^0 = 1 rule, since the empty set is a subset of every set but only ever a member of its own power set.
Q: What is the difference between proper and non-empty subsets?
A: A proper subset is any subset except the set itself, so a proper subset count is 2^n - 1. A non-empty subset is any subset except the empty set, so a non-empty subset count is also 2^n - 1, while non-empty proper subsets is 2^n - 2 for n of 1 or more and 0 for the empty set.
Q: How do I list all subsets of a set?
A: Write a binary membership mask of length n for each subset, where each bit is 1 if the matching element is in the subset. The masks run from 0 to 2^n - 1, and the empty set corresponds to the all-zeros mask, which is the order the calculator uses.
Q: Why is the cardinality of a power set always 2 to the n?
A: Each of the n elements is independently either in or out of any subset, giving 2 choices per element and 2 * 2 * ... * 2 = 2^n total combinations, which is the same as the number of binary strings of length n.