Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

Prime Checker

The prime checker tests one whole number. 17 is prime. 18 is not. 1 is not, and 0 is not. A prime has exactly two positive divisors, 1 and itself.

New

The test tries divisors from 2 up to the square root. A no does not name the divisor. The factor calculator will, up to the same bound of one million.

How to use

  1. Enter a whole number from 0 to 1000000.
  2. Press Check.
  3. Reset restores 17.

Formula / how it works

The test. If the number is less than 2, it is not prime. Otherwise trial division runs from 2 while the square of the candidate does not exceed the number. The first divisor ends the test with no. If none is found, the answer is yes. 17 is yes. 18 is no because it divides by 2. 2 itself is yes. It is the even prime. The prime factor calculator names the factors. This page only answers yes or no. One million is the bound.

Seventeen is prime. Eighteen is not, because it divides by 2. One is not, because it has a single positive divisor. Zero is not. The test tries divisors from 2 up to the square root and stops at the first hit. A yes means no divisor was found. A no does not name the divisor. The factor page will name them for numbers up to a million, which is the same upper bound. Two is prime. It is the even prime. Four is not. Use 2 and 4 as a pair if you are showing someone the definition. The page will not list every prime up to the number. It answers one number.

Seventeen and eighteen are enough to show yes and no. Add 2 and 1 if you are teaching. 2 is yes. 1 is no. The factor page will show 18 as 2 × 3 × 3 if you want the reason the checker said no. The checker itself stays a yes or no so the answer is one word. The bound of one million matches the factor page. A number past that is refused on both, so you are not left with a yes here and a refusal there. Trial division is exact. There is no probabilistic test and no “probably prime”. For these sizes an exact answer is cheap.

A prime number has exactly two positive divisors, 1 and itself. 17 is prime. 18 is not, because 2 divides it. 2 is prime. 1 is not, because it has only one positive divisor. 0 is not. The test tries divisors from 2 upward while the square of the candidate does not exceed the number. The first divisor ends the test with no, and the divisor is not named. If no divisor is found, the answer is yes. The factor calculator names the factors for the same range, up to one million. Use the checker for a single word and the factor page for the list. 18 on the factor page is 2 × 3 × 3, which is why the checker says no. There is no probabilistic test and no “probably prime”. For numbers up to one million, trial division is exact and immediate. A number outside that range is refused on both pages. Reset restores 17. Change it to 18 for the no example, and try 2 and 1 when you are showing the definition.

Memorise four answers: 17 yes, 18 no, 2 yes, 1 no. The first pair is the worked example. The second pair is the definition, an even prime and a number with only one positive divisor. The factor page explains 18. This page only says no. Reset returns 17 so you can repeat the yes sample without retyping it.

Worked examples

Seventeen

Inputs: Number: 17

Leave the number as 17 and press Check. The answer is yes.

Result: Number: 17 Prime: yes A prime has exactly two positive divisors, 1 and itself. 0 and 1 are not prime.

Eighteen

Inputs: Number: 18

Change the number to 18 and press Check. The answer is no.

Result: Number: 18 Prime: no A prime has exactly two positive divisors, 1 and itself. 0 and 1 are not prime.

Use cases

  • A yes or no for a single number.
  • Showing that 1 is not prime.
  • Showing that 2 is prime.
  • Leaving the factors to the factor page.

Tips & limitations

  • 1 and 0 are not prime.
  • A no does not name the divisor.
  • 2 is prime.
  • The bound is one million.

FAQ

Is 17 prime?

Yes. No divisor from 2 up to its square root divides it.

Is 18 prime?

No. It divides by 2.

Is 1 prime?

No. A prime has exactly two positive divisors. 1 has one.

Is 2 prime?

Yes. It is the even prime.

Will a no name the divisor?

No. Use the prime factor calculator for the list.

Is the number uploaded?

No. The trial runs in the browser.

Results are calculated from the values you enter. Double-check measurements and allow a margin before buying materials or making decisions.