Choose a translated page where available; otherwise a clear fallback is shown.

PDora Guide · 5 min read

Is It a Prime Number? How to Check Any Number

A prime number is a whole number greater than 1 whose only positive factors are 1 and itself. Checking a small number by hand is easy, but larger values need a method. This guide explains the divisibility test used by the Prime Number Checker, with examples you can verify yourself.

Ready to try this workflow? Open the matching tool.

Open Prime Number Checker

Published by PDora · Last updated November 17, 2026

What makes a number prime or composite?

A prime has exactly two positive factors. 7 is prime because only 1 and 7 divide it evenly. A composite number has more than two factors: 12 is divisible by 1, 2, 3, 4, 6 and 12.

The numbers 0 and 1 are neither prime nor composite. 1 has only one positive factor, so it fails the two-factor rule, and this is why the checker reports 0 and 1 as not prime.

The square-root test, step by step

You only need to test divisors up to the square root of the number. If a number has a factor larger than its square root, it must also have a matching smaller factor, so the smaller one would already have been found.

To test 97, the square root is about 9.85, so check 2, 3, 5 and 7. None divides 97 evenly, therefore 97 is prime. To test 91, check 2, 3, 5 and 7: 91 ÷ 7 = 13, so 91 = 7 × 13 and is composite. Many people mistake 91 for a prime because it is not divisible by 2, 3 or 5.

Use the Prime Number Checker

Enter a non-negative whole number and run the checker. It reports whether the number is prime or not prime using trial division up to the square root. It accepts whole numbers within the browser's safe integer range, and it rejects decimals and negative values with an input error.

For a result you do not trust, test it by hand: find one factor other than 1 and the number itself, and the number is composite.

Handy facts to remember

2 is the only even prime, because every other even number is divisible by 2. Any number ending in 0 or 5, other than 5 itself, is divisible by 5. A number is divisible by 3 when its digits add up to a multiple of 3, so 51 (5 + 1 = 6) is divisible by 3 and is not prime.

  1. Primes below 30: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.
  2. 221 looks prime but equals 13 × 17.
  3. Prime checking is different from finding the greatest common divisor of two numbers.

Official and technical references

Frequently asked questions

Is 1 a prime number?

No. A prime needs exactly two positive factors, and 1 has only one. Modern definitions exclude 1 so that every integer above 1 has a single prime factorisation.

Is 2 a prime number?

Yes. 2 is divisible only by 1 and 2, and it is the only even prime number.

How do I check if a large number is prime?

Divide it by every prime up to its square root. If none divides it evenly, the number is prime. The Prime Number Checker applies this test to whole numbers within the supported range.

Is 91 a prime number?

No. 91 = 7 × 13, so it is composite even though it is not divisible by 2, 3 or 5.

Can the checker test decimals or negative numbers?

No. Primes are defined for whole numbers greater than 1, so decimals and negative values show an input error.

Try a related tool

Continue with a related PDora utility when you are ready to put this guide into practice.

PDora toolbox

Explore all tools

PDF tools are here, with finance, text, developer and image utilities in our all-tools hub.

Explore finance, text, developer & image tools →