Prime Number Checker 🔒 Your data never leaves your browser.
Check if a number is prime, and see its prime factorization.
About this tool
A prime number is a whole number greater than 1 with exactly two divisors: 1 and itself — 2, 3, 5, 7, 11, 13 and so on continuing forever. Every other integer above 1 is composite, meaning the fundamental theorem of arithmetic guarantees it breaks down into one unique product of primes, which is exactly what the factorization below shows.
This checker finds that answer by trial division — testing possible factors only up to the square root of the number, since any larger factor would have to pair with one already found. That's comfortably fast for numbers into the billions, but the primes used in real-world cryptography run hundreds of digits long, far beyond what trial division could ever finish in a reasonable time, which is why those systems rely on probabilistic tests like Miller–Rabin instead. To keep this page responsive, numbers above 1,000,000,000,000 (10¹²) are rejected.
Frequently asked questions
Why isn't 1 considered a prime number?
A prime number is defined as having exactly two distinct positive divisors: 1 and itself. The number 1 only has one divisor (itself), so it fails that definition — it's classified separately as a "unit." This isn't just a technicality: excluding 1 keeps the fundamental theorem of arithmetic (that every integer greater than 1 has a unique prime factorization) actually unique — if 1 counted as prime, you could pad any factorization with extra factors of 1 with no limit.