Prime Number Checker
Type any whole number to find out if it's prime โ and if it isn't, see exactly how it breaks down into prime factors.
๐ How it works & FAQWhat makes a number prime?
A prime number is a whole number greater than 1 that has exactly two divisors: 1 and itself. So 7 is prime because nothing between 2 and 6 divides it evenly, while 12 is not โ it splits neatly into 2 ร 6 or 3 ร 4. The numbers 0 and 1 are not prime by definition, and no negative number is prime. Every other whole number is either prime or "composite" (made from smaller primes).
How the check works
This tool uses trial division. To test a number n, it tries dividing by 2 and then every odd number up to the square root of n. If nothing divides evenly, n is prime. Checking only up to the square root is enough, because any factor larger than โn must pair with one smaller than โn. If the number is composite, the tool then peels off prime factors one at a time to build the full factorization, shown with exponents like 2^3 ร 5. All arithmetic uses big-integer math, so long numbers stay exact โ no rounding.
How to use it
- Type a whole number into the box (commas and spaces are ignored).
- Press Enter or click Check number.
- Read the verdict: green means prime, red means not prime.
- If it's not prime, the prime factorization appears below, with a count of distinct primes.
- Click Try an example to load a sample number to explore.
FAQ
- Is 1 a prime number?
- No. A prime must have exactly two distinct divisors, and 1 only has one. It's neither prime nor composite.
- How big a number can it handle?
- Small and medium numbers are instant. Very large numbers with only huge prime factors can take longer, so the tool caps its effort and tells you if it can't finish quickly.
- What does the exponent notation mean?
- 2^3 means 2 ร 2 ร 2. It's a compact way to write repeated prime factors, so 360 shows as 2^3 ร 3^2 ร 5.
- Does my number get sent anywhere?
- No. Everything runs in your browser โ nothing is uploaded or stored.