A three-set survey question ends with "how many students belong to exactly two of the three sets?" A student who has not internalised the pattern starts drawing a Venn diagram, fills in regions from the centre outward, and adds up three specific zones. A student who has internalised the pattern writes one formula and the answer.
The formula is:
That is: add the three pairwise intersections, subtract three times the triple intersection. The arithmetic takes a single line once you have the six cardinalities.
The recognition cue
The trigger phrase is any of these:
- "exactly two of A, B, C"
- "exactly two of the three subjects/activities/brands"
- "students in two and only two of the sets"
- "customers who bought exactly two products"
All mean the same thing: the person belongs to two of the three sets and not the third. In a three-set Venn diagram, this is three specific regions — the three pairwise-overlap-but-not-centre zones.
Why the formula works
Each pairwise intersection A \cap B contains two kinds of elements:
- Those in A and B but not C — the exactly-AB group.
- Those in A, B, and C — the triple group, A \cap B \cap C.
So |A \cap B| = |\text{exactly } A B| + |A \cap B \cap C|. Rearranging:
Similarly for the other two pairs:
Adding the three "exactly two" counts:
The -3|A \cap B \cap C| comes from the three separate subtractions, one per pairwise intersection. That is the whole derivation — three lines.
Walked mini-examples
Example 1. In a class of 50 students, 30 study maths, 25 study physics, 20 study chemistry. 15 study maths and physics, 12 study physics and chemistry, 10 study maths and chemistry, 8 study all three. How many study exactly two subjects?
Given: |M \cap P| = 15, |P \cap C| = 12, |M \cap C| = 10, |M \cap P \cap C| = 8. Apply:
13 students study exactly two subjects.
Example 2. A town survey says 60 people use WhatsApp, 50 use Instagram, 40 use Facebook. 30 use WhatsApp and Instagram, 25 use Instagram and Facebook, 20 use WhatsApp and Facebook, 15 use all three. How many use exactly two?
30 people use exactly two apps.
Example 3. Sanity check via direct region counting. Take the numbers from Example 1. Fill the Venn diagram:
- |M \cap P \cap C| = 8 (centre).
- |\text{exactly } MP| = 15 - 8 = 7.
- |\text{exactly } PC| = 12 - 8 = 4.
- |\text{exactly } MC| = 10 - 8 = 2.
Add the three "exactly two" regions: 7 + 4 + 2 = 13. Matches the formula.
The companion formulas
The same derivation pattern gives the other "exactly k" counts in a three-set problem. Memorise the set:
Exactly one (in A only, or B only, or C only):
Exactly two (in two of the three):
Exactly three (in all three):
Sum of all three "exactly k" counts equals |A \cup B \cup C|, which is the inclusion-exclusion total. Every "exactly k" question for a three-set problem is a single formula away from the given data.
The companion cue: "at least two"
Sometimes the question says "at least two," which differs from "exactly two" by the triple overlap. The relation is:
The coefficient on the triple intersection is -2 for "at least two," but -3 for "exactly two." Getting the coefficient wrong is the single most common error on this family of problems — the mini-derivation from "each pairwise intersection double-counts the triple" keeps you honest.
Summary table worth putting on your rough sheet:
| Question | Formula |
|---|---|
| "exactly two of A, B, C" | $\sum |
| "at least two of A, B, C" | $\sum |
| "exactly three of A, B, C" | $ |
| "at least one of A, B, C" | $ |
The exam reflex
- Read the question. Circle the phrase "exactly two" (or "exactly one," "at least two," whatever variant appears).
- Write down the applicable formula from the table above.
- Plug in the given cardinalities — pairwise intersections and the triple intersection.
- Compute. One line.
The whole skill is pattern recognition. Once you have seen the formula and its derivation three times, the "exactly two" phrase goes from "draw a Venn diagram" to "write the one-liner" — and that shift saves you two minutes per problem in every three-set survey you ever face.
Related: Set Operations · Inclusion-Exclusion vs Direct Venn Counting · Three-Set Venn: Where to Start · Given |A|, |B|, |A ∪ B|