Math · Every step shown

Prime Number Calculator

Check whether a whole number is prime — divisible only by 1 and itself.

Enter your numbers

Press Solve with steps to see the answer and how to get it.

Job: Number theory
Your answer

Press Solve with steps to see the answer and every step.

How it works, examples and FAQ

Test every whole number from 2 up to the square root of your number. If any of them divides evenly, it's not prime. If none do, it is prime.

Example: to check 97, you only need to test up to √97 ≈ 9.8, so 2 through 9. None divide evenly, so 97 is prime.

What is a prime number?
A whole number greater than 1 that has no divisors other than 1 and itself.

Is 1 a prime number?
No. By definition, prime numbers must be greater than 1.

How do you check if a large number is prime?
Test whether any whole number from 2 up to the square root of the number divides it evenly. If none do, it's prime — you never need to check past the square root.

More math calculators

Snap a photo of a problem →   All math tools →   All calculators →

These calculators show the method as well as the answer, so you can learn the steps and check your own work. If a result ever looks wrong, tell us on the Contact page with the numbers you entered.

Save or print your results

On a phone, choose Save as PDF on the next screen to keep a copy.