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.
- Enter a whole-number upper limit from 2 to 5,000.
- Run the Sieve of Eratosthenes.
- 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.
| Limit | Prime count | Largest prime |
|---|---|---|
| 10 | 4 | 7 |
| 100 | 25 | 97 |
| 1,000 | 168 | 997 |
Frequently Asked Questions
Sources and References
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Check whether a whole number is prime, composite, 0, or 1. Shows the smallest factor for composite numbers and links to full factorization.
Break an integer into prime factors, see repeated factors, canonical exponent form, trial-division steps, and the total number of positive factors.
Find all positive factors of a number, factor pairs, prime factorization, factor count, sum of factors, proper factors, and number type.
Calculate the greatest common divisor, also called GCF or HCF, for two or more positive integers with Euclidean algorithm steps and Bezout coefficients for pairs.