Prime Number Checker

Check whether a number is prime and see its smallest factor and full prime factorization if it is not.

Prime Number Checker

Check whether a number is prime and see its smallest factor and full prime factorization if it is not.

Please enter a valid value.

Result

How to use the Prime Number Checker

  1. Enter a whole number greater than 1.
  2. Click Calculate.

Formula

A prime number has exactly two divisors: 1 and itself.
Test divisibility up to √n.

Example

97 is prime (no divisors other than 1 and 97).
100 = 2² × 5²

Step-by-step calculation

  1. Test divisibility by 2, 3, 5, 7, ... up to √97 ≈ 9.8.
  2. No divisor found → 97 is prime.
  3. For 100: smallest factor is 2. 100 = 2×2×5×5 = 2² × 5².

Real-world uses

  • Cryptography and security.
  • Number theory studies.
  • Factoring and divisibility checks.

Common mistakes

  • Entering 0 or 1 (neither is prime by definition).
  • Thinking all odd numbers are prime (9 = 3×3 is not).
  • Assuming large numbers are hard to check — trial division up to √n is efficient.

Frequently asked questions

Is 1 a prime number?
No. By mathematical definition, 1 has exactly one divisor, not two. Primes must have exactly two.
What is the largest prime I can check?
Numbers up to about 9 quadrillion (9×10¹⁵) are checked efficiently.
What is prime factorization?
Expressing a composite number as a product of prime factors. For example, 12 = 2² × 3.

More Basic Math calculators