Set setA = new Set{'John', 'Bob', 'Mary', 'Serena'}; Set setB = new Set{'Jim', 'Mary', 'John', 'Bob'}; // Option 1 Set notInSetA = setB.clone(); notInSetA.removeAll(setA); Set notInSetB = setA.clone(); notInSetB.removeAll(setB); Set symmetricDifference = new Set(); symmetricDifference.addAll(notInSetA); symmetricDifference.addAll(notInSetB); // Option 2 Set union = setA.clone(); union.addAll(setB); Set intersection = setA.clone(); intersection.retainAll(setB); Set symmetricDifference2 = union.clone(); symmetricDifference2.removeAll(intersection); System.debug('Not in set A: ' + notInSetA); System.debug('Not in set B: ' + notInSetB); System.debug('Symmetric Difference: ' + symmetricDifference); System.debug('Symmetric Difference 2: ' + symmetricDifference2);