|A\cup B|=|A|+|B|-|A\cap B|Variables
- A, B: finite sets
- |A|: cardinality of A
How to use this formula
Counts a union while correcting for elements counted in both sets.
Important notes
- The intersection term removes double counting.
Quick example
If |A|=12, |B|=9, and |A∩B|=4, then |A∪B|=17.
Applicability, worked calculation, and verification
Assumptions and domain checks
- The intersection term removes double counting.
- Confirm the finite-set, indexing, ordering, and counting conventions assumed by the expression.
Worked example
If |A|=12, |B|=9, and |A∩B|=4, then |A∪B|=17.
Common mistakes
- Before substituting values into Two-Set Inclusion–Exclusion Formula, map each variable to its definition and preserve every sign, exponent, subscript, and grouping mark.
- Verify the result of Two-Set Inclusion–Exclusion Formula with a known case, inverse operation, dimensional check, or independent calculation before publishing it.
Continue the workflow
Use Two-Set Inclusion–Exclusion Formula in your own work
- Check the domainMatch the variables and assumptions to the problem before substituting values.
- Copy the exact notationPreserve grouping, signs, and exponents in
|A\cup B|=|A|+|B|-|A\cap B|. - Edit or convertOpen the expression in the LaTeX editor, then export it for your document or web page.
Review and verification
Last reviewed: 2026-07-23
Automated quality check: Kept noindex until the missing evidence is supplied.
Formula references
- Digital Library of Mathematical FunctionsNational Institute of Standards and Technology — Definitions, notation, identities, and reference material for mathematical functions.
Frequently asked questions
What is the Two-Set Inclusion–Exclusion Formula used for?
Counts a union while correcting for elements counted in both sets.
Can I copy this formula as LaTeX?
Yes. Copy |A\cup B|=|A|+|B|-|A\cap B| or open it in the LaTeX editor.
What should I check before using it?
Confirm that each variable, unit, domain restriction, and assumption matches the problem.