Prime Number Checker
✓ 97 is a prime number.
No whole number from 2 to √97 ≈ 9.8489 divides it exactly.
Previous prime
89
Next prime
101
What is a prime number?
A prime number is a whole number greater than 1 whose only factors are 1 and itself, like 2, 3, 5, 7 and 11. A number with more factors is composite. This calculator checks any number up to a trillion instantly, shows the prime factorization of composite numbers, and finds the nearest primes on either side.
How primality is checked
n is prime if no whole number from 2 to √n divides it
If n = a × b, one of a and b must be at most √n, so you only need to test divisors up to √n. Skipping multiples of 2 and 3 makes it faster still.
Facts about primes
- 2 is the only even prime; every other even number is divisible by 2.
- There are 25 primes below 100 and 168 below 1,000.
- Every prime above 3 is one more or one less than a multiple of 6.
- There are infinitely many primes, as Euclid proved over 2,000 years ago.
- Large primes keep online banking and messaging secure through RSA encryption.
Worked example: is 91 prime?
- √91 ≈ 9.5, so test the primes 2, 3, 5 and 7
- 91 is odd, its digits add up to 10 (not a multiple of 3), and it doesn't end in 0 or 5
- 91 ÷ 7 = 13 exactly, so 91 = 7 × 13 is not prime
- 97 is prime: none of 2, 3, 5 or 7 divides it, and √97 < 10
Prime numbers up to 100
The 25 primes below 100, in groups of ten.
| Range | Primes | Count |
|---|---|---|
| 1–10 | 2, 3, 5, 7 | 4 |
| 11–20 | 11, 13, 17, 19 | 4 |
| 21–30 | 23, 29 | 2 |
| 31–40 | 31, 37 | 2 |
| 41–50 | 41, 43, 47 | 3 |
| 51–60 | 53, 59 | 2 |
| 61–70 | 61, 67 | 2 |
| 71–80 | 71, 73, 79 | 3 |
| 81–90 | 83, 89 | 2 |
| 91–100 | 97 | 1 |
1 is not prime.