Skip to content

Math

Instant, private, and free

Prime Number Calculator.

Check if a number is prime, find primes in a range, or get prime factorization

On-device calculationNo signup
01

Set your values

Results update as you type.

About Prime Numbers

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29.

FAQ

What is a prime number?

A prime number is a whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1.

Is 1 a prime number?

No, 1 is not considered a prime number. Prime numbers must have exactly two distinct factors: 1 and itself.

What is the smallest prime number?

The smallest prime number is 2. It's also the only even prime number.

FAQs

What is a prime number?

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

Is 1 a prime number?

No, 1 is not considered a prime number. By definition, primes must have exactly two distinct factors.

What is the fastest way to check if a number is prime?

For small numbers, trial division is efficient. For larger numbers, use algorithms like Miller-Rabin primality test.

How to Use the Prime Number Calculator

Check whether a number is prime and find its prime factorization.

  1. Enter a whole number.
  2. See whether it is prime.
  3. View its prime factors if it is composite.

Prime Concepts

Primality

Prime if divisible only by 1 and itself

Test divisors up to √n.

Example:

Input: 13

Calculation: no divisor ≤ √13

Result: prime

Prime Factorization

n = p₁ Ɨ pā‚‚ Ɨ …

Express n as a product of primes.

Example:

Input: 60

Calculation: 2 Ɨ 2 Ɨ 3 Ɨ 5

Result: 2² Ɨ 3 Ɨ 5

Real-World Use Cases

Cryptography

Primes underpin RSA and other encryption.

Fraction Reduction

Factorization helps simplify fractions.

Tips

Tips

  • 2 is the only even prime.
  • 1 is neither prime nor composite.