Prime number checker
Enter a whole Number and this checker tells you whether it is prime, meaning it has exactly two divisors, 1 and itself.
Results
Enter your values to see the result.
About this tool
It also shows the next prime above your number and, for composite numbers, the smallest divisor above 1. People use it for number theory homework or when picking a prime size for a hash table or puzzle.
- How it is calculated
- a prime number has exactly two divisors: 1 and itself; test divisors up to √n
- Worked example
- With Number: 97, the result is: Is prime: Yes; Next prime: 101; Smallest divisor above 1: none.
- Good to know
- The Number must be a whole number from 0 up to one trillion. Numbers below 2, including 0 and 1, are not prime. Primality is tested by trying divisors up to the square root.
Frequently asked questions
Is 1 a prime number?
No. A prime needs exactly two different divisors, and 1 has only one. This checker reports 0 and 1 as not prime, and shows none for the smallest divisor above 1.
What does Smallest divisor above 1 show?
For a composite number it is the smallest factor greater than 1, which is always prime. For 91 it is 7, revealing that 91 equals 7 times 13. For primes it reads none.
What is the Next prime figure?
It is the first prime larger than the Number you entered, so a prime input gives the following prime. For 97 the next prime is 101.