Prime Number Checker: Is It Prime? Check Any Number | Calcrio
Home › Calculators › Prime Number Checker
Free • Browser-Based • No Sign-In

Prime Number Checker — Is It Prime? Check Any Number

Is 91 prime? Most people say yes — but 91 = 7 × 13, so it is not. This free prime number checker tests any number and shows every divisor it tried, lists all the primes in a range, and finds the next or previous prime. The honest surprise: 97 is prime, and it is the 25th prime — the largest prime under 100.

Method: trial division — test prime divisors up to √n. If none divides n, n is prime. For 97, √97 ≈ 9.85, so only 2, 3, 5 and 7 are tested. Results depend only on the value you enter.
Math Tool

Prime Number Checker: Check a Number, List Primes, Find the Next Prime

Pick the mode that matches your question. Calculations run in your browser.

A whole number from 0 to 1,000,000,000,000 — e.g. 91.
Tap a preset to load an example.
e.g. 1.
e.g. 100 — at most 1,000,000.
Tap a preset to load an example.
A whole number from 0 to 1,000,000,000,000 — e.g. 97.
Tap a preset to load an example.
—
—
—
—
—
—
—
—
—
—
—
—
Enter a value and press Calculate.
AI Citation Quick Answer

What Is a Prime Number Checker?

Quick Answer: A prime number has exactly two divisors: 1 and itself. 91 is not prime — 91 = 7 × 13. 97 is prime: no prime up to √97 ≈ 9.85 divides it. There are 25 primes from 1 to 100; the 25th prime is 97. Test any number above, list primes in a range, or find the next prime.

A prime number checker answers one question about any whole number: is it prime, or does it have a factor hiding inside it? Give it 91 and it finds 7 — 91 = 7 × 13, so 91 is not prime. Give it 97 and it tests 2, 3, 5 and 7 — the primes up to √97 ≈ 9.85 — finds no divisor, and calls 97 prime. Give it 1 and it says neither prime nor composite, because 1 has only one divisor. Give it a range like 1 to 100 and it lists all 25 primes, ending at 97. Give it 97 in next-and-previous mode and it returns 89 below and 101 above. Every answer shows the divisors tested and the step-by-step working, so you can check it by hand.

How to Use the Prime Number Checker

The tool has three modes so you can start with whatever your question is.

Check a NumberEnter any whole number — e.g. 91 → NOT prime, 91 = 7 × 13; 97 → prime.
List Primes in a RangeEnter a start and an end — e.g. 1 to 100 → 25 primes; 90 to 100 → 97 only.
Next & Previous PrimeEnter a number — e.g. 97 → previous 89, next 101; 100 → previous 97, next 101.
  1. Choose a mode that matches your question (or tap a preset to load a worked example).
  2. Enter your number — a whole number from 0 to 1,000,000,000,000 for checking, or a range up to 1,000,000 for listing.
  3. Select Calculate to generate the result cards.
  4. Read the note under the cards for the step-by-step working and a check you can verify by hand.

The built-in check re-derives the answer a second way — the factor multiplied back out (7 × 13 = 91), the divisor count (a prime has exactly two), or the sieve count for a range — so a wrong keystroke shows up immediately. Only whole numbers are accepted: primes are defined for whole numbers, so decimals and fractions have no verdict here.

What Is a Prime Number?

A prime number is a whole number greater than 1 that has exactly two divisors: 1 and itself. 2 is prime (divisors 1 and 2), 3 is prime (1 and 3), 5 is prime (1 and 5), 7 is prime (1 and 7). A whole number greater than 1 that is not prime is composite — it has a third divisor hiding inside it. 4 is composite (divisors 1, 2 and 4), 6 is composite (1, 2, 3 and 6), 9 is composite (1, 3 and 9), 91 is composite (1, 7, 13 and 91).

Prime: exactly 2 divisors (1 and itself)   |   Composite: 3 or more divisors   |   1 and 0: neither
Trial division: test prime divisors d while d ≤ √n   |   No divisor found → prime
NumberDivisorsHow many?Verdict
0Divisible by every whole numberInfinitely manyNeither prime nor composite
111Neither prime nor composite
21, 22Prime — smallest prime, only even prime
31, 32Prime
41, 2, 43Composite — 4 = 2 × 2
61, 2, 3, 64Composite — 6 = 2 × 3
91, 3, 93Composite — 9 = 3 × 3
911, 7, 13, 914Composite — 91 = 7 × 13
971, 972Prime — 25th prime
1001, 2, 4, 5, 10, 20, 25, 50, 1009Composite — 100 = 2² × 5²
Key idea: 1 is the number that breaks the pattern. It has only one divisor — itself — so it fails the "exactly two divisors" test, and it is not composite either, because composite means having a factor other than 1 and itself. 0 is in the same boat: it is divisible by every whole number, so it has infinitely many divisors. Prime and composite are labels for whole numbers from 2 upward; 0 and 1 sit outside both.

