Prime numbers — whole numbers greater than 1 with no factors except 1 and themselves — are scattered irregularly along the number line, yet they follow striking large-scale patterns. This tool lists every prime in a range you choose, up to a trillion, along with a count, the twin-prime pairs and the biggest gap. For short ranges it also draws the sieve, so you can watch composite numbers being crossed out.
How to use the prime numbers list
- Enter the start and end of the range. The default, 1 to 1,000, gives the classic list of 168 primes.
- Ranges can sit anywhere up to 1,000,000,000,000 and span up to 100,000 numbers.
- The tape summarizes the range: how many primes, the smallest and largest, twin pairs, the largest gap and the sum. The table lists the primes ten per row.
- For a range of 200 numbers or fewer, the sieve view shows every number with the primes boxed.
Prime numbers from 1 to 100
| Numbers | Primes |
|---|---|
| 1–10 | 2, 3, 5, 7 |
| 11–20 | 11, 13, 17, 19 |
| 21–30 | 23, 29 |
| 31–40 | 31, 37 |
| 41–50 | 41, 43, 47 |
| 51–60 | 53, 59 |
| 61–70 | 61, 67 |
| 71–80 | 71, 73, 79 |
| 81–90 | 83, 89 |
| 91–100 | 97 |
How the Sieve of Eratosthenes works
Named after the Greek scholar who described it around 240 BCE, the sieve finds primes without dividing anything:
- List the numbers from 2 to your limit.
- Circle 2, the first prime, and cross out every multiple of 2 after it.
- Move to the next number that isn’t crossed out (3), circle it and cross out its multiples.
- Repeat. You can stop once the next prime is larger than the square root of the limit — every composite below the limit already has a crossed-out mark.
Limit 100: √100 = 10, so you only need to sieve with 2, 3, 5 and 7.
Cross out multiples of 2 (from 4), 3 (from 9), 5 (from 25) and 7 (from 49).
What remains is the 25 primes listed above.
Starting each prime’s crossing-out at its square (9 for 3, 25 for 5) is a shortcut: smaller multiples such as 15 were already removed by a smaller prime. To check a single large number instead of a range, the prime number checker is faster.
How common are primes?
| Up to | Number of primes | Share of numbers |
|---|---|---|
| 10 | 4 | 40% |
| 100 | 25 | 25% |
| 1,000 | 168 | 16.8% |
| 10,000 | 1,229 | 12.3% |
| 100,000 | 9,592 | 9.6% |
| 1,000,000 | 78,498 | 7.8% |
The prime number theorem describes this thinning: around a number n, roughly 1 in every ln n numbers is prime, so there are about n ÷ ln n primes up to n. The estimate undercounts slightly (145 instead of 168 below 1,000) but its relative error shrinks as n grows.
Patterns worth noticing
- 2 is the only even prime, and every prime above 3 is one more or one less than a multiple of 6.
- Gaps grow, irregularly. Between 887 and 907 there are 19 composites in a row, while twin primes like 881 and 883 sit right next to each other.
- Primes end in 1, 3, 7 or 9 (apart from 2 and 5), and the four endings occur about equally often in the long run.
- Every composite in your list breaks into these primes in exactly one way — see the prime factorization calculator.
The sieve idea also works in reverse: crossing out the multiples of a number is listing them, which the multiples calculator does for any step size.
Frequently asked questions
How many prime numbers are there between 1 and 1,000?
168. The smallest is 2 and the largest is 997. There are 25 primes below 100, so 143 of them lie between 100 and 1,000.
What are the prime numbers from 1 to 100?
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97 — 25 primes in all.
What is the Sieve of Eratosthenes?
An ancient method for listing primes. Write out the numbers from 2 up to your limit, then repeatedly take the smallest number not yet crossed out — it is prime — and cross out all of its multiples. The numbers that survive are the primes.
Do prime numbers ever stop?
No. Euclid proved more than 2,000 years ago that there are infinitely many primes. They do become less common: about 1 in 7 numbers near 1,000 is prime, but only about 1 in 28 near a trillion.
What are twin primes?
Pairs of primes that differ by 2, such as 11 and 13 or 101 and 103. There are 35 twin-prime pairs below 1,000. Nobody yet knows whether there are infinitely many.