The set formula is given in general as n (A∪B) = n (A) + n (B) - n (A⋂B), where A and B are two sets and n (A∪B) shows the number of elements present in either A or B and n (A⋂B) shows the number of elements present in both A and B.