Subset Calculator

Calculate the number of subsets of a given set and optionally display all possible subsets.

Input Parameters

Enter a non-negative integer (0-20 recommended)

Leave empty if using default set size

Calculation Results

Calculation Formula

Number of subsets = 2n

Where:
n = number of elements in the set
2n represents 2 raised to the power of n

Subset Calculator Calculator Usage Guide

Learn how to use the Subset Calculator calculator and its working principles

How to Use This Calculator

  1. Enter the size of your set (n) in the "Set Size" field. This is the number of elements in your set.
  2. Alternatively, you can specify custom elements in the "Custom Set Elements" field, separated by commas.
  3. Check the "Show all subsets" box if you want to see a complete list of all possible subsets.
  4. Click the "Calculate" button to compute the number of subsets and optionally display them.
  5. Click "Reset" to clear all inputs and results.

Understanding Subsets

A subset is any set formed from a larger set by including some or all of its elements, or by including none of them. The total number of subsets of a set with n elements is always 2n. This includes the empty set (no elements) and the set itself.

Example

For a set with 3 elements (e.g., {a, b, c}):

  • Number of subsets = 23 = 8
  • The subsets are: {}, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}

Limitations

Due to performance considerations, this calculator can handle sets up to 20 elements. For larger sets, the number of subsets becomes extremely large (over a million for 20 elements), making it impractical to display all subsets.