Prime Number Checker
Free prime number checker: enter any whole number to find out instantly whether it is prime - composite numbers also reveal their smallest divisor.
About this tool
A prime number has exactly two divisors: 1 and itself. Primes are the atoms of arithmetic - every whole number is either prime or built by multiplying primes - and they guard modern life, since internet encryption relies on giant primes that are practically impossible to factor.
This checker tests your number by trial division: it tries dividing by every integer up to the square root. No divisor found means prime; the first divisor found proves composite - and the tool shows it, so you learn something either way.
How to use
Enter any whole number from 2 upward and press Check Prime.
You get an instant verdict: prime, or not prime with its smallest divisor and the factorisation (for example, 100 = 2 x 50). It handles the numbers homework and curiosity throw at it in milliseconds.
The math behind it
To test n, try divisors from 2 up to the square root of n. If none divides evenly, n is prime - because any factor larger than the square root would pair with one smaller than it, which we already checked.
Checking up to sqrt(n) instead of n itself is the key optimisation: testing 10,007 needs only 100 trial divisions, not 10,005.
Frequently asked questions
Is 1 a prime number?
What is the largest prime I can check here?
Why do computers care about prime numbers?
Related tools
๐ฌ Comments
Have a question about this page, or an idea to make it better? Share it below โ your feedback helps everyone who uses this site.