ZapKit

Prime Number Checker

Enter a whole number to find out instantly whether it's prime, and if not, which primes multiply to make it.

What is a prime number?

A prime number is a whole number greater than 1 that can only be divided exactly by 1 and itself: 2, 3, 5, 7, 11, 13 and so on. Every other whole number above 1 is composite and can be broken down into primes in exactly one way.

Primes are the building blocks of arithmetic and the basis of the encryption that protects online banking. Students use a checker for homework on factors and divisibility, and puzzle fans to test large numbers. Along with the yes or no answer, this tool gives the full prime factorisation, how many divisors the number has, and the closest primes either side.

How to use the Prime Number Checker

  1. 1.Type a whole number

    Any number up to about nine quadrillion.

  2. 2.Read the verdict

    Prime or not, with the prime factorisation.

  3. 3.See the neighbours

    The nearest primes below and above are shown too.

Example: is 221 prime?

221 looks prime, as it isn't divisible by 2, 3, 5, 7 or 11, but:

Prime?
No
Prime factorisation
13 × 17
Number of divisors
4
Nearest primes
211 and 223

221 is the product of two primes, 13 and 17, so it is composite.

How primality is tested

A number is prime if it has exactly two divisors: 1 and itself. The checker tries dividing by 2 and then by odd numbers up to the square root, because any factor larger than the square root pairs with one smaller than it.

The factorisation also gives the number of divisors: add one to each prime's power and multiply. 221 = 13 × 17, so it has (1+1)(1+1) = 4 divisors: 1, 13, 17 and 221.

Frequently asked questions

Is 1 a prime number?

No. A prime needs exactly two different divisors, and 1 has only one.

Is 2 prime?

Yes. It's the only even prime number.

What is prime factorisation?

Writing a number as a product of primes, such as 360 = 2³ × 3² × 5. Every whole number above 1 has exactly one.

How big a number can it check?

Up to 9,007,199,254,740,991, the largest whole number a browser handles exactly. The nearest primes are shown for numbers up to a trillion.

More Utilities tools