Prime Number Checker

A prime number has exactly two factors: 1 and itself. 2, 3, 5, 7 and 11 are primes; 9 is not, because 3 × 3 = 9.

Results update as you type.

Is it prime?

Yes

97 has no factors other than 1 and itself

Next prime
101
Previous prime
89

About this calculator

Enter a whole number to check it, and see the nearest primes on either side.

How to use it

  1. Enter a whole number.
  2. Read whether it is prime.

The formula

n is prime if no number from 2 to √n divides it
√n
only factors up to the square root need checking

Worked example

97

  1. No number from 2 to 9 divides 97, so it is prime.
  2. The previous prime is 89 and the next is 101.

What the result means

2 is the only even prime.

Prime numbers up to 100

Every prime after 3 is one more or one less than a multiple of 6, but not every such number is prime: 25 = 6 × 4 + 1 is not.

All 25 primes below 100
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

Checking a number by hand

You only need to try prime divisors up to the square root. For 221, √221 ≈ 14.9, so try 2, 3, 5, 7, 11 and 13.

  • 2: 221 is odd.
  • 3: the digit sum 5 is not a multiple of 3.
  • 5: it does not end in 0 or 5.
  • 7: 7 × 31 = 217, remainder 4.
  • 11: 11 × 20 = 220, remainder 1.
  • 13: 13 × 17 = 221, so 221 is not prime. The calculator shows the same: divisible by 13, prime factors 13 × 17.

Terms that are often confused

  • Co-prime numbers share no factor other than 1 but need not be prime themselves: 8 and 15 are co-prime.
  • Twin primes differ by 2, such as 11 and 13, or 59 and 61.
  • A composite number has more than two factors. 0 and 1 are neither prime nor composite.

Assumptions

  • Whole numbers up to 10¹².

Limitations

  • Larger numbers need specialised tests.

Frequently asked questions

Is 1 a prime number?

No; a prime needs exactly two different factors.

Is 2 prime?

Yes, the only even prime.

How many primes are below 100?

25.

Is 51 a prime number?

No. 51 = 3 × 17; its digit sum, 6, is divisible by 3.

Is 91 a prime number?

No. 91 = 7 × 13. It is easy to miss because it is not divisible by 2, 3 or 5.

What is the smallest three-digit prime?

101. The largest two-digit prime is 97.

Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.