The prime number calculator can do the following tasks for you.
- Check whether a number is prime. If you provide a list of numbers, it will tell you which (if any) of those numbers are prime.
- Find the nthprime number.
- Get the list of first nprime numbers or prime numbers in a certain range.
- Find the prime numbers closest to a number.
It's a great tool if you are interested in or need to work with prime numbers.
Usage Guide
Show
Hide
i. Valid Inputs
When providing input to the first calculator (checking primes), enter a list of upto five positive integers separated by commas.
For the remaining four calculators, each input needs to be a positive integer.
ii. Example
If you would like to see an example of the calculator's working, just click the "example" button.
iii. Share
We would love to see you share our calculators with your family, friends, or anyone else who might find it useful.
By checking the "include calculation" checkbox, you can share your calculation as well.
Here's a quick overview of what prime numbers are and how to check if a number is prime.
For those interested, we have a more comprehensive tutorial on prime numbers.
Prime Numbers
A prime number is a natural numbers greater than 1 that has only two factors — 1 and itself.
Natural numbers that are not prime are known as composite numbers.
1 is neither prime nor composite.
Checking Whether a Number Is Prime
Let me explain an efficient way to check whethr a number is prime using the following example.
Example
Check whether
85 is a prime number.
Solution
Step 1. Create a list of prime numbers up to the square root of the number you want to test.
Here, our number is 85. It's square root would be something between 9 and 10 (9 point something). We don't need the exact square root, just the whole number part. So 9
Now, the prime numbers up to 9 are 2, 3, 5, and 7.
Step 2. Check if the given number is divisible by any of the prime numbers obtained in step 1. If the number isn't divisible, then it is prime. Otherwise, not.
85 is not divisible by 2, 3, 5, or 7. So, 85 is a prime number.