Prime number checker
Enter any number to check if it's prime. Shows the complete divisibility test and proof.
What is a prime number?
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The first primes are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47...
How to check if a number is prime
Test whether any integer from 2 to √n divides evenly into n. If none do, n is prime. For example, to test 97: √97 ≈ 9.85, so test 2, 3, 5, 7. None divide 97 evenly → 97 is prime.
Special cases
1 is neither prime nor composite — it's a unit. 2 is the only even prime. 0 and negative numbers are not prime.
Why primes matter
Primes are the building blocks of all integers (fundamental theorem of arithmetic). They're crucial in cryptography — RSA encryption relies on the difficulty of factoring large numbers into primes.