Prime Number Calculator

Check if a number is prime or find all prime numbers in a range.

Result

—

How to use the Prime Number Calculator

  1. To check one number, enter it in the number box.
  2. To list primes, enter a from and to range.
  3. Click Calculate.
  4. See whether the number is prime or the list of primes in the range.

How primality is checked

n is prime if it has no divisor between 2 and √n

Worked example

Examples

97: not divisible by 2, 3, 5 or 7 (√97 ≈ 9.8), so 97 is prime

91 = 7 × 13, so 91 is not prime

Primes from 1 to 50: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 (15 primes)

Facts about prime numbers

A prime has exactly two factors: 1 and itself. 1 is not prime, and 2 is the only even prime. There are 25 primes below 100 and infinitely many in total, as Euclid proved over 2,000 years ago. Large primes are the basis of RSA encryption that secures online banking and shopping.

Tips for accurate results

  • Any number ending in 0, 2, 4, 5, 6 or 8 (except 2 and 5) is not prime.
  • If the digit sum is divisible by 3, the number is divisible by 3.
  • Checking up to the square root is enough.

Frequently Asked Questions

No. A prime must have exactly two distinct factors.

2.

25.

Related Calculators

Content reviewed by Vinod, Easy Smart Calculator · Last updated October 2026