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?

  1. √91 ≈ 9.5, so test the primes 2, 3, 5 and 7
  2. 91 is odd, its digits add up to 10 (not a multiple of 3), and it doesn't end in 0 or 5
  3. 91 ÷ 7 = 13 exactly, so 91 = 7 × 13 is not prime
  4. 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.

RangePrimesCount
1–102, 3, 5, 74
11–2011, 13, 17, 194
21–3023, 292
31–4031, 372
41–5041, 43, 473
51–6053, 592
61–7061, 672
71–8071, 73, 793
81–9083, 892
91–100971

1 is not prime.

Frequently Asked Questions

No. A prime has exactly two different factors, and 1 has only one.
Yes. Its only factors are 1 and 2, and it's the only even prime.
Test whether any prime up to its square root divides it. For 221, √221 ≈ 14.9; testing 2, 3, 5, 7, 11 and 13 shows 221 = 13 × 17, so it isn't prime.
25: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97.
Two numbers whose HCF is 1, such as 8 and 15. They don't need to be prime themselves.