Math

Prime Number Checker

Find out instantly whether a whole number is prime, and see its factors if it isn't.

Prime check

Not prime

91 is divisible by 7, so it's composite.

Prime factorization

91 = 7 × 13

How it works

A prime number has exactly two divisors: 1 and itself. So 7 is prime, but 91 isn't because 7 × 13 = 91. Anything below 2 doesn't count as prime at all.

To decide, the checker tries dividing your number by every integer up to its square root. If nothing divides evenly, it's prime. You only need to test up to the square root because any larger factor would have a matching smaller partner you've already checked.

When a number turns out composite, you get the smallest factor that breaks it, plus its full prime factorization — like 91 = 7 × 13 — so you can see exactly why.

Frequently asked questions

Is 1 a prime number?

No. A prime needs exactly two distinct divisors, and 1 only has itself. By the same logic 0 and negative numbers aren't prime either, so the checker flags anything below 2 straight away.

Why only test up to the square root?

Factors come in pairs that multiply to your number. If both were larger than the square root, their product would overshoot. So once you've checked up to the square root with no hits, there's nothing left to find.

What's the largest number I can check?

It handles whole numbers up to roughly nine quadrillion — the limit where integers stay exact. Beyond that you'll get a dash instead of a possibly wrong verdict.