Symmetric Difference Calculator
Work out symmetric difference instantly with clear inputs, formula shown and shareable results.
About Symmetric Difference Calculator
The symmetric difference contains the elements in exactly one of the two sets — the set-theoretic XOR. It equals the union minus the intersection, so |A △ B| = |A ∪ B| − |A ∩ B|.
Formula
Symmetric difference
A △ B = (A ∪ B) \\ (A ∩ B) = (A \\ B) ∪ (B \\ A)
Worked example
With the default values below, Symmetric Difference Calculator returns A △ B of 1, 2, 5, 6. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Set A
- 1, 2, 3, 4
- Set B
- 3, 4, 5, 6
Results
- A △ B
- 1, 2, 5, 6
- |A △ B|
- 4
- |A ∩ B|
- 2
- |A ∪ B|
- 6
Step by step
- 1Values used
- 2Symmetric difference
- 3A △ B= 1, 2, 5, 6
- 4|A △ B|= 4
- 5|A ∩ B|= 2
- 6|A ∪ B|= 6
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
For A = {1,2,3,4} and B = {3,4,5,6}?
A △ B = {1, 2, 5, 6}, of size 6 − 2 = 4.
Why is it like XOR?
Membership in A △ B is true when membership in exactly one of A and B is true, which is exactly the XOR truth table.
Related Calculators
You might also need
- Set Difference CalculatorAlso in Discrete Math, Logic & Number Theory
- Discrete Logarithm CalculatorAlso in Discrete Math, Logic & Number Theory
- Adjacency Matrix CalculatorAlso in Discrete Math, Logic & Number Theory
- Base 64 Value CalculatorAlso in Discrete Math, Logic & Number Theory
- Bell Number CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Decimal CalculatorAlso in Discrete Math, Logic & Number Theory
