Inclusion-Exclusion
Overlapping sets, Venn diagrams, PIE counting
Inclusion-ExclusionAMC 10 Step by Step
Name: Date: October 28, 2026
Counting & Probability · 6 problems have this as their main idea
6
primary-topic problems (0.5% of all)
6
more as a secondary topic
Where it appears
0
P1-10
2
P11-15
1
P16-20
3
P21-25
What you need to know
- Two groups. (number in or ) (number in ) (number in ) (number in both). Things in both were counted twice, so subtract them once. Example: from to there are multiples of , of , and of both (the multiples of ). So are multiples of or .
- Three groups. Add the three groups, subtract the three overlaps of two groups, then add back the overlap of all three. Writing for "the number in": . Example: from to , the multiples of , , or number .
- Any number of groups. This is the Principle of Inclusion-Exclusion (PIE): add the single groups, subtract the overlaps of two, add the overlaps of three, and so on, switching signs each time.
- Counting "none." The number in none of the groups is the total minus the number in at least one. Example: numbers from to are divisible by none of , , .
- Counting multiples. From to there are multiples of , where means "round down." A number is a multiple of both and exactly when it is a multiple of . Example: from to there are multiples of .
- Filling in a Venn diagram. Start with the innermost region and work outward. Example: in a class of , take math, take science, and take both. Put in the middle, in "math only," in "science only," and outside.
How AMC 10 tests it
- Problems 5–12: survey problems (" take math, take science, take both") asking how many take neither, or how many are in exactly one group.
- Problems 10–18: whole numbers up to divisible by at least one of several numbers, or by none.
- Problems 15–22: PIE hidden inside arrangements ("every color is used," "at least one letter in its original spot").
- Sometimes an "exactly two" region, where the "or" formula is not enough and you must fill in the diagram.
Standard approaches
- Draw the Venn diagram and fill it in from the center out; many problems need no formula.
- For "at least one," find the "or" count. For "none," subtract it from the total.
- For divisibility, each term is .
- For "every box gets used," count all ways, then subtract the ways that miss a box. With different objects and different boxes: . Example: different balls in boxes, none empty: .
- Check that every region is a whole number that is zero or positive. A negative region means you misread something.
Worked example
How many positive integers at most are divisible by or but not by ?
(A) (B) (C) (D) (E)
Solution.
Step 1: divisible by or . There are multiples of and multiples of . Both means a multiple of : . By PIE, .
Step 2: which of these are divisible by ? Divisible by and means a multiple of . Divisible by and means a multiple of . Every multiple of is a multiple of , so count the multiples of : (since ).
Step 3: subtract. .
The answer is .
Pitfalls
- Subtracting the overlaps of two groups but forgetting to add back the overlap of all three.
- Reading " take both" as the "exactly these two" region when it also includes people in the third group, or the other way around.
- Using instead of when and share a factor. From to , numbers are multiples of both and , not .
- Giving the "at least one" count when the question asks for "none," or the other way around.
Traps that recur
- Adding the five box probabilities (5 · 1/25) without subtracting overlaps, or dropping the alternating signs in inclusion–exclusion. (2021 AMC 10B #22)
- Forgetting to add back the single arrangement with both red and blue empty (all candy in white), which gives 1931. (2010 AMC 10B #22)
- Subtracting all 400 multiples of 5 instead of only the multiples of 5 that are also multiples of 3 or 4. (2001 AMC 10 #25)
- Applying |A union B union C| = sum of singles minus pairs plus triple with the wrong meaning of the 9, which counts students in at least two classes, not pairwise overlaps. (2017 AMC 10B #13)
Problems, easiest first
Open any of them to try it here; the worked solution is on the problem's own page.