Clacify

Prime Number Checker

Check if a number is prime and find its factors

Built & maintained by Pappu Venkata Subbi Reddy, founder of Clacify · Updated July 2026

About Prime Number Checker

Prime Number Checker tells you instantly whether a number is prime, and if it isn't, shows its factors. A prime number is a whole number greater than 1 that's divisible only by 1 and itself. Enter any number to find out if it's prime, see why (its divisors), and learn its prime factorisation when composite. It's handy for students, teachers, programmers, and anyone working with number theory or just curious about a specific number. All computation runs locally in your browser.

Why Use Prime Number Checker?

How It Works

To test primality, the tool checks divisibility by 2 and then by odd numbers up to the square root of the input — if none divide it evenly, the number is prime. This square-root optimisation makes checks fast even for large numbers. For composite numbers, it performs trial division to extract the prime factorisation. All computation runs locally in your browser using JavaScript's number handling.

Quick divisibility rules (to test a number by hand)

Divisible byRuleExample
2Ends in 0, 2, 4, 6 or 8138 → yes
3Sum of digits is divisible by 3138 → 1+3+8=12 → yes
4Last two digits divisible by 4116 → 16 → yes
5Ends in 0 or 5145 → yes
6Passes the tests for both 2 and 3138 → yes
9Sum of digits is divisible by 9234 → 9 → yes
11Alternating digit sum divisible by 112728 → 8−2+7−2=11 → yes

If a number passes none of these (and isn't itself 2, 3, 5, 7…), it may be prime — but you still have to test divisibility by primes up to its square root. That's what the checker does instantly.

What 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 (only 1 and 7 divide it), but 8 is not (1, 2, 4, 8). Two quirks trip people up: 1 is not prime (it has only one divisor), and 2 is the only even prime — every other even number is divisible by 2. Numbers that aren't prime (and above 1) are called composite.

The prime numbers up to 100

There are 25 primes below 100: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97. They thin out as numbers grow but never stop — Euclid proved over 2,000 years ago that there are infinitely many. For any number you enter, this tool also shows its prime factorisation (e.g. 84 = 2² × 3 × 7).

How the check works — and why primes matter

To test a number n, you only need to try dividing by primes up to √n; if none divide evenly, n is prime. That's why checking is fast even for large numbers. Beyond maths class, primes are the backbone of modern security: RSA encryption — used for HTTPS, banking and messaging — relies on the fact that multiplying two huge primes is easy, but factoring the result back apart is practically impossible.

Frequently Asked Questions

How do you check if a number is prime?

To check if n is prime, test divisibility by all prime numbers up to √n. If none divide n evenly, it is prime. Example: Is 97 prime? √97 ≈ 9.8. Check: 97 ÷ 2, 3, 5, 7 — none divide evenly → 97 is prime. Is 91 prime? 91 ÷ 7 = 13 → 91 = 7 × 13, not prime.

What is prime factorisation?

Prime factorisation expresses a number as a product of its prime factors. Every number has a unique prime factorisation (Fundamental Theorem of Arithmetic). Example: 360 = 2³ × 3² × 5. Used to find LCM/HCF, simplify fractions, and in cryptography (RSA encryption is based on the difficulty of factoring large numbers).

Related Math Tools