Prime Checker — Test Whether an Integer Is Prime
CalculatorA prime checker tests whether an integer is prime, meaning it has only 1 and itself as divisors.
What is it
A prime number is a natural number greater than 1 with exactly two positive divisors: 1 and itself. To test n, it is enough to try divisors up to √n.
n is prime if no integer d from 2 to √n divides n
How to use
- 1Enter an integer of 1 or greater.
- 2Press calculate.
- 3Check whether the number is prime.
Reference
| n | Result |
|---|---|
| 2 | Prime |
| 97 | Prime |
| 100 | Not prime |
Sources & standards
- MDN Web Docs: Client-side web APIs - MDN Web Docs
FAQ
Is 1 a prime number?
No. A prime number must be greater than 1 and divisible only by 1 and itself.
Is prime checker input sent to a server?
No. This tool runs in your browser and does not send input to a server.