Prime Number Checker

Check whether a number is prime, see its prime factors and find the next and previous primes.

Runs in your browser Free

Numbers from 0 to 2^64 are supported.

What is a prime number?

A prime is a natural number greater than 1 that is divisible only by 1 and itself: 2, 3, 5, 7, 11, 13… Primes are the building blocks of mathematics and the foundation of modern encryption such as RSA.

What the tool does

  • Checks whether a number is prime
  • Factorises composite numbers (e.g. 360 = 2³ × 3² × 5)
  • Finds the next and previous prime

Fast for big numbers

It uses a deterministic Miller–Rabin test and Pollard's rho factorisation, so even 19-digit numbers are answered instantly. Useful for homework, olympiad practice and programming contests.

How to use Prime Number Checker

  1. Enter the number to check.
  2. See instantly whether it's prime.
  3. If not, review its prime factorisation.
  4. Look at the next and previous primes.

Why use this tool?

Gives exact results even for huge numbers without trial division by hand.

FAQ

Is 1 a prime number?

No. By definition a prime has exactly two distinct divisors; 1 has only one.

Why is 2 the only even prime?

Every other even number is divisible by 2 and so has at least three divisors.

What is the largest prime?

There are infinitely many primes; the largest known ones are Mersenne primes with millions of digits.

Related tools