Like ToolFern? Prefer us as your source on Google →

Prime Number Checker

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

Result
Prime factors
Next prime
Divisors

How to use it

  1. Type a whole number.
  2. Press Check.
  3. Read whether it is prime, its prime factors, the next prime and its divisors.

How it works

Small numbers are tested by trial division. Large numbers use the Miller-Rabin test with fixed bases that are exact below 3.3 x 10^24 and extremely reliable above. Factorisation uses trial division and Pollard's rho with a time limit.

Frequently asked questions

What is a prime number?

A prime is a whole number above 1 whose only divisors are 1 and itself, such as 2, 3, 5, 7 and 11.

Is 1 a prime?

No. Primes must be greater than 1.

How large a number can I check?

Primality is tested exactly with big integers, so very long numbers work. Factorisation is limited to numbers whose smaller factors can be found quickly.

What is prime factorisation?

It writes a number as a product of primes, for example 360 = 2^3 x 3^2 x 5.

Found this useful? Share it