lifekit

Search tools

Type a tool name, then press Enter to open it.

Prime number checker

Check if a number is prime, see its prime factorization and smallest factor, find the next and previous prime, and list all primes in a range.

  • Free
  • Runs in your browser
  • Nothing is uploaded

How to use it

  1. Enter a whole number, as large as 100 digits.
  2. Read whether it is prime, its smallest factor and prime factorization, and the primes just before and after it.
  3. Open the steps to see how the answer was found, by trial division for small numbers or the Miller-Rabin test for large ones.
  4. To list primes, enter a start and end under Primes in a range.

Private by design

Everything runs on your device. Nothing you enter or open here is uploaded.

Questions

A number is prime if it is greater than 1 and no whole number other than 1 and itself divides it evenly. You only need to test divisors up to its square root: 97 is prime because none of 2, 3, 5 or 7 divides it.

No, 1 is not prime. A prime has exactly two divisors, 1 and itself, and 1 has only one, so it is neither prime nor composite.

2 is the only even prime number. Every other even number is divisible by 2, so it has at least three divisors.

There are 25 prime numbers between 1 and 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.

A probable prime is a number that passes a strong primality test but hasn't been proven prime. This checker proves primality below 3.3 × 10²⁴ and labels larger numbers that pass as probable primes, which are almost certainly prime.