Prime Number Checker

Type a whole number to find out whether it is prime. If it isn't, you see its prime factorization, such as 360 = 2³ × 3² × 5, and its divisors; either way you get the nearest primes below and above it. Numbers with up to 24 digits are checked exactly.

Runs in your browser — nothing is uploadedUseful for:School studentsUniversity studentsTeachers

Below are tools to list every prime in a range and to find the n-th prime (the 100th prime is 541), and a table of all the primes up to 1000.

How to use it

  1. Enter a whole number in the first box; the answer appears as you type.
  2. For a composite number, read its prime factorization and its divisors.
  3. To list primes, enter the start and the end of a range.
  4. To find the n-th prime, enter n, then press “Check this number” to see it in detail.

Common uses

  • Checking homework on prime numbers, factorization and divisibility.
  • Finding the greatest common divisor or the least common multiple from prime factors.
  • Exploring number patterns and puzzles in class or for fun.
  • Getting a list of primes for programming exercises.

Examples

NumberResult
97Prime: the 25th prime number
360Not prime: 2³ × 3² × 5, with 24 divisors
561Not prime: 3 × 11 × 17
From 1 to 10025 primes: 2, 3, 5, 7, 11 … 97

Frequently asked questions

What is a prime number?

A whole number greater than 1 whose only divisors are 1 and itself, such as 2, 3, 5, 7, 11 and 13. Numbers with more divisors are called composite. 1 is neither prime nor composite, and 2 is the only even prime.

How does the checker know that a big number is prime?

Small numbers are tested by division. Large ones use the Miller–Rabin test with the first twelve primes as bases, which gives an exact answer for every number below about 3.3 × 10²⁴; composite numbers are then split into factors with Pollard's rho method.

What is prime factorization?

Writing a number as a product of primes, such as 84 = 2² × 3 × 7. Every whole number above 1 has exactly one factorization, apart from the order of the factors. It is used to find divisors, the greatest common divisor and the least common multiple.

How many primes are there below 100 and below 1000?

There are 25 primes below 100 and 168 below 1000. There are infinitely many primes, but they get rarer: near a number n, about one number in every ln n is prime.