Free Prime Number Checker

Sudoku puzzle in a newspaper
Photo: HΓ©ctor RodrΓ­guez / Wikimedia Commons, CC BY 2.0

Published: 16 November 2026  Β·  Updated: 16 November 2026

Test any whole number for primality, see its factorization and divisors, and list every prime up to 100,000. It starts with 97, which is prime. Free, no sign-up.

MixKhazana · Quick answer

A prime has exactly two divisors: 1 and itself. Enter any whole number to test it, see what divides it, and find the primes nearest to it β€” then generate the full prime list up to any limit.

Researched by MixKhazana Team · Last updated 16 November 2026 · Data: standard trial-division and sieve methods; Maths is Fun reference pages

Check one number

Whole numbers from 0 to 1,000,000,000,000 (10ΒΉΒ²). Negatives and decimals are not prime.

List primes up to N

Example: 97 is prime: no number from 2 to 9 divides it (√97 β‰ˆ 9.85), so its only divisors are 1 and 97. Its neighbours are 89 and 101. By contrast, 91 = 7 Γ— 13, so 91 is composite β€” a classic trap, because 91 looks prime.
0 and 1 are special. 1 has only one divisor, so it is not prime; 0 is divisible by everything, so it is not prime either. Both are classed as neither prime nor composite.

What is a prime number?

A prime number is a whole number greater than 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 and so on. A whole number greater than 1 that is not prime is composite: it can be written as a product of smaller whole numbers. Every composite number has exactly one prime factorization (the fundamental theorem of arithmetic) β€” 60 is always 2Β² Γ— 3 Γ— 5, in no other way.

How to use this prime number checker

  1. Enter any whole number up to 10ΒΉΒ² to test it: the tool reports prime or composite, with the factorization and divisors for composites.
  2. Use the list box to generate every prime up to any limit to 100,000, using the Sieve of Eratosthenes.
  3. Watch for traps: 91 = 7 Γ— 13, 119 = 7 Γ— 17, and 1 is not prime.

How primality is tested

Trial division: to test n, try dividing by every prime up to √n. If none divides n, n is prime β€” because any divisor larger than √n would pair with a divisor smaller than √n, which would already have been found. Checking only up to the square root is what makes the test fast: testing 97 needs only divisors up to 9.85. Sieve of Eratosthenes: to list primes up to N, write all numbers, cross out multiples of each prime in turn, and what remains is prime.

Worked example

Is 97 prime?

  • √97 β‰ˆ 9.85, so only divisors 2, 3, 5, 7 need testing
  • 97 is odd (not divisible by 2); 9 + 7 = 16, not a multiple of 3; it does not end in 0 or 5; 97 / 7 = 13.857…, not whole
  • No divisor found, so 97 is prime. Its neighbours are 89 and 101.
  • Compare 91: √91 β‰ˆ 9.54, and 91 / 7 = 13 exactly, so 91 = 7 Γ— 13 is composite.

The first 25 primes

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. Note that 2 is the only even prime β€” every other even number is divisible by 2 and therefore composite. There are 25 primes below 100, 168 below 1,000, and 9,592 below 100,000.

Why primes matter

Primes are the atoms of arithmetic: every whole number is built from them uniquely. They also secure the internet β€” RSA encryption, which protects most web traffic, multiplies two huge primes together; the product is public, but recovering the original primes from it is practically impossible. Euclid proved over 2,000 years ago that there are infinitely many primes, and the search for ever-larger ones continues through the Great Internet Mersenne Prime Search (GIMPS).

Frequently asked questions

Is 1 a prime number?

No. A prime must have exactly two divisors, 1 and itself. 1 has only one divisor, itself, so it is classed as neither prime nor composite. This keeps prime factorization unique: if 1 were prime, 6 could be 2 x 3, 1 x 2 x 3, 1 x 1 x 2 x 3, and so on.

Is 2 a prime number?

Yes, and it is the only even prime. Every other even number is divisible by 2, so it has a divisor besides 1 and itself and is composite. 2 is also the smallest prime.

Is 0 a prime number?

No. 0 is divisible by every number, so it has far more than two divisors. Like 1, it is neither prime nor composite.

How do you check if a large number is prime?

Trial division up to the square root: try dividing by primes up to sqrt(n). If none divides n, it is prime. This tool checks numbers up to 10 to the power 12 that way. For far larger numbers, mathematicians use probabilistic tests such as Miller-Rabin.

Are there infinitely many primes?

Yes. Euclid proved it around 300 BC: given any finite list of primes, multiplying them all and adding 1 gives a number that is not divisible by any prime on the list, so a new prime must exist beyond it.

What are twin primes?

Pairs of primes that differ by 2, such as 11 and 13, 17 and 19, or 29 and 31. Whether infinitely many twin primes exist is an unsolved problem in mathematics, though most mathematicians believe there are.

What is the largest known prime?

Record primes are almost always Mersenne primes, of the form 2 to the power p minus 1, found by the GIMPS distributed-computing project. New records appear every few years, each with millions of digits; the current record is published on mersenne.org.

Why is 91 often mistaken for prime?

Because 91 has no small obvious divisor: it is odd, its digits sum to 10 (not a multiple of 3), and it does not end in 5. But 91 = 7 x 13. Any number that survives the easy divisibility tests can still be composite, which is why checking up to the square root matters.

Sources

Disclaimer: a study aid for school and college number theory. Primality results are exact for whole-number inputs within the stated limits.

Related tools

Matrix algebra written in chalk on a green blackboard
πŸ”’

Free GCF and LCM Calculator

Greatest common factor and least common multiple.

Open →
Students studying together with notes and a calculator
βž—

Free Fraction Calculator

Add, subtract, multiply and divide fractions with steps.

Open →
Scientific calculator close-up on a green background
πŸ”¬

Free Scientific Calculator

Trig, logs and powers with degree and radian modes.

Open →
Handwritten linear algebra lecture notes with matrices
πŸ“

Free Ratio Calculator

Simplify ratios, scale them and solve proportions.

Open →

Card photos: Yulia Meshkova / Wikimedia Commons, CC BY 4.0 Β· cottonbro studio / Pexels, Pexels licence Β· Joost J. Bakker / Wikimedia Commons, CC BY 2.0 Β· Vyacheslav Argenberg / Wikimedia Commons, CC BY 4.0

Your next step

Factor numbers further with the Free GCF and LCM Calculator, or test divisibility ideas with the Free Fraction Calculator.

Share: