About the Prime Number Checker
Type a whole number and the Prime Number Checker tells you right away whether it is prime. If it isn't, you see its prime factorization, such as 84 = 2 × 2 × 3 × 7. If it is, you get the next three primes after it. It is built for students, teachers, puzzle fans, and programmers who need a quick, reliable answer.
How it works
The checker uses trial division. Numbers below 2 are not prime, 2 is prime, and any other even number is not. For odd numbers it tries dividing by 3, 5, 7, and every odd number up to the square root. If none divides evenly, the number is prime. Stopping at the square root works because if n = a × b, at least one of a or b must be no larger than √n.
For a composite number, the factorization uses the same idea: divide out 2 as many times as possible, then 3, then 4 (which never divides once 2s are gone), and so on, collecting each divisor. Whatever is left above 1 at the end is itself a prime factor. For primes, the tool tests the following integers one by one until it has found the next three primes.
How to use
- 1
Type a whole number into the input box (it starts with 17 as an example).
- 2
Read the green "is prime" or red "is not prime" result.
- 3
For a composite number, check the Factors line for its prime factorization.
- 4
For a prime, look at Next primes to see the three primes that come after it.
Worked examples
A small prime
Checking the default value.
A deceptive composite
A number that looks prime at first glance.
Repeated factors
Factoring for a fraction problem.
In exponent form, 360 = 2³ × 3² × 5.
The number 1
A common quiz question.
Frequently asked questions
Is 1 considered a prime number?+
No. A prime must have exactly two distinct positive divisors, 1 and itself, and 1 has only one. Excluding 1 also keeps prime factorizations unique.
How does the checker verify primality for large numbers?+
It divides by 2 and then by every odd number up to the square root of the input. If none divides evenly, the number is prime. This is exact, not a probabilistic guess.
Is 2 a prime number?+
Yes. Its only divisors are 1 and 2, which makes it the smallest prime and the only even one.
What is prime factorization?+
It is writing a number as a product of primes, for example 60 = 2 × 2 × 3 × 5. The checker shows this automatically for any composite number.
Are negative numbers prime?+
No. Primes are defined only for integers 2 and above, so the checker marks 0, 1, and all negative numbers as not prime.