Why 2 Is the Only Even Prime

Every even number is divisible by 2, so every even number above 2 has at least three divisors — 1, 2 and itself — and is composite. 2 escapes only because its "itself" is 2: its divisors are 1 and 2, exactly two. That makes 2 the smallest prime and the only even prime, and it is why trial division always tests 2 first and then only odd numbers: once 2 is ruled out, every even divisor is ruled out with it.

Twin Primes and Prime Gaps

Primes that differ by 2 are called twin primes — (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61) and (71, 73) are the 8 pairs up to 100. Between primes there are gaps — stretches with no prime at all. The gap from 89 to 97 is 8 (90, 91, 92, 93, 94, 95 and 96 are all composite), and the gap from 113 to 127 is 14. Gaps grow as numbers get bigger, which is why the 100th prime is all the way out at 541 even though the 25th prime is only 97.

Prime Number Checker Worked Examples

Every row below is computed exactly — hand-verified in Python — so you can check each one by hand.

Number√n (2 dp)Prime divisors testedFirst factor foundVerdict
00.00— (special case)—Neither prime nor composite
11.00— (special case)—Neither prime nor composite
21.41None needed (2 is the first prime)—Prime — smallest prime, only even prime
497.002, 3, 5, 77 (49 = 7 × 7)Not prime
919.542, 3, 5, 77 (91 = 7 × 13)Not prime
979.852, 3, 5, 7NonePrime — 25th prime
10010.0022 (100 = 2² × 5²)Not prime
10110.052, 3, 5, 7NonePrime — next prime after 97
11110.542, 33 (111 = 3 × 37)Not prime
12111.002, 3, 5, 7, 1111 (121 = 11 × 11)Not prime
14311.962, 3, 5, 7, 1111 (143 = 11 × 13)Not prime
54123.262, 3, 5, 7, 11, 13, 17, 19, 23NonePrime — 100th prime

Prime Numbers From 1 to 100

There are 25 primes from 1 to 100. The list below is complete — count them, and the last one is 97, the largest prime under 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, 97
RangePrimes in the rangeCount
1–102, 3, 5, 74
11–2011, 13, 17, 194
21–3023, 292
31–4031, 372
41–5041, 43, 473
51–6053, 592
61–7061, 672
71–8071, 73, 793
81–9083, 892
91–100971
Total 1–100All 25 primes above25
Key idea: primes thin out as numbers grow. The first ten numbers hold 4 primes; the last ten hold just 1. From 1 to 1,000 there are 168 primes, and the 100th prime is 541 — more than five times as far out as the 25th prime, 97. That thinning is why guessing "prime" gets worse the bigger the number: most large numbers you meet are composite.

The Nth Prime: 25th Is 97, 100th Is 541

Count the primes in order and 97 is the 25th — which is the same fact as "there are 25 primes from 1 to 100", because 97 is the last of them. Keep counting and the 50th prime is 229, and the 100th prime is 541. The gaps between them tell the story: 25 primes fit in the first 100 numbers, but the next 75 primes need 441 more numbers to reach 541.

How to Check If a Number Is Prime, Step by Step

Follow this recipe for the classic example — is 97 prime?

√97 ≈ 9.85 → test prime divisors 2, 3, 5, 7 → none divides 97 → 97 is prime
  1. Find the square root: √97 ≈ 9.85. You only need to test divisors up to the square root — if 97 had a factor bigger than 9.85, its partner factor would be smaller than 9.85, and you would already have found it.
  2. List the primes up to the square root: 2, 3, 5 and 7. (9 is not prime, so it is never tested.)
  3. Test 2: 97 is odd, so 2 does not divide it. 97 ÷ 2 = 48.5.
  4. Test 3: the digits sum to 9 + 7 = 16, which is not divisible by 3, so 3 does not divide it. 97 ÷ 3 = 32.33.
  5. Test 5: 97 does not end in 0 or 5, so 5 does not divide it. 97 ÷ 5 = 19.4.
  6. Test 7: 7 × 13 = 91 and 7 × 14 = 98, so 97 sits between two multiples of 7 — 7 does not divide it. 97 ÷ 7 = 13.86.
  7. Conclude: no prime up to √97 divides 97, so 97 has exactly two divisors — 1 and 97 — and is prime.
The shortcut habit: whenever a number ends in an even digit or 5, it is composite in one glance (divisible by 2 or 5). Whenever its digits sum to a multiple of 3, it is divisible by 3 — that is how 111 gives itself away (1 + 1 + 1 = 3). The numbers that survive those three instant tests — like 91, 97, 111 and 143 — are the ones worth testing properly, and 91 is the one that catches almost everyone: it passes the 2, 3 and 5 tests and only falls to 7.

