Prime Number Checker

Is a number prime?

How this calculator works

A prime number is a natural number > 1 with no divisors other than 1 and itself. Test by trying divisors up to √n.

The first primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

Only needing to check divisors up to √n rather than all the way to n itself is what makes this test fast — if n had a factor larger than √n, it would necessarily have a matching factor smaller than √n too, so checking beyond that point is redundant.

Example

97 is prime — no divisor from 2 to 9 divides it evenly (√97 ≈ 9.85).

Frequently asked questions

Is 1 prime?

No, by modern convention. Primes are defined as > 1.

Largest known prime?

Mersenne prime 2^82,589,933 − 1, discovered 2018 — over 24 million digits.

Why do primes matter for encryption?

Modern encryption relies on the fact that multiplying two large primes together is easy, but factoring the huge result back into its original primes is computationally very hard — that asymmetry is the security foundation of systems like RSA.

More Math calculators