Prime Number Checker

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

How it works

Type a whole number and the tool tells you if it is prime (divisible only by 1 and itself). If not, it shows the prime factorisation, so 360 becomes 2^3 x 3^2 x 5. It also shows the number of divisors, the sum of the divisors, Euler's totient and the nearest primes either side.

Numbers up to a million million (10^12) are checked exactly by trial division, which is quick.

Worked example

561 looks prime but is 3 x 11 x 17 (a Carmichael number). 97 is prime. 360 = 2^3 x 3^2 x 5 has (3+1)(2+1)(1+1) = 24 divisors.

Good to know

Common questions

Is 1 a prime number?
No. A prime has exactly two divisors, and 1 has only one.
What is a composite number?
A number with more than two divisors, like 12.
What is Euler's totient?
The count of numbers from 1 to n that share no factor with n. It is used in RSA.

More in Utilities.