Everyday math guide

Prime Numbers Explained

Learn what makes a number prime, how to test it, and why one is not prime.

Written by Saroj Roy, founder and maintainer, numbertrove · Formula checked against the sources below · Updated 2026-08-31

A prime number has exactly two positive factors: 1 and itself. Prime numbers are the indivisible building blocks used in factorization and many areas of mathematics.

The definition

Seven is prime because its only positive divisors are 1 and 7. Twelve is not prime because it also has 2, 3, 4, and 6 as factors. The definition uses positive whole-number divisors.

A practical test

To test n, you only need to try possible divisors up to √n. If none divides evenly, n is prime. Testing 97 only needs candidates through 9.8, so checking 2, 3, 5, and 7 is enough.

Why one is not prime

The number 1 has exactly one positive factor, not two. Treating it as prime would break the uniqueness of prime factorization, so modern definitions classify it as neither prime nor composite.

Use a verified result

For large values, use a tested implementation rather than relying on a quick visual pattern. A number page should show the classification and factor evidence so the result can be checked.

Sources

The figures and rules in this guide are checked against: