Prime Number Checker
Instant Prime Test ⚡

Enter any positive integer to instantly check if it is prime, find all its factors, and see every factor pair.

Quick Examples

What is a Prime Number?

A prime number is a positive integer greater than 1 that has exactly two distinct divisors: 1 and itself. The number 7 is prime because it can only be divided evenly by 1 and 7. The number 8 is not prime because it can be divided by 1, 2, 4, and 8.

The first ten prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. There are infinitely many prime numbers — they never run out, though they become increasingly rare as numbers get larger.

How to Check if a Number is Prime

To test whether a number n is prime, check whether any integer from 2 up to √n divides n exactly. If none do, the number is prime. You only need to check up to √n because if n has a factor larger than √n, it must also have a corresponding factor smaller than √n.

For example, to test whether 37 is prime: √37 ≈ 6.08, so check 2, 3, 4, 5, 6. None divide 37 evenly, so 37 is prime.

Prime vs Composite Numbers

Every positive integer greater than 1 is either prime or composite. A composite number has at least one factor other than 1 and itself. The number 1 is a special case — it is neither prime nor composite by mathematical convention, because it has only one divisor (itself).

Every composite number can be expressed as a unique product of prime numbers — this is called the Fundamental Theorem of Arithmetic. For example, 60 = 2 × 2 × 3 × 5. Use the Prime Factorisation Calculator to break any number into its prime factors.

Related Calculators

Frequently Asked Questions

Is 1 a prime number?
No. By mathematical convention, 1 is neither prime nor composite. A prime number must have exactly two distinct divisors, but 1 has only one (itself). This is why prime factorisation starts at 2.

Is 2 a prime number?
Yes — 2 is prime, and it is the only even prime number. All other even numbers are divisible by 2, giving them at least three divisors, so they cannot be prime.

Why are primes important?
Prime numbers are the building blocks of all integers. They are fundamental to number theory and underpin modern cryptography — RSA encryption, used to secure online banking and websites, relies on the difficulty of factoring large numbers back into their prime components.

What are factor pairs?
Factor pairs are pairs of numbers that multiply together to give the original number. For 12, the factor pairs are (1,12), (2,6), and (3,4). A prime number has only one factor pair: (1, itself).

What is the largest known prime?
As of 2024, the largest known prime is a Mersenne prime with over 41 million digits, discovered through the Great Internet Mersenne Prime Search (GIMPS). Finding large primes is an ongoing area of mathematics and computer science.

All Number Theory Calculators

Prime Checker Prime Factorisation GCD / HCF LCM LCM & HCF Fibonacci Modulo Base Converter