Skip to content
OneKitly

Adding Three Counts Gives 1,033 Out of 1,000

Published 12/1/2026 · 3 min read · Everyday calculators

Lena Hoffmann

Lena Hoffmann — Science & education writer at OneKitly

Mathematics · Physics

Checked against 2 sources

View profile →
In short

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.

Advertisement

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.

Numbers from 1 to 1,000
StepTermsRunning total
Add the three counts500 + 333 + 2001,033
Subtract the pairs−166 − 100 − 66701
Add the triple back+33734
Divisible by none1,000 − 734266
Inclusion–exclusion principle calculatorCompute the size of a union of 2 to 5 sets by inclusion–exclusion: add the individual sizes, subtract the pairwise overlaps, add back the triple overlaps, and so on, alternating signs. Work directly from your element lists — the tool sorts every element into its region and cross-checks the count — or from raw cardinalities like |A|, |A∩B|, |A∩B∩C| when you only know the counts. It shows each level's contribution and the final |A ∪ B ∪ …|.Try the tool →
Advertisement

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?