What is the Prime Number Generator?
Generate lists of prime numbers online for free. Find all primes in a custom range with the Sieve of Eratosthenes, or produce the first N prime numbers starting from 2. Choose one-per-line, comma, or space output and copy the full list instantly. Runs entirely in your browser with no signup.
How to use the Prime Number Generator
- Choose Range (from–to) or First N mode.
- Enter your range or how many primes you need.
- Pick an output format (line, comma, or space).
- Click Generate and review the count and summary.
- Copy the list or the full summary with steps.
Common use cases
- Listing all primes from 1 to 100 for a math worksheet
- Getting the first 50 primes for number theory practice
- Finding primes in a narrow band like 100–200
Frequently asked questions
- What is the Sieve of Eratosthenes?
- An efficient algorithm that marks multiples of each prime starting from 2, leaving only prime numbers unmarked up to your upper bound.
- What are the limits?
- Ranges up to 1,000,000 with a max span of 100,000 numbers, and up to 10,000 primes per run.
- Is 1 included as a prime?
- No. By definition primes start at 2. Values below 2 in a range are skipped.
- What's the difference between the two modes?
- Range lists every prime between your min and max. First N lists the N smallest primes starting from 2.