Sieve of Eratosthenes
Visualize the primes up to n
About this calculator
The Sieve of Eratosthenes Calculator lists every prime up to a limit n (up to 10,000) by marking multiples of each prime starting at p², exactly as the classical sieve prescribes. It reports the prime count π(n), the largest prime found, the number of composites, the exact sum of all primes, and the prime density π(n)/n, with the sieve grid visualized so you can watch composites get crossed out.
How to use the Sieve of Eratosthenes calculator
- Enter the values for your problem into the input fields.
- Read the result — it updates instantly as you type.
- Check the formula and the visual explanation to follow how the answer was found.
- Copy the page URL to share the exact calculation.
Common examples
- n = 30 → 10 primes (2, 3, 5, 7, 11, 13, 17, 19, 23, 29), sum 129
- n = 100 → π(100) = 25, largest prime 97, prime sum 1060, density 0.25
- n = 1000 → 168 primes, the largest being 997
- n = 10 → primes 2, 3, 5, 7
Frequently asked questions
How does the Sieve of Eratosthenes calculator work?
Enter your values and the calculator applies the exact mathematical method for this problem, showing the result together with the formula it used. Everything is computed with high-precision arithmetic, so the answer you see is not limited by ordinary floating-point rounding.
When would I use the Sieve of Eratosthenes calculator?
It is useful for homework and exam preparation, for checking work done by hand, and whenever a step in a larger problem needs this calculation done quickly and reliably.
How accurate are the results?
Calculations run at 30 significant digits of precision internally. Displayed values are rounded for readability, but the underlying result is far more precise than a typical hand or pocket-calculator computation.
Can I share a specific calculation with someone else?
Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same calculation for whoever clicks it.