Prime Number Checker — Primality Test, Range & Factorization

Check if a number is prime, list primes in a range up to 100,000, or find the prime factorization of any number.

  • Primality test
  • Primes in range (up to 100k)
  • Prime factorization
  • Browser-only
97 is ✓ prime

How this tool fits your workflow

More in this category →

Prime numbers: fundamentals

A prime number has exactly two distinct positive divisors: 1 and itself. Composite numbers have more than two divisors. 1 is neither prime nor composite by definition — this exclusion makes the Fundamental Theorem of Arithmetic work: every integer has a unique prime factorization.

The first 25 primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. They become less frequent as numbers grow but never stop.

Prime factorization and its uses

Every composite number breaks into a unique product of primes. 360 = 2^3 times 3^2 times 5. GCD and LCM can be computed from factorizations: GCD takes the minimum exponent for each prime; LCM takes the maximum.

RSA cryptography relies on the difficulty of factoring large semiprime numbers. While finding primes is fast, factoring their product back into two primes is computationally hard — this asymmetry is the foundation of public-key cryptography.

Frequently asked questions

What is a prime number?
A prime number is a natural number greater than 1 with no positive divisors other than 1 and itself. Examples: 2, 3, 5, 7, 11. The number 1 is not prime. 2 is the only even prime.
How is primality tested?
Trial division checks if the number is divisible by any integer from 2 up to its square root. If no divisor is found, the number is prime. This checker uses trial division up to 10 billion.
What is prime factorization?
Prime factorization expresses a number as a product of primes. Example: 360 = 2^3 times 3^2 times 5. Every integer greater than 1 has a unique prime factorization (Fundamental Theorem of Arithmetic).
Are there infinitely many prime numbers?
Yes. Euclid proved this around 300 BC: multiply all known primes and add 1 — the result is either prime or has a prime factor not in the original list, so no finite list contains all primes.