↑ ↓ to move · Enter to open · Esc to close

🔍 Prime Number Checker

Check whether a number is prime, and get its prime factorization plus the nearest primes 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.

Updated · Free · No sign-up · Works on any device

Prime Number Checker inputs

Any whole number from 0 to 1,000,000,000,000.

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

  1. √97 ≈ 9.8489, so only divisors up to 9 need testing
  2. No whole number from 2 to 9 divides 97 evenly, so it is prime

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

RangePrimes
1–252, 3, 5, 7, 11, 13, 17, 19, 23
26–5029, 31, 37, 41, 43, 47
51–10053, 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).