Subset Calculator
Check whether one set is a subset, proper subset, superset, equal or disjoint. Enter two sets and see exactly which elements break containment.
Subset Calculator
Background.
A subset calculator answers one narrow question precisely: is every element of set A also an element of set B? If the answer is yes, A ⊆ B. Enter A = {1, 2, 3} and B = {1, 2, 3, 4, 5} and the calculator confirms containment, adds that it is a proper containment because B has two elements A lacks, and reports that nothing in A is missing from B. When containment fails, it does something more useful than saying no: it names the exact elements of A that are not in B, which is almost always the thing you actually wanted to know.
The distinction between a subset and a proper subset trips people up more than any other part of this topic, and it is worth being blunt about. A ⊆ B allows A to be all of B. A ⊊ B does not — it requires B to hold at least one element A does not. Every set is a subset of itself; no set is a proper subset of itself. That is why the number of proper subsets of an n-element set is 2^n − 1 rather than 2^n, and why this page reports the two flags separately instead of collapsing them into a single yes/no. Some textbooks write ⊂ where this page writes ⊊, and a few use ⊂ to mean plain containment with no properness claim at all — the symbol is genuinely ambiguous in the literature, which is why the result is spelled out in words as well as symbols.
The empty set is the other reliable source of confusion, so it is a first-class input here: type {} or ∅ into either box. The empty set is a subset of absolutely every set, including itself, and the reason is worth internalising because it looks like a trick. To disprove ∅ ⊆ B you would have to produce an element of ∅ that is not in B. There are no elements of ∅ to produce, so the disproof can never be constructed and the statement holds vacuously. The calculator therefore returns A ⊆ B = 1 for A = ∅ against any B, and marks it a proper subset whenever B is non-empty.
When neither set contains the other, there are still two genuinely different situations and the calculator separates them. Disjoint means the sets share nothing at all — {1, 2} and {3, 4}. Overlapping-but-incomparable means they share something while each keeps something the other lacks — {1, 2, 3} and {2, 3, 4}. Both come back as 'neither is a subset of the other', but they behave very differently in the union, intersection and Venn-diagram problems that usually follow, so the verdict says which one you have.
Two input conventions are applied and reported. Sets are unordered, so typing B as 3, 2, 1 gives the same verdict as 1, 2, 3. Sets have no duplicates, so 1, 1, 2 is the two-element set {1, 2} and the size counts reflect that. Elements are compared as text exactly as typed after trimming surrounding spaces, which means 1 and 1.0 are two different elements and cat and Cat are two different elements. If a verdict looks wrong, check the element counts first — a stray space inside an element, or a decimal written two ways, is the usual cause.
What is subset calculator?
A is a subset of B, written A ⊆ B, when every element of A is also an element of B. A is a proper subset, written A ⊊ B (and in many textbooks A ⊂ B), when A ⊆ B and additionally A ≠ B — that is, B holds at least one element A does not. Containment running in both directions is exactly what set equality means: the Axiom of Extension in Zermelo–Fraenkel set theory says two sets are equal precisely when they have the same members, which is the same as saying A ⊆ B and B ⊆ A. Two sets that share no elements are called disjoint, written A ∩ B = ∅. Subset is a partial order rather than a total one: given two arbitrary sets it is entirely normal for neither to contain the other.
How to use this calculator.
- Type the elements of set A into the first box, separated by commas, semicolons or new lines. Braces are optional and stripped if present.
- Type the elements of set B into the second box. The question asked is always 'is every element of A also in B?', so the order of the two boxes matters.
- For the empty set, type {} or ∅ into either box — the empty set is a valid, meaningful input here.
- Read the headline relation. It distinguishes equal, proper subset, proper superset, disjoint, and overlapping-but-incomparable rather than returning a bare yes or no.
- If containment fails, read 'Which elements break it'. Those are the members of A that B does not contain — fixing containment means either adding them to B or removing them from A.
- Check the element counts if the answer surprises you. Duplicates are collapsed and comparison is exact text, so 1 and 1.0 count as two different elements.
The formula.
The definition of A ⊆ B is a universally quantified implication: for every x, if x is in A then x is in B. Testing it directly would mean checking infinitely many x, so the practical test inverts it. A ⊆ B is false exactly when there exists a counterexample — some x in A that is not in B. So the calculator computes the set difference A \ B and checks whether it is empty. If A \ B is empty, containment holds; if it is not, every member of A \ B is a witness to the failure, and those are the elements reported.
Properness is one additional test in the opposite direction. A ⊊ B means A ⊆ B and A ≠ B. Since A ⊆ B is already established, the sets can only be equal if B ⊆ A as well, so the calculator computes B \ A too. A ⊆ B with B \ A non-empty is a proper subset; A ⊆ B with B \ A empty is equality. Running both differences also gives the superset flag for free, because B ⊆ A is precisely the statement that B \ A is empty.
Equality falls straight out of the two differences and is not computed separately. The Axiom of Extension defines two sets to be equal when they have exactly the same members, which is containment in both directions — so A = B if and only if both A \ B and B \ A are empty. This is why reordering the elements, or repeating one, never changes the verdict: neither operation changes which members a set has.
Disjointness is a third, independent test: A ∩ B = ∅. It is not the opposite of containment. Two sets can fail to contain one another and still share elements, and the calculator reports that case separately from true disjointness. The one place the two interact is the empty set, which is both a subset of every set and disjoint from every set, including itself.
No rounding happens anywhere on this page and no numeric threshold decides anything. The classification is driven entirely by whether two exact set differences are empty. Element identity is exact string equality after trimming leading and trailing whitespace, which is a deliberate choice: numeric coercion would silently merge 1 and 1.0, and case folding would silently merge cat and Cat, both of which change the answer without telling you.
A worked example.
Take A = {1, 2, 3} and B = {1, 2, 3, 4, 5}. First compute A \ B — the elements of A that B lacks. Element 1 is in B; so is 2; so is 3. Nothing is left over, so A \ B is empty and A ⊆ B holds. The calculator reports 0 elements breaking containment and says so in words. Next compute B \ A to test properness. Elements 4 and 5 are in B but not in A, so B \ A = {4, 5} is non-empty and the two sets are not equal. Containment plus inequality is exactly the definition of a proper subset, so the headline verdict is A ⊊ B, with the subset flag and the proper-subset flag both 1 and the equality flag 0. The superset flag is 0, because B ⊆ A would require B \ A to be empty and it is not. The sets are not disjoint either — they share 1, 2 and 3, so the shared count is 3. The sizes are 3 and 5. Sizes alone never decide the verdict: {1, 2} is smaller than {3, 4, 5} but is not a subset of it. Size only becomes decisive after containment is already known, as it is here — once A ⊆ B is established, |A| < |B| is what makes the containment proper. One perturbation to see the classifier move. Add a single element to A that B does not have, giving A = {1, 2, 3, 9}. Now A \ B = {9} is non-empty, so A ⊆ B fails; B \ A = {4, 5} is also non-empty, so B ⊆ A fails too; and the two sets still share 1, 2 and 3, so they are not disjoint. The verdict becomes 'neither — A and B overlap, but neither one contains the other', and the element reported as breaking containment is 9.
Frequently asked questions.
What is the difference between a subset and a proper subset?
Is the empty set a subset of every set?
Does ⊂ mean subset or proper subset?
Can two sets be subsets of each other?
What does disjoint mean, and is it the opposite of subset?
Why do 1 and 1.0 count as different elements?
Does the order of elements matter?
References& sources.
- [1]Levin, Oscar. Discrete Mathematics: An Open Introduction, 3rd edition, §0.3 "Sets" — "A ⊆ B asserts that A is a subset of B: every element of A is also an element of B"; "A ⊂ B asserts that A is a proper subset of B: every element of A is also an element of B, but A ≠ B"; and "Everything in the empty set (nothing) is also an element of A. Notice that the empty set is a subset of every set." Open access; retrieved 2026-07-29.
- [2]Weisstein, Eric W. "Subset." MathWorld — Wolfram Research. Gives "B ⊆ A iff every member of B is a member of A" and reserves B ⊂ A for a proper subset. Independent agreement with Levin on the definitions, and on using ⊂ for properness. Retrieved 2026-07-29.
- [3]Halmos, Paul R. Naive Set Theory. Springer Undergraduate Texts in Mathematics, 1974 reprint of the 1960 Van Nostrand edition, §1 "The Axiom of Extension" and §2 "The Axiom of Specification" — set equality as two-way containment. Halmos is also the standard example of the opposite symbol convention, writing ⊂ for plain inclusion. Print reference, cited bibliographically; not retrieved during authoring.
- [4]Enderton, Herbert B. Elements of Set Theory. Academic Press, 1977, Chapter 1 — extensionality and the subset relation as a partial order. Print reference, cited bibliographically; not retrieved during authoring.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 977 calculators remain free
- No billing is enabled