Prime Number Checker — Check Prime or Composite Free

optimisation du moteur de recherche
  1. Home
  2. Math Tools
  3. Prime Number Checker
Share: Report

Prime Number Checker

100% free · Runs 100% in your browser · Prime or composite verdict + factorisation · No signup needed

Verdict—
Prime factorisation—
Nearest prime—
Smallest divisor—
Very large numbers are slow to factor in the browser, so numbers above 10^12 (1,000,000,000,000) get a prime/composite verdict only, with no full factor list. Results stay in your browser — nothing is sent to a server.

A prime number has exactly two divisors: 1 and itself. 2 is the only even prime; 1 is neither prime nor composite.

Try an example: 91 = 7 × 13, so it is composite

Known results

NumberVerdictFactorisation
17Prime17
18Composite2 × 3 × 3
91Composite7 × 13
97Prime97

Sur Prime Number Checker

Is 17 prime? Is 91 prime? With the free Prime Number Checker from FistHost, you get the answer in a second. Type any whole number, and the tool tells you instantly whether it is prime or composite. If it is composite, you also get the full factorisation, so you can see exactly which numbers multiply together to make it. There is nothing to install, no account to create, and no waiting — everything runs in your browser, so your numbers never leave your device.

Prime numbers sit at the heart of mathematics. They are the building blocks of all whole numbers, the foundation of modern encryption, and a favourite topic in school maths, coding interviews, and puzzle hunts. Yet checking primality by hand is slow and error-prone, especially once numbers grow past two digits. This checker does the tedious work for you, and it shows its working, so you learn something instead of just getting a yes or no.

What Is a Prime Number?

A prime number is a whole number greater than 1 that has exactly two divisors: 1 and itself. That simple definition is the whole test. The number 17 is prime because the only numbers that divide it evenly are 1 and 17. The number 18 is not prime, because 2, 3, 6, and 9 all divide it as well. A number that is greater than 1 and is not prime is called composite, which means it can be built by multiplying smaller whole numbers together.

Two special cases trip people up. The number 1 is not prime, because it has only one divisor — itself — and the definition demands exactly two. The number 2 is prime, and it is the only even prime, because every other even number is divisible by 2 as well as by 1 and itself, which gives it more than two divisors. Remember those two facts and you will already avoid the two most common mistakes in prime checking.

Some primes worth knowing are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, and 37. Two primes from the list deserve a closer look: 17 is prime, and 97 is prime too, even though 97 looks suspiciously divisible at first glance. Both survive the divisibility test, and both appear in the worked examples below.

How to Use the Prime Number Checker

Using the tool is simple. Type a whole number into the input box and the verdict appears straight away: prime or composite. If the number is composite, the factorisation is shown underneath, for example 18 as 2 x 3 x 3. You can also see the nearest prime to your number, which is handy when a puzzle or a piece of code needs a prime close to a chosen value.

Try a few numbers to build your instinct. Test 17, then 18, then 91, then 97, and watch how the verdict and the factorisation change. Small numbers answer instantly, and the tool stays quick well into the range most people ever need. There is no limit on how many numbers you can check, so work through a whole homework list in one visit.

Worked Examples

These are the worked checks the tool is built around. Run each one yourself and compare the result with the table.

NumberVerdictWhy
17PrimeOnly divisors are 1 and 17
18Composite18 = 2 x 3 x 3
91Composite91 = 7 x 13
97PrimeOnly divisors are 1 and 97
2PrimeThe only even prime
1NeitherOnly one divisor, so not prime

The number 91 is the classic trap. It looks prime, and many people guess prime, but 91 equals 7 times 13, so it is composite. The number 18 is the opposite kind of lesson: it factorises as 2 x 3 x 3, which shows that a factor can appear more than once. The number 97 is a good test of patience by hand, because you would need to try dividing it by every prime up to 9 before you could be sure — the checker does that work in a blink.

How Primality Checking Works

Behind the simple verdict is a method called trial division. To test a number, the tool tries dividing it by 2, then 3, then 5, and so on through the prime numbers, stopping once the trial divisor squared is larger than the number being tested. If no divisor fits evenly, the number is prime. If one does, the number is composite, and the tool keeps dividing to build the full factorisation.

