Prime Number Checker

Is this number prime? Use our fast algorithm to check primality, find all factors, and discover the next prime number instantly.

Prime Status

Prime

Next Prime

19

List of Factors (0)

What are Prime Numbers?

A prime number is a whole number greater than 1 whose only divisors are 1 and itself. For example, 2, 3, 5, 7, 11, 13, and 17 are prime. Numbers that have more than two factors are called composite numbers.

About the Prime Number Checker

Type a number to find out whether it is prime. If it is not, you see its factors; either way you also get the next prime number after it.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Enter a whole number.
  2. Read whether it is prime or composite.
  3. See its factors and the next prime number.

How primality is checked

A prime number has exactly two factors: 1 and itself. 0 and 1 are not prime; 2 is the only even prime.

The checker first rules out multiples of 2 and 3, then tests divisors of the form 6k ± 1 (5, 7, 11, 13, …) up to the square root of the number. If none divides it, the number is prime. You only need to go up to the square root, because any larger factor pairs with a smaller one already tested.

Example

97: √97 ≈ 9.8, and 97 is not divisible by 2, 3, 5 or 7, so 97 is prime. 91 looks prime but 91 = 7 × 13.

Common mistakes

  • Calling 1 a prime number: it has only one factor.
  • Assuming all odd numbers are prime: 9, 15, 21, 91 are not.
  • Testing divisors beyond the square root, which wastes time but does not change the answer.

Frequently asked questions

Is 1 a prime number?

No. A prime has exactly two different factors, and 1 has only one.

Is 2 a prime number?

Yes – the only even prime.

What are the prime numbers between 1 and 50?

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47.