Is this number prime?
A prime number has exactly two divisors — 1 and itself — which makes it a building block that cannot be broken into smaller factors. This checker tells you whether your number is prime, and if it is not, gives its smallest divisor along with the nearest primes above and below.
How the test works
To decide, the calculator tries dividing by 2 and then each odd number upward. If none divides evenly before the test value passes the square root, the number is prime. Checking only up to the square root is enough, because any factor larger than it must pair with a smaller one already tested.
A few rules worth knowing
One is not prime — it has only a single divisor. Two is the only even prime, since every other even number is divisible by 2. Every whole number above 1 is either prime or a product of primes, which is what makes primes so central to number theory.
Related tools
If the number is composite, the prime factorization calculator shows its full breakdown; for shared factors, the GCD and LCM calculator.
Worked example
97 has no divisor up to its square root (just under 10), so it is prime. The next prime above is 101 and the previous one below is 89.
FAQ
Why check only up to the square root?
Divisors come in pairs that multiply to the number. One of each pair is at or below the square root, so if none is found there, none exists anywhere.
Is 1 prime?
No. A prime needs exactly two distinct divisors, and 1 has only itself, so it is classed as neither prime nor composite.
