Prime Number Checker
Test whether a number is prime and view its prime factorization.
Formula
About this calculator
A prime number is a whole number greater than 1 whose only divisors are 1 and itself. Numbers with additional divisors are composite, and 0 and 1 are neither prime nor composite.
This checker uses trial division: it tests potential divisors only up to the square root of the number, which is sufficient because any larger factor must pair with a smaller one. For composite numbers it also returns the prime factorization, expressed in exponent form like 360 = 2³ × 3² × 5.
Frequently asked questions
No. A prime must have exactly two distinct divisors (1 and itself). The number 1 has only one divisor, so it is neither prime nor composite.
If a number n has a divisor larger than √n, the matching co-divisor must be smaller than √n, so checking up to the square root catches every factor.
2 is the smallest and the only even prime number. Every other even number is divisible by 2 and therefore composite.
Did this calculator help you?
