Prime Number Calculator

Check if a number is prime. A prime is a positive integer greater than 1 that has no positive divisors other than 1 and itself. Enter a whole number to see the result.

Enter number

Enter a whole number. 1 is not prime; 2 is the only even prime.

About the prime number calculator

This free prime number calculator checks whether a positive integer is prime. A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself. Examples of primes are 2, 3, 5, 7, 11, 13, and 17. You enter a number, click Check, and the tool tells you immediately if it is prime or not, with a short explanation. The calculator uses trial division (checking divisibility by integers up to the square root of the number) to determine primality. No sign-up is required; it is mobile-friendly and runs in your browser.

Prime numbers are central in number theory and appear in many applications: cryptography (e.g. RSA), hashing, and random number generation. By definition, 1 is not prime (so the smallest prime is 2). The only even prime is 2; every other even number is divisible by 2. This calculator accepts any positive integer; for very large numbers the check may take a moment, but for typical homework or curiosity use it is effectively instant.

Use this prime number calculator for homework, quick checks, or when you need to verify whether a number is prime. For a list of the first many primes, use a prime numbers table or list tool. For breaking a number into its prime factors, use the prime factorization calculator. This page focuses only on the yes/no question: is this number prime?

The prime number calculator is free, responsive on phones and tablets, and requires no account. It works for any positive integer you can enter; the algorithm is efficient for typical sizes. Pair it with the prime factorization calculator when you want to see the prime factors of a composite number, or with GCF and LCM calculators when working on divisibility and fractions.