Set Intersection Calculator

This set intersection calculator finds every element that two sets have in common, one of the fundamental operations in set theory that underpins logic, probability, database queries and everyday filtering, such as working out which customers appear on two separate lists. You enter the members of Set A and Set B as comma separated values, and the calculator instantly returns the intersection, written A intersect B, the elements belonging to both sets and nothing else. You also get two supporting figures: the size of the intersection, showing how many elements the sets actually share, and the total number of distinct elements across both sets combined, which puts that overlap in context. Matching works on exact values, so spelling, capitalisation and spacing need to line up between the two lists for an item to count as shared. If the two sets have nothing in common, the calculator correctly returns an empty set with a size of zero, a valid result rather than an error. The tool updates live as you type, so you can experiment with different lists, add or remove members, or paste in real data such as attendee lists, survey responses or database values to see what the two groups share. It is built for students, teachers and anyone working with sets, logic or data who needs a fast, accurate way to compare two lists.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
Advertise on this page
{ 3, 4 }
Size of intersection2
Total distinct elements6

The formula

The intersection A intersect B is the set of elements that belong to both A and B. If no element is shared, the intersection is the empty set.

Worked example

For A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, the intersection is {3, 4}, two elements, out of six distinct elements in total. Enter those sets to confirm.

Frequently asked questions

What is the intersection of two sets?

The elements that are in both sets. {1,2,3} intersect {2,3,4} is {2,3}.

What if the sets share nothing?

The intersection is the empty set, sometimes written with the symbol for nothing, and its size is zero.

Can elements be words?

Yes. Any comma separated values work; matching is by exact value.

Who this calculator is for

This calculator is for students of set theory, logic, probability and databases.

What this calculator assumes

  • You enter two lists of comma separated values.
  • Each distinct value is treated as one set element.
  • Matching is by exact value.

Formula and sources

Related calculators