Prime Number Checker
Test whether a number is prime and find the nearest primes around it.
What the Prime Number Checker does
A prime number has exactly two distinct divisors: 1 and itself. Testing only needs divisors up to the square root, because any larger factor must pair with a smaller one already checked.
Formula
n is prime if no integer from 2 to √n divides it evenly
Inputs explained
| Input | Unit | Required | Notes |
|---|---|---|---|
| Number | number | Yes | — |
How to use it
- Enter Number.
- Select Calculate.
Worked example
Is 97 prime?
- Number
- 97
Yes. Nothing from 2 to 9 (√97 ≈ 9.85) divides it, so 97 is prime.
Reading the result
- Testing divisors only needs to reach the square root, because any larger factor pairs with a smaller one already checked.
- Primes thin out but never run out — Euclid proved there is no largest one.
Common mistakes
- Counting 1 as prime. It has only one divisor, and treating it as prime would break the uniqueness of prime factorisation.
- Assuming all primes are odd. Two is prime, and it is the only even one.
Frequently asked questions
Why is 1 not prime?
It has only one divisor, not two. Excluding it also keeps prime factorisation unique — otherwise you could pad any factorisation with 1s.
Is 2 really prime?
Yes, and it is the only even prime. Every other even number is divisible by 2.