ΣCalculator Solver
Numbers

Prime Number Checker

Check whether a number up to one trillion is prime. You also get its prime factorization, every divisor and the nearest primes, with the reasoning shown.

Loading the solver…

How to use it

  1. Type a whole number in the box. The result updates as you type.
  2. If the number is composite, read its smallest divisor, prime factorization and full list of divisors.
  3. Use the previous and next prime to see where your number sits among the primes.

What is a prime number?

A prime number is a whole number greater than 1 that has exactly two divisors: 1 and itself. 2, 3, 5, 7 and 11 are prime. 2 is the only even prime, because every other even number is divisible by 2.

A whole number greater than 1 that is not prime is called composite. The number 1 is neither prime nor composite, because it has only one divisor.

How the checker works

To prove a number n is prime, you only need to test divisors up to √n. If n = a × b and both a and b were larger than √n, their product would be larger than n. So one of them must be √n or smaller.

For 97, √97 ≈ 9.8, so testing 2, 3, 5 and 7 is enough. None divides 97, so 97 is prime. The checker skips multiples of 2 and 3 to test large numbers quickly.

Prime factorization and divisors

Every composite number can be written as a product of primes in exactly one way. This is the fundamental theorem of arithmetic. For example, 360 = 2³ × 3² × 5.

The exponents tell you how many divisors a number has: add 1 to each exponent and multiply. For 360 that is (3+1)(2+1)(1+1) = 24 divisors.

Prime numbers under 100

There are 25 primes below 100: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97.

Frequently asked questions

Is 1 a prime number?

No. A prime must have exactly two different divisors. 1 has only one, so it is neither prime nor composite.

Is 2 a prime number?

Yes. 2 is the smallest prime and the only even prime number.

How large a number can I check?

Any whole number up to 1,000,000,000,000 (one trillion). Results appear almost instantly.

What is the difference between prime and composite?

A prime has exactly two divisors, 1 and itself. A composite number has more than two divisors, so it can be split into smaller whole-number factors.