Intermediate

Subset Calculator — Power Set & C(n, k)

Given a set of n elements, find the total number of subsets (2ⁿ), the subsets of any size k (C(n, k)), and see the full row of Pascal's triangle.
Number of distinct elements in the set (0 – 30)
Size of subsets to count with C(n, k)
Total subsets (including ∅)
32

2ⁿ — every possible selection from the set

Proper subsets
31
Non-empty subsets
31
C(5, 2) — subsets of size 2
10
Largest row term
10
15101051C(5, 0) … C(5, 5) — binomial coefficients (subset counts by size)
Step by step
  1. 1

    Each element has 2 choices (in or out)

    2^5 = 32
    Each of the n elements is independently included or excluded, giving 2 options per element.
  2. 2

    Total subsets (power set size)

    2^5 = 32
Rezultatele sunt estimări furnizate doar cu titlu informativ general și nu constituie sfaturi profesionale — verifică întotdeauna în mod independent rezultatele importante înainte de a te baza pe ele. Citește declinarea completă a responsabilității.
Răspuns rapid

Cum funcționează acest calculator?

A set of n elements has exactly 2ⁿ subsets (including the empty set). The number of subsets of size k is C(n, k) = n!/(k!·(n−k)!). Proper subsets (excluding the full set) number 2ⁿ − 1. For n = 5: 32 subsets, 10 of size 2.

Formulă
Total subsets = 2ⁿ • Proper subsets = 2ⁿ − 1 • Subsets of size k = C(n, k) = n! / (k! · (n−k)!)
How this is calculated

For a set with n distinct elements, each element can independently be either included or excluded from a subset. That binary choice for each of n elements gives 2 × 2 × … × 2 = 2ⁿ possible selections, including the empty set ∅ and the full set itself. This total is called the power set. Proper subsets exclude one or both endpoints depending on convention; the most common definition excludes the full set itself, giving 2ⁿ − 1 proper subsets. Non-empty subsets exclude only the empty set, also giving 2ⁿ − 1.

The number of subsets of exactly k elements is the binomial coefficient C(n, k) = n! / (k! × (n−k)!), computed here with the multiplicative formula (n × (n−1) × … × (n−k+1)) / k! to avoid large intermediate factorials. These values form the n-th row of Pascal's triangle — the bar chart shows C(n, 0), C(n, 1), …, C(n, n), which follows a bell shape peaking at the middle and sums to 2ⁿ.

The input is capped at n = 30 to keep results within JavaScript's exact 53-bit integer range (2³⁰ ≈ 10⁹). For larger n the total subset count exceeds what can be shown exactly; the C(n, k) formula still works but large values are shown in scientific notation.

Întrebări frecvente

A subset includes every element of the original set, even the full set itself and the empty set ∅. A proper subset is any subset that is not equal to the full set — so a set with n elements has 2ⁿ subsets but only 2ⁿ − 1 proper subsets.

Summing C(n, k) for k = 0, 1, 2, …, n gives the total number of subsets: C(n,0)+C(n,1)+…+C(n,n) = 2ⁿ. Each term counts how many subsets have exactly that many elements, so they partition the 2ⁿ total by size.

With n = 30 the total subset count is 2³⁰ ≈ 1.07 × 10⁹, still representable as a whole number in JavaScript. Above n ≈ 53 the count exceeds the 53-bit integer precision of IEEE 754 floating point and cannot be stored exactly.

APA

TG we-Calculate Editorial Team. (2026). Subset Calculator — Power Set & C(n, k) [Online calculator]. TG we-Calculate. https://we-calculate.com/ro/calculator/subset-calculator

Chicago

TG we-Calculate Editorial Team. "Subset Calculator — Power Set & C(n, k)." TG we-Calculate. 2026. https://we-calculate.com/ro/calculator/subset-calculator.

IEEE

TG we-Calculate Editorial Team, "Subset Calculator — Power Set & C(n, k)," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/ro/calculator/subset-calculator

BibTeX

@misc{wecalculate_subset_calculator, title = {Subset Calculator — Power Set & C(n, k)}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/ro/calculator/subset-calculator}}, year = {2026}, note = {TG we-Calculate} }

Te-a ajutat acest calculator?