How this calculation works
A composite integer has a factor at or below its square root. If both factors were larger, their product would exceed the number.
Test divisors up to √nA worked example
97 has no divisor between 2 and 9, so it is prime.
Good to know
Numbers below 2 are neither prime nor composite.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Check whether a whole number has a nontrivial divisor.
The primary result is labeled “Classification”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Numbers below 2 are neither prime nor composite.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
97 has no divisor between 2 and 9, so it is prime.
Which rule does this calculator apply?
Test divisors up to √n