Prime Numbers Reference Table

All prime numbers up to 1,000 in a searchable table.

Searchable reference of all 168 prime numbers from 2 to 997, with each prime's index, plus a built-in primality checker that tests any number you enter. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is a prime number?

A prime number is a whole number greater than 1 whose only divisors are 1 and itself. The first few are 2, 3, 5, 7, 11 and 13. Numbers greater than 1 that are not prime are called composite.

Prime numbers up to 1,000

A prime number is a whole number greater than 1 divisible only by 1 and itself. This reference lists all 168 primes from 2 to 997, each with its index in the sequence, and includes a checker that tests any number you type for primality.

Why 168?

Below 1,000 there are exactly 168 prime numbers. That count is a landmark figure in number theory: the prime-counting function π(x) tells you how many primes exist up to x, and π(1000) = 168. The first few primes are easy to spot — 2, 3, 5, 7, 11, 13 — but the gaps between consecutive primes grow as numbers get larger, a pattern formalized in the prime number theorem: the average gap near n is roughly ln(n). Near 1,000, the average gap between consecutive primes is about 7.

How the primality check works

The checker uses trial division. To decide whether n is prime it tests divisibility by 2, then by each odd number 3, 5, 7, … up to √n. If any divides n evenly, n is composite and the smallest such divisor is its smallest prime factor. If none divide evenly, n is prime.

Testing only up to the square root is sufficient: if n = a × b with a ≤ b, then a ≤ √n, so a factor larger than the root always pairs with a smaller one that was already tested. For example, to check whether 97 is prime you only need to test divisors up to √97 ≈ 9.8, which means testing 2, 3, 5, 7. None divide 97 evenly, so 97 is prime.

Practical patterns to know

A few divisibility shortcuts let you rule out composite numbers at a glance before using the checker:

  • Even numbers above 2 are never prime — they are all divisible by 2.
  • Numbers ending in 0 or 5 above 5 are divisible by 5, so not prime.
  • Divisible-by-3 test: add the digits; if the sum is divisible by 3, so is the number. For example, 111 → 1+1+1 = 3 → divisible by 3, not prime.
  • The only even prime is 2, making it the oddest prime of all.

Twin primes and interesting clusters

Twin primes are pairs differing by exactly 2, such as (11, 13), (17, 19), (29, 31), (41, 43), and (71, 73). They appear scattered through the first thousand primes and become rarer but never entirely stop — whether infinitely many twin primes exist is an open problem in mathematics. You can spot twin-prime pairs in the reference table by looking for consecutive rows with a gap of two.

Another notable cluster is the prime triplet around 5: (3, 5, 7) are three primes with gaps of exactly 2 each — the only such trio that exists, because among any three consecutive odd numbers one is always divisible by 3.