Enter the number of elements in a set to get the total number of subsets, proper subsets and counts by subset size, with the reasoning shown.

Subset Calculator

Count every subset of a set from its size alone: total subsets, proper subsets, and how many subsets have one or two elements.

Free to use Proper subsets separated Counts by subset size Reasoning shown

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for number of elements in the set.

How many distinct elements the set has. Counts grow as 2^n, so n is capped at 100.

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Subset Calculator tinyexe.comFree online calculators

TinyExe · Subset Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Number of elements in the set

—

Input 2

—

Result

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Subset Calculator to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      A set with n elements has 2 to the power n subsets, because each element is independently in or out: a 5-element set has 32 subsets including the empty set and itself, a 10-element set has 1,024, and the empty set itself has exactly one subset, itself.

      • Total subsets = 2^n
      • Proper subsets = 2^n - 1
      • Subsets of size k = C(n, k), and the C(n,k) sum to 2^n

      Subset counts by set size

      Reference values for this calculator.

      Elements nAll subsets 2^nProper subsets
      010
      121
      243
      387
      41615
      53231
      66463
      1010241023

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      Number of subsets of an n-element set = 2^n (each element independently in or out); proper subsets = 2^n - 1; subsets of size k = C(n, k)

      Enhancement: beyond the headline 2^n it breaks the count down by subset size (singletons, pairs) and separates proper subsets from the total, the distinctions subset questions usually hinge on.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      Five elements

      n = 5

      CalculationSteps
      2^5 = 32 total; proper subsets 32 - 1 = 31.32 subsets, 31 proper.

      Result

      Example 2

      The empty set

      n = 0

      CalculationSteps
      2^0 = 1.Exactly 1 subset: the empty set itself.

      Result

      Example 3

      Ten elements

      n = 10

      CalculationSteps
      2^10 = 1,024; pairs C(10,2) = 45.1,024 subsets, of which 45 have two elements.

      Result

      How to use this calculator

      Step 1

      Count the distinct elements in your set.

      Step 2

      Enter that number as n.

      Step 3

      Read the total number of subsets, 2^n.

      Step 4

      Check the details for proper subsets and counts by subset size.

      Step 5

      Remember the total includes the empty set and the full set itself.

      In short: A subset is any selection of elements from a set, including none and all; an n-element set has exactly 2^n subsets.

      Frequently asked questions

      How many subsets does a set with 5 elements have?

      2^5 = 32 subsets, including the empty set and the set itself. Each of the 5 elements is independently either in or out of a given subset, giving 2 x 2 x 2 x 2 x 2 = 32 combinations.

      What is the difference between a subset and a proper subset?

      A subset can equal the set itself; a proper subset cannot. A set with n elements has 2^n subsets but only 2^n - 1 proper subsets, and 2^n - 2 if you also exclude the empty set (proper non-empty subsets).

      Why does the empty set count as a subset?

      By definition every set contains the empty set as a subset, because the condition 'every element of the empty set is in the set' is vacuously true. That is why even a 0-element set has exactly 1 subset: the empty set itself.

      How many subsets have exactly k elements?

      The binomial coefficient C(n, k). For n = 5 there are C(5,2) = 10 two-element subsets, and summing C(5,0) through C(5,5) gives 1 + 5 + 10 + 10 + 5 + 1 = 32 = 2^5.

      Does order matter in a subset?

      No. {a, b} and {b, a} are the same subset. If order mattered you would be counting arrangements (permutations), which are far more numerous.

      About this calculator

      A subset calculator counts how many subsets a set has, given the number of elements in it. Because every element can independently be in or out of a subset, the total is always 2 raised to the number of elements - the size of the set's power set.

      The 2^n rule comes from a simple product: building a subset means deciding, for each element, 'in or out' - two choices per element, multiplied together. Three elements give 2 x 2 x 2 = 8 subsets, which you can list to verify: {}, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}. Doubling the set size does not double the count gently - it squares the growth pattern, so 20 elements already give over a million subsets.

      Terminology is where marks are lost. All 2^n are subsets. Excluding the set itself leaves 2^n - 1 proper subsets; excluding the empty set as well leaves 2^n - 2 proper non-empty subsets. Exam questions hinge on exactly these words, so this calculator reports the variants separately rather than one ambiguous number.

      The size-by-size view connects subsets to combinations: the number of k-element subsets is the binomial coefficient C(n, k), and the identity C(n,0) + C(n,1) + ... + C(n,n) = 2^n is why the total works out so neatly. If a question asks only for two-element subsets of a 5-element set, the answer is C(5,2) = 10, not 32.

      Use it for combinatorics homework, for counting combinations of options (toppings, features, test cases) where each option is independently included or excluded, and to check subset and power-set questions before listing anything by hand.

      How to calculate it yourself

      Step 1

      Count the distinct elements in the set - call it n.

      Step 2

      Raise 2 to the power n: multiply 2 by itself n times.

      Step 3

      That total includes the empty set and the full set.

      Step 4

      Subtract 1 for proper subsets, or 2 for proper non-empty subsets.

      Step 5

      For subsets of one exact size k, use C(n, k) = n! / (k! (n-k)!).

      Real-life examples

      Pizza topping combinations

      A pizza place offers 5 optional toppings, each either on or off. The owner wants to know how many distinct topping combinations the menu board implies.

      Each topping is in or out: 2^5 = 32 combinations, including the plain pizza (no toppings).

      The menu implies 32 topping combinations, 31 with at least one topping - before sizes or bases are even counted.

      Feature-flag test planning

      A developer has 10 independent feature flags and wonders if exhaustive testing of every flag combination is feasible.

      2^10 = 1,024 combinations.

      1,024 combinations is testable automatically overnight, but doubling to 20 flags would mean 1,048,576 - the exponential growth the subset formula predicts.

      Ideas & use cases

      • Menu and bundle design: count option combinations before promising 'endless combinations' in marketing - 2^n tells you the real number.
      • Test-case scoping: use the count to decide between exhaustive testing (small n) and sampling (large n) for independent on/off features.
      • Homework cross-check: list subsets by hand for n = 3 (there should be exactly 8) to verify you understand the rule before trusting it for n = 10.

      Limitations & sources

      • Counts subsets from the set size only; it does not list them (listing is practical only for small n) and treats all elements as distinct. Counts above n = 100 are capped to keep results readable.

      Sources: Standard combinatorics: power set cardinality 2^n (any introductory discrete mathematics text, e.g. Rosen, Discrete Mathematics and Its Applications)

      Subset Calculator · TinyExe calculator suite Free to use · No sign-up · Instant results