Prime Number Checker

Check primality, factorization, divisors, and nearest primes.

Enter Values

Results

Composite

Prime Factorization

---

All Divisors

---

Nearest Lower Prime

None

Nearest Higher Prime

0

n is prime if ∄ p≤n such that p∣nn \text{ is prime if } \nexists\, p \le \sqrt{n} \text{ such that } p \mid n

Is Your Number Prime?

A prime number is a whole number greater than 1 whose only divisors are 1 and itself. Examples include 2, 3, 5, 7, 11 and 13. A composite number has at least one other divisor. This prime number checker tells you instantly whether a number is prime or composite. For composite numbers it shows the prime factorization and the full list of divisors, and for any number it finds the nearest lower and higher primes.

How Prime Checking Works

To test whether n is prime, you only need to check whether it divides evenly by any whole number from 2 up to the square root of n. If none of them divide it, n is prime. That shortcut makes checking even large numbers fast.

Example: 91 looks prime, but √91 ≈ 9.5, and testing 2 through 9 shows 91 = 7 × 13, so 91 is composite. By contrast, 97 is not divisible by 2, 3, 5 or 7, so 97 is prime.

Prime Factorization

Every whole number greater than 1 can be written as a product of prime numbers in exactly one way (the Fundamental Theorem of Arithmetic). For example, 360 = 2³ × 3² × 5. Prime factorization is used to find the greatest common divisor and least common multiple, to simplify fractions and in modern encryption.

Frequently Asked Questions

Is 1 a prime number?

No. By definition, a prime number must have exactly two distinct divisors, 1 and itself. The number 1 has only one divisor, so it is neither prime nor composite.

Is 2 the only even prime number?

Yes. Every other even number is divisible by 2, so it has a divisor other than 1 and itself. That makes 2 the only even prime.

Why are prime numbers important?

Primes are the building blocks of all whole numbers. They are also essential to internet security, because encryption systems like RSA rely on how hard it is to factor very large numbers into their prime factors.