Maths & numbers
Prime number checker
Check whether a whole number is prime.
A clear answer. Here’s how.
Checks divisibility up to the square root, testing 2, 3 and candidates of the form 6k±1. Zero and one are neither prime nor composite. Supports whole numbers up to one trillion.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- Whole number to check
- 97
Example result
97 is prime.