How to use the Prime Number Checker
Enter a whole number up to one trillion. You see whether it is prime and, if it is not, its prime factors.
How the check works
A number is prime when nothing divides it except 1 and itself. You only need to test divisors up to its square root, because any larger factor would pair with a smaller one you have already tried. For 97, the square root is under 10, so testing 2, 3, 5 and 7 is enough to prove it is prime.
Facts that trip people up
1 is not prime, because it has only one divisor. 2 is the only even prime, since every other even number divides by 2. Numbers like 91 look prime but are not: 91 = 7 × 13. Large primes are the backbone of the encryption that protects online banking and messaging.
The formula
Trial division up to √n
Examples
- Is 97 prime?
97 is a prime number. Next prime: 101 Previous prime: 89
- Is 91 prime?
91 is not prime (composite). Prime factorization: 7 × 13 Next prime: 97 Previous prime: 89
- Is 7919 prime?
7,919 is a prime number. Next prime: 7,927 Previous prime: 7,907
Limitations and assumptions
Supports numbers up to 1,000,000,000,000.
Frequently asked questions
Is 1 a prime number?
No. A prime needs exactly two distinct divisors, and 1 has only one.
Is 2 prime?
Yes, and it is the only even prime number.
How does the check work?
It tests divisibility by every number up to the square root of the input; if none divides evenly the number is prime.
How do I get the prime factors of a composite number?
Use the prime factorization calculator, which breaks the number down into its prime factors.