Math Tools

Prime Number Checker & Factorisation

Check whether a number is prime, see its full prime factorisation and factor count, and find nearby primes.

Advertisement
Prime Number Checker & Factorisation
Check if a number is prime and find its prime factors
Prime Check
โ€”

Disclaimer. This calculator is provided for educational and general-purpose use. Verify critical or high-stakes calculations independently before relying on them. Read full disclaimer →

About Prime Number Checker

A prime number is divisible only by 1 and itself. To check if n is prime, test divisibility by all integers up to the square root of n - if none divide evenly, n is prime. This is efficient because if n has a factor larger than its square root, the complementary factor must be smaller than the square root.

Prime numbers are the building blocks of all integers - every integer greater than 1 is a unique product of primes (Fundamental Theorem of Arithmetic). Primes are essential in cryptography: RSA encryption relies on the computational difficulty of factoring the product of two very large prime numbers. There are infinitely many primes, as proved by Euclid around 300 BCE. The largest known prime numbers now contain over 40 million digits.

Frequently Asked Questions

It tests whether any integer from 2 up to the square root of n divides n evenly. This is enough to prove primality because if n had a factor larger than its square root, it would necessarily have a matching factor smaller than the square root too โ€” so checking up to the square root covers every possible factor pair. For example, 17 is confirmed prime because no integer from 2 to 4 (โŒŠโˆš17โŒ‹) divides it.
The tool repeatedly divides the number by the smallest possible divisor starting at 2, moving to the next divisor each time none divides evenly, until only 1 remains. For 60, that gives 2 ร— 2 ร— 3 ร— 5, written as 2ยฒ ร— 3 ร— 5.
From the prime factorisation's exponents, the total divisor count is the product of each exponent plus one. For 60 = 2ยฒ ร— 3ยน ร— 5ยน, that's (2+1)ร—(1+1)ร—(1+1) = 12 โ€” and indeed 60 has exactly 12 divisors: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60.
Every integer greater than 1 is a unique product of primes (the Fundamental Theorem of Arithmetic), which makes primes the basic building blocks of number theory. They're also essential to modern cryptography โ€” RSA encryption relies on how computationally difficult it is to factor the product of two very large prime numbers, protecting everything from banking to secure messaging.
Advertisement