Skip to main content
ToolsHub

Prime Number Checker

Enter a whole number to test whether it is prime, view its prime factors if composite, and see all the primes up to it.

Updated

Files never leave your browser

Enter a whole number to check if it is prime.

Result will appear here

Enter a whole number and press Check to see if it is prime, its factors, and the primes up to it.

How to use Prime Number Checker

The prime number checker tells you instantly whether a whole number is prime or composite. Enter any non-negative integer and it tests primality using trial division up to the square root, shows the full prime factorization when the number is composite, and lists every prime up to your value. It is a fast, private way to verify primes for maths homework, cryptography experiments, or programming puzzles — with nothing sent to a server.

  1. Type any whole number into the input box.
  2. Press Check to test whether it is prime.
  3. Read the verdict and, for composite numbers, the prime factorization.
  4. Scroll the list of primes up to your number, or copy the summary to share.

Your data never leaves your device — 100% private processing.

Prime versus composite numbers

A prime number is a whole number greater than 1 whose only divisors are 1 and itself — 2, 3, 5, 7, 11, 13, and so on. A composite number has at least one additional divisor, so it can be written as a product of smaller primes. The number 2 is the only even prime; every other even number is divisible by 2. Recognising primes matters because they are the building blocks of all whole numbers: the fundamental theorem of arithmetic says every integer above 1 factors into primes in exactly one way.

Small numbers classified
NumberPrime?Factorization
2Prime2
9Composite3 × 3
17Prime17
60Composite2 × 2 × 3 × 5

Why primes matter beyond the classroom

Primes underpin modern cryptography: RSA encryption relies on the fact that multiplying two large primes is easy but factoring their product back into primes is extremely hard. Hash tables and pseudo-random number generators often use prime sizes to spread values evenly and avoid clustering. In everyday maths, prime factorization is the fastest route to simplifying fractions, finding a greatest common factor, or reducing a ratio to its lowest terms — which is why a quick, reliable prime checker is a handy tool to keep at hand.

Worked examples

A prime

Inputs: 97

Result: 97 is prime

A composite

Inputs: 84

Result: Not prime · 2 × 2 × 3 × 7

Primes below a limit

Inputs: 30

Result: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29

Glossary

Prime number
A whole number greater than 1 whose only divisors are 1 and itself.
Composite number
A whole number greater than 1 that has at least one divisor other than 1 and itself.
Prime factorization
Expressing a number as a product of primes, counted with multiplicity, e.g. 12 = 2 × 2 × 3.
Sieve of Eratosthenes
An ancient algorithm that finds all primes up to a limit by repeatedly marking the multiples of each prime.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Calculators

Explore all Calculators.