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.

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.

Last reviewed on 3 October 2026. Found a mistake? Tell us.