Prime Number Checker

Whether a number is prime, and what divides it if not.

Math Calculators Free, no sign-up Runs in your browser

Prime Number Checker tool

—
Prime
—
Smallest factor
—
Number of divisors
—
Previous prime
—
Next prime
Nearby primesGap to the next

About the Prime Number Checker

Prime Number Checker tells you whether a whole number is prime and, if it is not, gives the smallest number that divides it. It checks for factors only up to the square root, which is sufficient: any factor larger than the square root pairs with one smaller than it, so if none exists below, none exists above.

That shortcut is what makes checking large numbers quick. For 97 it means testing divisibility up to 9 rather than up to 96, and the saving grows with the number. The working section states the bound it used so you can see why the answer is conclusive rather than a guess.

One and zero are neither prime nor composite, and the calculator says so rather than giving a misleading yes or no. A prime has exactly two distinct divisors, one and itself; one has only a single divisor, which is why excluding it is a definition rather than an oversight.

The page shows its working, not just its answer. Where there is a formula it is printed with your own numbers substituted in, so you can check the result rather than take it on trust -- which is the difference between a calculator you can use for something that matters and one you cannot.

Everything runs inside your browser. What you type is never uploaded, never logged and never stored, and the calculator keeps working if your connection drops after the page has loaded.

How to use the Prime Number Checker

  1. Enter number to check and how many nearby primes to listDecimals are fine, and thousands separators are accepted and ignored.
  2. Read the prime, smallest factor and number of divisorsThe figures update as you type. The Calculate button is there if you would rather press something, but nothing waits for it.
  3. Copy or check the resultCopy the summary with the copy button, or open the table to check it row by row and read the formula with your own numbers in it.

Features

  • Shows prime, smallest factor, number of divisors, previous prime and next prime together, so you are not running it twice
  • A results table you can read across
  • Prints the formula with your own figures substituted in
  • Updates as you type, with no button to press and no page reload
  • Copy the result in one click
  • Free, no sign-up, and it runs entirely in your browser

Who uses this tool

The prime number checker is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Checking a number in a homework problem
  • Finding the next prime above a given value
  • Getting the smallest factor of a stubborn number
  • Looking at the gaps between consecutive primes

Frequently asked questions

Is 1 a prime number?

No. A prime has exactly two distinct divisors. One has only itself, so it is excluded, which also keeps prime factorisation unique.

Why only check up to the square root?

Because factors come in pairs that multiply to the number. If one is above the square root, the other is below it, so finding nothing below proves there is nothing above.

Is 2 prime?

Yes, and it is the only even prime. Every other even number divides by 2.

If the prime number checker is not quite what you need, these other free tools solve closely related problems, and there are 25 more in math calculators.

Modulo Calculator

Remainder and quotient, with negative numbers handled.

Math Calculators Use tool

Factorial Calculator

n! with the expansion, digit count and related counts.

Math Calculators Use tool

Number Base Converter

Convert a number between binary, octal, decimal, hex and custom bases.

Encoding & Conversion Use tool

Checked and rebuilt on 2026-10-14. The method this calculator uses is described in the section above, and corrections go through the contact page.