Prime Number Generator

    Generate all prime numbers up to N with a Sieve of Eratosthenes grid, prime-count summary, and twin-prime pairs.

    Enter a whole number from 2 to 5,000 to generate a prime list, a sieve grid, and twin-prime pairs.

    Generate a prime list up to N

    The English SERP separates prime checking from prime list generation. This page is for users who need every prime number up to a limit, often for homework tables, programming checks, or number theory examples.

    The prime-counting function counts how many primes are at or below N.

    1. Enter a whole-number upper limit from 2 to 5,000.
    2. Run the Sieve of Eratosthenes.
    3. Copy the generated prime list or inspect twin-prime pairs.

    Sieve of Eratosthenes intent

    The sieve marks composite numbers by crossing out multiples of each prime candidate, starting at the square of that prime. It is a standard method for generating a complete prime list up to a bound.

    LimitPrime countLargest prime
    1047
    1002597
    1,000168997

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools