Adding Three Counts Gives 1,033 Out of 1,000
Published 12/1/2026 · 3 min read · Everyday calculators
Lena Hoffmann — Science & education writer at OneKitly
Mathematics · Physics
Checked against 2 sources
Between 1 and 1,000 there are 500 multiples of 2, 333 of 3 and 200 of 5, and adding them gives 1,033 — more numbers than exist. The fix is to subtract what was double counted: 166 multiples of 6, 100 of 10 and 66 of 15. That over-corrects, because the 33 multiples of 30 have now been removed three times after being added three times, so they go back in. The result is 734 numbers divisible by at least one of the three, and 266 divisible by none — which a brute-force count confirms exactly.
500 numbers divisible by 2, 333 by 3, 200 by 5. The sum exceeds the whole range because 299 numbers were counted more than once.
The number of terms doubles with each new set
Two sets need three terms, three need seven, five need thirty-one and six need sixty-three — one for every non-empty combination, with the sign alternating by how many sets are in it. That growth is why inclusion-exclusion is a beautiful formula and an impractical algorithm past a handful of sets: counting the multiples of twenty different primes exactly would mean over a million terms. Beyond that point the same problem is attacked with sieves or with bounds that stop after the first few terms.
The same correction runs behind familiar counts
Euler's function, which counts the numbers coprime to n, is inclusion-exclusion over the prime factors. So is the count of derangements — the permutations that leave nothing in place — and so is the probability that at least one of several independent alarms fires. Whenever a total is assembled from overlapping groups and the overlaps are known, the alternating sum is the exact answer, and adding the groups alone is an upper bound that can exceed the whole population.
| Step | Terms | Running total |
|---|---|---|
| Add the three counts | 500 + 333 + 200 | 1,033 |
| Subtract the pairs | −166 − 100 − 66 | 701 |
| Add the triple back | +33 | 734 |
| Divisible by none | 1,000 − 734 | 266 |
Frequently asked questions
- Why does the sign alternate?
- Because an element in exactly k of the sets is counted k times by the first row, removed k choose two times by the second, added back k choose three times by the third, and so on — and that alternating sum equals exactly one for every k above zero. The formula is therefore not a heuristic that happens to work: it is arranged so that every element, however many sets it belongs to, contributes precisely once.
- What if the overlaps are not known?
- Then the sum of the groups is still an upper bound, and the largest single group is a lower one — which is often enough to make a decision. For independent events the overlaps can be computed from the individual sizes, but independence is an assumption that fails quietly: two marketing lists both drawn from existing customers overlap far more than their sizes suggest. When the overlap matters and cannot be assumed, it has to be measured.
Articles you may find interesting
All guides →Related tools
Sources
Spotted a mistake in this article?