CalcWisp

Prime Number Checker

Enter a whole number to find out whether it is prime, with its factorization and the previous and next prime.

Free, no sign-upRuns in your browserHow we calculate

1 to 1,000,000,000,000

97 is a prime number
Prime
Position among primes
#25
Previous prime
89
Next prime
101
How this was calculated
  1. √97 ≈ 9.849, so only divisors up to 9 need checking.
  2. 97 is not divisible by 2, 3 or any 6k ± 1 number up to 9.
  3. No divisor found, so 97 is prime.

Prime Number Checker · free on CalcWisp

How the prime number checker works

A prime number is a whole number greater than 1 whose only divisors are 1 and itself. To check whether a number n is prime, you only need to test divisors up to √n: if n had a factor pair a × b with both numbers above √n, their product would be larger than n. This prime number checker runs that test instantly, and for composite numbers it names the smallest factor and the full prime factorization.

Worked examples

Is 97 prime? √97 ≈ 9.8, so test 2, 3, 5 and 7: none divides 97, so it is prime, the 25th prime. Is 91 prime? It looks it, but 91 = 7 × 13, so it is composite. Is 221 prime? 221 = 13 × 17, again composite. Numbers like 91, 119 and 221 are the classic traps because they are not divisible by 2, 3 or 5.

Facts worth knowing

  • 2 is the only even prime; every other even number is divisible by 2.
  • 1 is neither prime nor composite, because it has just one divisor.
  • There are 25 primes below 100, 168 below 1,000 and 1,229 below 10,000.
  • Digit tricks help: a number whose digits add up to a multiple of 3 is divisible by 3, and a number ending in 0 or 5 is divisible by 5.

Limits and related tools

The checker accepts whole numbers from 1 to 1,000,000,000,000 and is exact for all of them. For the complete list of divisors of a number, use the factor calculator; to find the greatest common divisor or least common multiple of two numbers, see the GCF calculator and the LCM calculator. Primes matter in practice for cryptography, hashing and the reduction of fractions, though real encryption uses primes hundreds of digits long that this page does not test.

Frequently asked questions

What is a prime number?

A whole number greater than 1 whose only positive divisors are 1 and itself, such as 2, 3, 5, 7, 11 and 13.

Is 1 a prime number?

No. 1 has only one positive divisor, so it is neither prime nor composite.

Is 91 a prime number?

No. 91 = 7 × 13, so it is composite. It is a common trap because it is not divisible by 2, 3 or 5.

Is 2 the only even prime?

Yes. Every other even number is divisible by 2, so it has a divisor besides 1 and itself.

How many primes are there below 100?

25: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97.

Related tools