Common Mistakes With Prime Numbers

1. Calling 91 prime — the 7 × 13 trap

91 looks prime: it is odd, it does not end in 5, and its digits sum to 10, so 3 does not divide it. But 91 = 7 × 13, and 7 is inside the square-root limit (√91 ≈ 9.54), so trial division catches it on the fourth test. The trap is stopping after 2, 3 and 5 — the tests that 91 passes — and never trying 7.

2. Calling 1 prime

1 has exactly one divisor — itself — so it fails the "exactly two divisors" test. It is neither prime nor composite, and the same goes for 0. Textbooks used to call 1 prime, which is why the mistake survives; the modern definition excludes it so that every whole number has exactly one prime factorization.

3. Calling 2 composite — or saying no even number is prime

2 is prime: its divisors are 1 and 2, exactly two. It is the only even prime, because every other even number is divisible by 2 as well as by 1 and itself. "Prime numbers are odd" is wrong by exactly one number — and that one number is the most important prime of all.

4. Calling every odd number prime

Odd does not mean prime. 9 = 3 × 3, 15 = 3 × 5, 21 = 3 × 7, 27 = 3 × 9, 49 = 7 × 7, 111 = 3 × 37 and 143 = 11 × 13 are all odd and all composite. Oddness only rules out 2 as a factor; the other primes still have to be tested.

5. Testing every number up to n − 1

To check 97 you do not need 95 divisions — you need 4. Trial division stops at √n, because any factor bigger than √n comes with a partner smaller than √n that you would already have found. Testing 11, 13 or 17 for 97 is wasted work: √97 ≈ 9.85, so 7 is the last test that matters.

6. Stopping at the first factor that fails — or trusting a single test

One failed test proves nothing: 91 passes the tests for 2, 3 and 5 and still fails on 7. A number is prime only when every prime up to its square root has been tested and none divides it. The verdict comes from the full list, not from the first division.

Benefits and Limitations

Three modes in one placeCheck a number, list primes in a range, or find the next and previous prime — start from whatever the question gives you.
Every divisor shownEach check lists the primes tested up to √n and the factor found, so the verdict can be verified by hand.
Two-route checkThe factor multiplied back out, the divisor count, and the sieve count cross-check every answer.

Benefits

  • Tests any whole number up to 1,000,000,000,000 and shows the trial-division working, not just a yes/no.
  • Lists every prime in a range up to 1,000,000, with the count, the first and the last prime.
  • Finds the next and previous prime for any number, with the gap in each direction.
  • Presets load the landmark examples — 91 = 7 × 13, 97 prime, 111 = 3 × 37, 143 = 11 × 13, and the special cases 2, 1, 0 and 100 — with one tap.
  • Every answer carries the step-by-step working, so the method — not just the verdict — is visible.
  • Responsive on phones, tablets and desktops.

Limitations

  • Only whole numbers from 0 to 1,000,000,000,000 can be checked; decimals, fractions and negative numbers have no prime verdict.
  • Listing primes is capped at an end value of 1,000,000 and a displayed list of 200 primes, so very large ranges show the count, not every prime.
  • Results use JavaScript number arithmetic, so inputs above the stated cap are rejected rather than approximated.
AI Search & Featured Snippet Section

Quick Definitions

QuestionDirect Answer
What is a prime number checker?A tool that tests whether a whole number is prime. 91 → not prime (91 = 7 × 13); 97 → prime; 1 → neither prime nor composite; primes 1–100 → 25 primes.
What is a prime number?A whole number greater than 1 with exactly two divisors: 1 and itself. 2, 3, 5, 7, 11, 13, 17, 19 are the primes under 20.
Is 91 prime?No — 91 = 7 × 13. Trial division tests 2, 3, 5 and 7 (up to √91 ≈ 9.54), and 7 divides 91 exactly: 91 ÷ 7 = 13.
Is 97 prime?Yes — no prime up to √97 ≈ 9.85 (2, 3, 5, 7) divides it. 97 is the 25th prime and the largest prime under 100.
Is 1 a prime number?No — 1 is neither prime nor composite. A prime needs exactly two divisors, but 1 has only one divisor: itself. 0 is neither prime nor composite either.
How many primes are there from 1 to 100?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.
What is the 100th prime number?541. The 25th prime is 97 and the 50th prime is 229; primes thin out as numbers grow, so the 100th prime is all the way out at 541.
What is the next prime after 97?101 — and the previous prime before 97 is 89. The gap from 89 to 97 is 8, the longest gap under 100.
FAQ

Frequently Asked Questions

