About this calculator
Enter a whole number to check it, and see the nearest primes on either side.
How to use it
- Enter a whole number.
- Read whether it is prime.
The formula
n is prime if no number from 2 to √n divides it
- √n
- only factors up to the square root need checking
Worked example
97
- No number from 2 to 9 divides 97, so it is prime.
- The previous prime is 89 and the next is 101.
What the result means
2 is the only even prime.
Assumptions
- Whole numbers up to 10¹².
Limitations
- Larger numbers need specialised tests.
Frequently asked questions
Is 1 a prime number?
No; a prime needs exactly two different factors.
Is 2 prime?
Yes, the only even prime.
How many primes are below 100?
25.
Last reviewed on 3 October 2026. Found a mistake? Tell us.

