Prime or not, and what it breaks down into
Check whether a number is prime and see its complete factorisation into prime factors, with the smallest divisor found.
A prime has exactly two divisors: one and itself. Every other whole number above one can be written as a product of primes in exactly one way — the fundamental theorem of arithmetic.
Checking only needs divisors up to the square root of the number. If nothing divides it by then, nothing larger will either, which is what makes the test fast.
What this calculator shows
- Whether the number is prime
- The smallest factor when it is not
- The full prime factorisation and how many factors it has
What to keep in mind
- Works with whole numbers up to a trillion using trial division.
- One is not prime by definition, and two is the only even prime.
FAQs
Why is 1 not a prime number?
Because unique factorisation would break. If 1 counted, 6 could be written as 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3, and 'exactly one way' would stop being true.
How do I check a number quickly by hand?
Test divisors up to its square root only. For 91 that means checking to 9 — so 2, 3, 5 and 7, at which point you find the answer.
Why do primes matter outside mathematics?
Public-key cryptography rests on them. Multiplying two large primes is trivial; recovering them from the product is not, and that asymmetry protects most online traffic.
Is there a largest prime?
No. Euclid proved there are infinitely many over two thousand years ago. The largest *known* prime keeps growing and currently has over 41 million digits.
Worked example
A number that looks prime
Input: 91
Output: Not prime — 7 × 13
Note: 91 catches people out because it survives the obvious checks against 2, 3 and 5. Seven is the first divisor that works.