That stopping rule is what makes the check fast. To test 97, you only need to try divisors up to 9, because 11 squared is already larger than 97. To test a number near a million, you only need to try divisors up to 1,000. Even so, factorisation gets slower as numbers grow, because the number of trial divisions grows with the square root of the number. That is the honest limit of the method, and the tool states it openly.

An Honest Note on Very Large Numbers

Very large numbers are slow to factor in the browser, so the tool caps the range it factors and says so on the page. That cap is a deliberate design choice, not a bug. A browser tab is not a supercomputer, and pretending otherwise would mean long freezes and misleading waits. Inside the capped range the tool is exact, and every verdict it gives is certain, not an estimate. If you need to test a number beyond the cap, a specialist computer algebra tool is the right next step.

Why Prime Numbers Matter

Primes are far more than a classroom exercise. Modern internet security depends on them: the encryption that protects your passwords and bank details works by multiplying two very large primes together, because multiplying is easy while working backwards to the original factors is enormously hard. That asymmetry — easy one way, hard the other — is the whole foundation of public-key cryptography.

Primes also appear in nature and in puzzles. The cicada species that emerge every 13 or 17 years use prime-numbered cycles, which makes it harder for predators to sync with them. In computing, prime numbers size hash tables, generate random numbers, and appear in coding challenges and interviews, where checking primality is one of the most common warm-up problems. Knowing your primes is genuinely useful, not just exam revision.

Common Mistakes to Avoid

The most common mistake is calling 1 a prime number. It is not, because it has only one divisor. The second is forgetting that 2 is prime — it is, and it is the only even prime. The third is trusting a pattern: numbers ending in 1, 3, 7, or 9 are often prime, but 21 ends in 1 and is 3 times 7, 27 ends in 7 and is 3 times 9, and 91 ends in 1 and is 7 times 13. Endings can hint, but only a divisibility test can decide.

Another mistake is stopping the test too early. Testing 91 by 2, 3, and 5 finds nothing, and a careless checker might declare it prime at that point — but 7 divides it. Always test every prime divisor up to the square root of the number. That is exactly what this checker does for you, so use it to double-check your hand calculations and to learn where your own tests went wrong.

More Maths Tools on FistHost

If you are working with numbers, you will find more help on FistHost. The GCD and LCM Calculator finds the greatest common divisor and lowest common multiple of two numbers, which pairs naturally with factorisation. The Fraction Calculator adds, subtracts, multiplies, and divides fractions, and the Scientific Calculator covers powers, roots, and trigonometry alongside a quick primality check of its own. Together with this dedicated checker, they cover most of the number work you meet in school, study, and coding practice.

Frequently Asked Questions

Is 1 a prime number? No. A prime must have exactly two divisors, and 1 has only one divisor, itself. So 1 is neither prime nor composite.

Is 2 a prime number? Yes. Two is prime, and it is the only even prime, because every other even number is divisible by 2 as well as by 1 and itself.

Is 91 a prime number? No. 91 is composite because 91 equals 7 times 13. It is one of the most famous traps in prime checking, because it looks prime at a glance.

Is 97 a prime number? Yes. 97 is prime. Its only divisors are 1 and 97, and no smaller prime divides it evenly.

What is the factorisation of 18? 18 equals 2 times 3 times 3. The checker shows the full factorisation for every composite number it tests.

Can I check very large numbers? Very large numbers are slow to factor in the browser, so the tool caps the range it factors and says so on the page. Inside that range every verdict is exact.

Whether you are revising for an exam, solving a coding challenge, checking a puzzle answer, or just settling an argument about 91, this checker gives you a certain verdict, the factorisation to prove it, and the nearest prime for good measure.

Enjoying free tools like this one? FistHost shared hosting starts at just $0.99/month, with a free domain included when you choose an annual plan — everything you need to put your own website, blog, or online project live without a big budget.

From domains and hosting to the free tools on this site, FistHost keeps things simple, fast, and affordable, with shared hosting from $0.99/month and a free domain on annual plans. Start your next project today and see how far a small budget can go.

User Reviews

No reviews yet. Be the first to review this tool!

Write a Review

★★★★★

Captcha

Reviews are protected by captcha and moderated before they appear.


WordPress

WordPress Hosting Made Easy

One-click installs on fast,
secure servers

Launch WordPress
Speed Small Price, Serious Speed Fast SSD hosting from $0.99/mo · Free domain included See Plans