Prime Number Calculator

Enter a number to check whether it's prime, see all its factors, or generate a list of prime numbers up to a limit you choose.

Prime Number Calculator

Check primality, factors and prime lists

A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. The calculator tests divisibility up to the square root of the number.

Advertisement

What Makes a Number Prime?

A prime number is a whole number greater than 1 whose only factors are 1 and itself. The first few primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

**How the check works**: To test whether n is prime, the calculator tries dividing n by every whole number from 2 up to โˆšn. If any division comes out even, n is composite. If none do, n is prime. This works because if n had a factor larger than โˆšn, its matching factor would be smaller than โˆšn.

**Prime factorization**: Every whole number greater than 1 can be written uniquely as a product of primes (the Fundamental Theorem of Arithmetic).

  • Prime = only factors are 1 and itself
  • 2 is the only even prime
  • Test divisors up to โˆšn
  • Unique prime factorization

Worked Example

Example: Is 29 prime?

- โˆš29 โ‰ˆ 5.39, so test divisors 2, 3, 4, 5 - 29 รท 2 = 14.5 (not even) - 29 รท 3 = 9.67 (not even) - 29 รท 4 = 7.25 (not even) - 29 รท 5 = 5.8 (not even) - No divisors found โ†’ 29 is prime

Example: Is 36 prime? - 36 รท 2 = 18 (even) โ†’ composite - Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36 - Prime factorization: 2 ร— 2 ร— 3 ร— 3 = 2ยฒ ร— 3ยฒ

Frequently Asked Questions

Is 1 prime?

No. By definition, a prime number must be greater than 1. 1 is neither prime nor composite.

What's the largest prime?

There is no largest prime โ€” primes go on forever (proved by Euclid). This calculator handles numbers up to about 100 billion accurately.

Looking for a different calculator?

CalculatorPlus has free tools across finance, construction, math, health and more โ€” each one showing the formula and a worked example.