GintiCalcEvery calculation

PrimeLab

Prime Number Check

Is it prime? See the answer and the factorisation.

Prime or composite, with factors

A prime has exactly two divisors, 1 and itself. Composite numbers are shown with their prime factors.

NumberPrime?Prime factors
2Prime2
17Prime17
21Composite3 x 7
29Prime29
91Composite7 x 13
97Prime97
100Composite2 x 2 x 5 x 5
101Prime101

91 is the row worth remembering: it looks prime, it is odd, it is not divisible by 3 or 5, and people routinely guess wrong - but 7 times 13 gives 91. That is why trial division has to continue up to the square root rather than stopping at the small primes. 2 is the only even prime, which makes it the exception in almost every proof about primes. Checking primality only requires testing divisors up to the square root, since any factor above it must pair with one below.

Only divisible by 1 and itself

A prime number has exactly two divisors — checking primality means testing whether any number up to its square root divides it evenly; if none do, it's prime.

Why primes matter

Prime numbers are the 'atoms' of arithmetic — every integer greater than 1 breaks down into a unique product of primes, a fact that underlies modern encryption used to secure online transactions.

Frequently asked questions

How do I check if a number is prime?

Test divisibility by every integer from 2 up to √n. If none divide evenly, it's prime. For 97: √97 ≈ 9.85, so test 2, 3, 5, 7. None divide 97 evenly, so 97 is prime. You only need to test primes up to √n.

Is 1 a prime number?

No. By definition, a prime has exactly two distinct divisors: 1 and itself. The number 1 has only one divisor (itself), so it's neither prime nor composite. This convention keeps the fundamental theorem of arithmetic (unique factorization) clean.

What are the first 20 prime numbers?

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71. Note that 2 is the only even prime — every other even number is divisible by 2.

Related Math calculators

You might also like

Last updated: September 6, 2026