Calculate union, intersection, difference, and symmetric difference of two sets. Venn diagram, Jaccard similarity, power set size, and complement analysis.
The **Union & Intersection Calculator** performs all fundamental set operations on two sets of numbers and displays the results with a visual Venn diagram. Enter any two sets of comma-separated numbers, and the calculator instantly computes the union (A ∪ B), intersection (A ∩ B), set differences (A − B and B − A), symmetric difference (A △ B), and complements relative to a universal set.
Set theory is the foundation of modern mathematics, computer science, database queries, probability theory, and logic. Union and intersection operations appear everywhere — from SQL JOIN operations and search engine queries to probability calculations (P(A∪B) = P(A) + P(B) − P(A∩B)) and Venn diagram problems in discrete math courses. Understanding these operations is essential for data analysis, programming, and mathematical reasoning.
Beyond basic operations, this calculator computes three important similarity metrics: the Jaccard index (|A∩B|/|A∪B|), the Sørensen-Dice coefficient (2|A∩B|/(|A|+|B|)), and the Overlap coefficient (|A∩B|/min(|A|,|B|)). These metrics are widely used in data science, information retrieval, ecology, and machine learning to measure how similar two sets are. Visual progress bars show these similarities at a glance.
The properties table shows cardinality, sum, min, max, power set size, and Cartesian product size for each set. The inclusion-exclusion principle is verified in real time: |A∪B| = |A| + |B| − |A∩B|. An optional power set enumeration lists all subsets for small sets (up to 6 elements). Six preset examples cover common scenarios from prime numbers to Fibonacci sequences, and the universal set can be calculated automatically or specified manually.
Union & Intersection Calculator (Set Operations) helps you avoid repetitive setup mistakes when solving trigonometric and coordinate-geometry problems. Instead of recalculating conversions, signs, and edge cases by hand, you can test inputs immediately, inspect intermediate values, and confirm final answers before submitting work or using numbers in downstream calculations. It surfaces key outputs like A ∪ B (Union), A ∩ B (Intersection), A − B (Difference) in one pass.
Union A∪B = all elements in either set. Intersection A∩B = elements in both. Difference A−B = elements in A but not B. Symmetric difference A△B = (A−B)∪(B−A). Jaccard = |A∩B|/|A∪B|.
Result: Union={1,2,3,4,5,6,7}, Intersection={3,4,5}
Using A={1,2,3,4,5}, B={3,4,5,6,7}, the calculator returns Union={1,2,3,4,5,6,7}, Intersection={3,4,5}. This example mirrors the calculator's live computation flow and is useful for checking manual steps and unit handling.
This calculator is tailored to union & intersection calculator (set operations) workflows, including common input modes, unit handling, and special-case behavior. It is designed for fast checking during homework, exam preparation, technical drafting, and coding tasks where trigonometric consistency matters.
Use the primary result together with supporting outputs to verify direction, magnitude, and validity. Cross-check against known identities or geometric constraints, and confirm that angle ranges, sign conventions, and domain restrictions are satisfied before using the numbers elsewhere.
A reliable way to improve is to solve once manually, then verify with the calculator and explain any mismatch. Repeat this on varied examples and edge cases. The built-in preset scenarios for quick trials, comparison tables for side-by-side validation, visual cues that make trends and quadrants easier to read help you build pattern recognition and reduce sign or conversion errors over time.
The union A∪B is the set of all elements that are in A, in B, or in both. For example, {1,2,3} ∪ {3,4,5} = {1,2,3,4,5}. Duplicates appear only once.
The intersection A∩B is the set of elements that are in both A and B. For example, {1,2,3} ∩ {3,4,5} = {3}. If A∩B = ∅, the sets are called disjoint.
The symmetric difference A△B contains elements that are in exactly one of the two sets, but not both. It equals (A−B) ∪ (B−A) = (A∪B) − (A∩B).
The Jaccard index J(A,B) = |A∩B|/|A∪B| measures the similarity between two sets. It ranges from 0 (completely different) to 1 (identical). It is widely used in data mining, NLP, and ecology.
The power set P(A) is the set of all subsets of A, including the empty set and A itself. If |A| = n, then |P(A)| = 2ⁿ. For example, P({1,2}) = {∅, {1}, {2}, {1,2}}.
The complement A′ (or Aᶜ) contains all elements in the universal set U that are NOT in A. The universal set can be defined automatically (as A∪B) or manually. A ∪ A′ = U and A ∩ A′ = ∅.