Prime Number Checker
Type a whole number to see whether it is prime. If it isn’t, you get its prime factorization; either way, you get the primes just above and below it.
Quick answer: 97 is prime: no whole number from 2 to 9 (√97 ≈ 9.8489) divides it evenly. By contrast, 91 is not prime because 91 = 7 × 13.
Not rated yet · Updated · Free · No sign-up
Prime Number Checker inputs
Result
Is it prime?
97 is a prime number
Its only divisors are 1 and 97.
- Smallest prime factor
- 97
- Prime factorization
- 97
- Number of divisors
- 2
- Previous prime
- 89
- Next prime
- 101
Step by step
- √97 ≈ 9.8489, so only divisors up to 9 need testing
- No whole number from 2 to 9 divides 97 evenly, so it is prime
Calculated with CalcBright – https://calcbright.com/prime-number-checker on
What makes a number prime?
A prime number is a whole number greater than 1 whose only divisors are 1 and itself. Numbers with more divisors are composite. The numbers 0 and 1 are neither.
n is prime ⇔ n > 1 and no integer d with 2 ≤ d ≤ √n divides n
Why only test up to the square root?
If n = a × b, then a and b can’t both be bigger than √n – their product would be too large. So any composite number has a factor no bigger than its square root, and you can stop searching there.
Worked examples
- 97: √97 ≈ 9.85. Test 2, 3, 5 and 7 – none divide 97, so it is prime.
- 91: √91 ≈ 9.54. 91 ÷ 7 = 13 exactly, so 91 = 7 × 13 is composite. It is a classic “looks prime” trap.
- 360: divide out 2 three times, 3 twice and 5 once: 360 = 2³ × 3² × 5, with (3 + 1)(2 + 1)(1 + 1) = 24 divisors.
The first primes
| Range | Primes |
|---|---|
| 1–25 | 2, 3, 5, 7, 11, 13, 17, 19, 23 |
| 26–50 | 29, 31, 37, 41, 43, 47 |
| 51–100 | 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 |
There are 25 primes below 100 and infinitely many in total, as Euclid proved over 2,000 years ago.
Quick divisibility tests
- 2: the last digit is even.
- 3: the digit sum is divisible by 3.
- 5: the number ends in 0 or 5.
- 11: the alternating digit sum is divisible by 11.
The checker handles every whole number up to one trillion exactly, using trial division by 2, 3 and numbers of the form 6k ± 1.
Frequently asked questions
Is 1 a prime number?
No. A prime has exactly two distinct divisors, 1 and itself, and 1 has only one. Excluding 1 also keeps prime factorizations unique – otherwise you could write 6 = 2 × 3 × 1 × 1 × …
Is 2 the only even prime?
Yes. Every other even number is divisible by 2, so it has at least three divisors (1, 2 and itself). That makes 2 the smallest prime and the only even one.
How do you check if a large number is prime?
Test divisibility by primes up to its square root – if none divide it, it is prime. For 1,000,000,007 that means checking divisors up to about 31,623, which the checker does in a fraction of a second.
What is prime factorization?
Writing a number as a product of primes, such as 360 = 2³ × 3² × 5. Every whole number above 1 has exactly one prime factorization (the fundamental theorem of arithmetic).
Rate the Prime Number Checker
Only the average star rating is shown. Error reports go straight to our inbox so we can check and fix them. See our Methodology and privacy policy.