Free online calculator

Prime Number Checker

A prime number has exactly two factors: 1 and itself. 97 is prime; 91 is not, because 91 = 7 × 13. Enter any whole number up to one trillion to see whether it is prime and list all of its factors.

Result
97 is a prime number

Factor pairs: 1 × 97. Every divisor pairs with one on the other side of the square root.

Positive factors
1, 97

A prime number greater than 1 has exactly two positive factors: 1 and itself.

Prime or composite, with a checkable reason

  • A prime is an integer greater than 1 with exactly two positive factors. One is neither prime nor composite.
  • Check integers from 1 to 1,000,000,000,000; composite results include a divisor proof and factor pairs.

How to use the Prime Number Checker

  1. Enter a whole number between 1 and 1,000,000,000,000.
  2. The calculator tests possible divisors from 1 through the integer square root of the value.
  3. When a divisor is found, its matching factor pair is added.
  4. The two halves of the factor list are combined in ascending order.
  5. A number greater than 1 is prime when it has exactly two positive factors: 1 and itself.
  6. A number greater than 1 with additional factors is composite.
  7. The number 1 is classified separately as neither prime nor composite.

Input domain and practical limits

A prime is a positive integer greater than 1 with exactly two positive divisors. Zero, negatives and decimals are outside this checker’s input domain. Large inputs can take longer; this is not a cryptographic primality service.

Examples

A composite witness

91 = 7 × 13. Its factors are 1, 7, 13 and 91, so it is composite.

A prime

97 has only 1 and 97 as positive factors, so it is prime.

Prime numbers from 1 to 100

RangePrimesCount
1–102, 3, 5, 74
11–2011, 13, 17, 194
21–3023, 292
31–4031, 372
41–5041, 43, 473
51–6053, 592
61–7061, 672
71–8071, 73, 793
81–9083, 892
91–100971

Total: 25 primes below 100.

Numbers that look prime but are not

These odd numbers are often mistaken for primes. Each has a factor other than 1 and itself.

NumberPrime factors
513 × 17
573 × 19
873 × 29
917 × 13
1197 × 17
1337 × 19
14311 × 13
1617 × 23
16913 × 13
18711 × 17
20911 × 19
22113 × 17

Frequently asked questions

How do I know if a number is prime?

Divide it by every prime up to its square root. If none of them divides evenly, the number is prime. The checker does this instantly and also lists every factor.

Is 1 a prime number?

No. A prime must have exactly two different factors, and 1 has only one. Mathematicians classify 1 as neither prime nor composite.

Is 2 a prime number?

Yes. 2 is the smallest prime and the only even prime, because every other even number is divisible by 2.

How many prime numbers are there below 100?

There are 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, 97.

Is 51 a prime number?

No. 51 = 3 × 17. A quick test: if the digits add up to a multiple of 3 (5 + 1 = 6), the number is divisible by 3.

Is 91 a prime number?

No. 91 = 7 × 13. It is one of the most common numbers mistaken for a prime.

Why only test divisors up to the square root?

If a number has a factor larger than its square root, it must also have a matching factor smaller than the square root. So if nothing up to the square root divides it, nothing above does either.

What is the largest number I can check?

The checker handles whole numbers up to 1,000,000,000,000 (one trillion) and lists all of their positive factors.

Why is 1 neither prime nor composite?

It has only one positive divisor. A prime needs exactly two, and a composite is a positive integer greater than 1 with additional divisors.

Related tools

More math tools