Calculator Scope

Calculator Scope - Smart Online Calculators for Everything

From math, science, finance, health, and construction to marketing, text tools, developer utilities, and more. All calculators in one fast, accurate, easy-to-use platform.

Prime Number Checker

Prime Number Checker

Advertisement 1
Advertisement 2
This tool checks whether a number is prime, e.g. 97 is prime, while 100 is not (its smallest factor is 2).

Enter any whole number to check whether it's prime. This tests for divisibility by every number up to its square root, and if a number isn't prime, shows the smallest factor that divides it.

A prime number is a whole number greater than 1 with exactly two positive divisors — 1 and itself — meaning nothing else divides it evenly. Checking only up to the square root is enough to be certain: if a number had a factor larger than its square root, it would necessarily also have a corresponding factor smaller than the square root, so any factor that exists would already have been found by that point, making the square-root cutoff both correct and efficient even for fairly large numbers.

Advertisement 3
  • Definition of a prime number: a whole number greater than 1 with exactly two positive divisors — 1 and itself — meaning nothing else divides it evenly.
  • Why only checking up to the square root is enough: if a number has a factor larger than its square root, it must also have a corresponding factor smaller than the square root, so checking beyond that point is redundant.
  • 1 is not prime, and neither is 0 or any negative number: primality is only defined for whole numbers greater than 1.

Why isn't 1 considered a prime number?

A prime number needs exactly two distinct divisors (1 and itself) — 1 only has one divisor (itself), so it doesn't meet the definition, and excluding it also keeps the Fundamental Theorem of Arithmetic clean and consistent.

What does the "smallest factor" tell me about a non-prime number?

It's the quickest way to see why the number failed the primality test — the smallest factor is always a prime number itself, and dividing the original number by it is the first step toward a full prime factorization.