Is It Prime? Checker
Check whether a whole number is prime, and if it isn’t, see its smallest divisor as proof.
How it works
n is prime ⇔ n > 1 and no integer 2 ≤ d ≤ √n divides n
A prime number has exactly two divisors: 1 and itself. To test one, you only need to try divisors up to the square root of n — if no factor is found below √n, none exists above it either, because factors come in pairs that multiply to n. Finding a single divisor is enough to prove a number composite.
Worked example
97 is odd and not divisible by 3, 5 or 7, and 11² = 121 already exceeds 97, so there is nothing left to test. With no divisor found, 97 is prime.
Sources: Prime number — Wikipedia
Frequently asked questions
Is 1 a prime number?
No. A prime must have exactly two distinct divisors, but 1 has only one (itself). By modern convention 1 is neither prime nor composite, and primes start at 2.
Why only check up to the square root?
Divisors pair up: if n = a × b and a ≤ b, then a is at most √n. So if no divisor exists at or below √n, the larger partner cannot exist either — checking further is wasted work.
Is 2 really prime?
Yes — 2 is the only even prime. Its only divisors are 1 and 2. Every other even number is divisible by 2 and therefore composite.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.