- Home
- Tools
- Math
- Prime Factorization
- Prime Number Checker
Prime Number Checker
Type a whole number to see at once whether it is prime. If it is not, you get the factors that prove it.
Any whole number up to 9,007,199,254,740,991 (253 − 1).
Is 97 a prime number?
Yes
97 can only be divided by 1 and by itself.
- Previous prime
- 89
- Next prime
- 101
- Number of divisors
- 2
- Sum of divisors
- 98
Its two divisors
1, 97
How a number is tested
A prime has no divisors other than 1 and itself. To test a number by hand, try to divide it by the primes up to its square root. If none of them fits, no larger number fits either, because a larger divisor would come with a smaller partner that you have already tried.
Take 97, the number the box above starts with. Its square root is about 9.8, so only 2, 3, 5 and 7 need trying. 97 is odd, its digits add up to 16, which is not a multiple of 3, it does not end in 0 or 5, and 97 ÷ 7 leaves a remainder of 6. So 97 is prime.
For 91 the same four tries end differently: 91 ÷ 7 is exactly 13, so 91 = 7 × 13 is not prime, however much it looks like one.
The checker itself relies on a faster method, the Miller-Rabin test with the twelve primes from 2 to 37 as bases. For every number below 264 that combination is proven to give the right answer, so a "yes" here is certain and not "probably".
Is 1 a prime number?
No. A prime has exactly two divisors and 1 has only one. If 1 counted, 6 = 2 × 3 = 1 × 2 × 3 would have more than one prime factorization. 0 is not prime either, and for a negative number the checker looks at the number without its minus sign.
Checks you can do in your head
- An even number above 2 is not prime, and neither is a number above 5 that ends in 5.
- If the digits add up to a multiple of 3, the number can be divided by 3, so only 3 itself is prime: 111 = 3 × 37.
The largest number
Numbers up to 9,007,199,254,740,991 (253 − 1) are accepted. The largest prime within that limit is 9,007,199,254,740,881.
The prime factorization page splits a number into its prime factors, lists its divisors and explains how the factors are found.