Sieve of Eratosthenes

Explore the sieve of Eratosthenes. Click on a number to have all its multiples marked by changing the field color to red and crossing them out. Numbers that you have clicked appear on green background. When there are no white fields left, the numbers in green fields are all the prime numbers up to .

It is most efficient to first click 2. After all multiples of one number have been marked click on the next number in a white field. To illustrate the sieving better multiples are marked with a delay and different shades of red are used for multiples of different numbers.

Auto Sieve goes through the complete sieving process. Reset Sieve clears the sieve.

Size of Sieve. To increase or decrease the size of the sieve, change the width of your browser window and the reload this page.

0clicked numbers (and other shades of red) multiples of clicked numbers
Auto Sieve Reset Sieve