Prime Number Calculator

Three tools in one place: check whether a number is prime, see its full prime factorization, or list every prime number up to a chosen limit. No sign-up, instant results.

Prime number checker

is it prime? -

Prime factorization

factorization 0

List of primes up to a limit

primes found 0

What is a prime number

A prime number is a whole number greater than 1 that has only two divisors: 1 and itself. The first prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. The number 2 is the only even prime, since every other even number is always divisible by 2 in addition to itself.

Why 1 is not prime

By definition, a prime number must have exactly two distinct divisors. The number 1 has only one divisor, itself, so it doesn't fit the definition. This choice also keeps prime factorization unique for every number, without needing to include endless repetitions of "1" in the count.

How prime factorization works

Every whole number greater than 1 can be written as a unique product of prime numbers, called its prime factorization. For example, 360 breaks down into 2³ × 3² × 5, since 2×2×2×3×3×5 equals 360. This calculator finds that breakdown by testing prime divisors in increasing order, dividing the number repeatedly until only 1 remains.

How to test whether a number is prime

The most direct way to check whether a number is prime is to try dividing it by every integer from 2 up to its square root. If none of those divisors divide it evenly, the number is prime. There's no need to test past the square root, because if a larger divisor existed, its matching divisor on the other side of the division would already have shown up earlier.

Practical example

In cryptography, such as the RSA algorithm, security relies on multiplying two very large prime numbers to generate a key, since it's practically infeasible to recover the two original prime factors just from the result of that multiplication.

Frequently asked questions

What is a prime number?

It's a whole number greater than 1 that can only be divided evenly by 1 and itself, like 2, 3, 5, 7, and 11.

Is 1 a prime number?

No. Prime numbers must have exactly two distinct divisors, and the number 1 has only one.

How does prime factorization work?

It writes a number as a product of prime factors, like 360 = 2³ × 3² × 5.