Is 91 prime?

No — 91 = 7 × 13. Trial division tests the primes up to √91 ≈ 9.54 — 2, 3, 5 and 7 — and 7 divides 91 exactly: 91 ÷ 7 = 13. 91 passes the tests for 2, 3 and 5, which is why it fools almost everyone; it only falls to 7. The full working is in Is 91 Prime? Why 91 = 7 × 13 Fools Almost Everyone.

Is 1 a prime number?

No — 1 is neither prime nor composite. A prime number has exactly two divisors, 1 and itself, but 1 has only one divisor: itself. 0 is neither prime nor composite either — it is divisible by every whole number. The full explanation is in Is 1 a Prime Number? Why 1 Is Neither Prime nor Composite.

Is 97 prime?

Yes. √97 ≈ 9.85, so only the primes 2, 3, 5 and 7 need testing, and none of them divides 97. 97 is the 25th prime and the largest prime under 100; the next prime after it is 101 and the previous prime before it is 89.

How do you check if a number is prime?

Use trial division: test prime divisors up to the square root of the number. For 97, √97 ≈ 9.85, so test 2, 3, 5 and 7 only — four divisions, not 95. If none divides the number, it is prime; the first divisor that divides it is a factor, and the number is composite.

What is the 25th prime number?

97. There are 25 primes from 1 to 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, 97 — and 97 is the last of them, so it is the 25th prime.

What is the 100th prime number?

541. Primes thin out as numbers grow: there are 25 primes from 1 to 100 but 168 primes from 1 to 1,000, and the 100th prime is 541. The 50th prime is 229.

Internal Linking

Related Math Tools

Factor CalculatorFor the full factorization — 91 = 7 × 13, 100 = 2² × 5² — plus GCF and LCM. Prime checking is the yes/no; factoring is the full breakdown.
Square Root CalculatorTrial division stops at √n — √97 ≈ 9.85 and √91 ≈ 9.54 set the test limit. Check any square root here first.
Exponent CalculatorPrime factorization is powers — 100 = 2² × 5². Check 2² = 4, 5² = 25 and 7² = 49 here.
Factorial CalculatorWilson's test: (p − 1)! + 1 is divisible by p when p is prime — 4! = 24, and 24 + 1 = 25 is divisible by 5.
Average CalculatorThe primes under 20 — 2, 3, 5, 7, 11, 13, 17, 19 — average 9.63 (77 ÷ 8). Check the mean here.
Fraction CalculatorDivisibility is fractions — 91/7 = 13 exactly, 91/13 = 7 exactly. Simplify and check any division here.
Methodology

Prime Number Checker Methodology

This calculator tests primality by trial division using only prime divisors, lists primes with the sieve of Eratosthenes, and finds neighbouring primes by stepping outward and testing each candidate. All arithmetic runs in JavaScript (whole numbers up to 1,000,000,000,000 for checking; ranges up to 1,000,000 for listing).

Trial division: test prime d while d ≤ √n   |   No divisor found → prime
Sieve of Eratosthenes: cross out multiples of each prime up to √N   |   Next/previous: step ±1, test each candidate

Check mode first handles the special cases: 0 and 1 are neither prime nor composite, and 2 is prime. For n ≥ 3 it builds the primes up to √n by sieve, then tests them in order — 91 is caught by 7 (91 = 7 × 13), 111 by 3 (111 = 3 × 37), 143 by 11 (143 = 11 × 13), and 97 survives all four tests (2, 3, 5, 7) up to √97 ≈ 9.85. The verdict is cross-checked two ways: the factor multiplied back out (7 × 13 = 91) and the divisor count from the factorization (a prime has exactly two divisors). Range mode runs the sieve of Eratosthenes up to the end value and counts the primes in the range — 25 from 1 to 100, 8 from 1 to 20, 1 from 90 to 100 (97 only), 5 from 100 to 120. Next-and-previous mode steps outward from n one number at a time, testing each candidate by trial division — from 97 it finds 89 below (gap 8) and 101 above (gap 4). Every mode rejects non-whole numbers and numbers above the stated caps. The page is intended as an educational calculator and verification tool.

Trust note: Every verdict is computed two independent ways — trial division against prime divisors, and the factor multiplied back out or the divisor count — and the landmark answers are fixed points: 91 = 7 × 13, 97 is prime, there are 25 primes from 1 to 100, the 25th prime is 97 and the 100th prime is 541. If a result disagrees with its landmark, a number was entered wrong.
References

Mathematical References

Is 91 Prime? Check Yours

Enter any number above — 91, 97, 111, 143, or one of your own — and get the verdict with every divisor tested and every step shown. Watch for 91: it passes three tests and only falls to 7.

Use Prime Number Checker
Scroll to Top