Prime Number Checker
Check if a number is prime, find prime factorisation, and list primes up to N.
Source: BBC Bitesize — Maths
By Konstantin Iakovlev · Founder, Calks.uk
Last updated: · Methodology reviewed for 2026
97
is PRIME
Previous Prime
89
Next Prime
101
Primes up to 97 (25 found):
Disclaimer
This calculator is for guidance only. Double-check any result you rely on. Everything is calculated in your browser; nothing you enter is sent to our servers.
How It Works
A prime number is a whole number greater than 1 that has no divisors other than 1 and itself, which is another way of saying it has exactly two divisors. The run starts 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, and everything else above 1 is composite: 4 is 2×2, 6 is 2×3, and 8, 9 and 10 all break down further. The number 1 is not prime by definition, and 2 is the only even prime, because every other even number divides by 2. Gaps between consecutive primes widen on average but do so irregularly, which is why twin pairs such as 11 and 13, 17 and 19, or 29 and 31 keep turning up.
This calculator checks whether a given number is prime by testing divisibility up to its square root, which is enough, because any larger factor would already have been caught paired with a smaller one. It also produces the complete prime factorisation of composite numbers, lists every prime within a range such as 1 to 1,000, and finds the next prime above or below a number you enter. Factorisation is the workhorse behind simplifying fractions and behind finding the lowest common multiple or greatest common divisor of two numbers.
Primes are the building blocks of the integers. The Fundamental Theorem of Arithmetic says that every integer above 1 has a unique prime factorisation, so the factor list works as a fingerprint. That uniqueness, combined with the difficulty of reversing it, is what modern internet security rests on. RSA encryption multiplies two large primes together and depends on nobody being able to factor the result, a semiprime, in reasonable time. RSA-2048, the current standard, uses 617-digit primes. The same properties turn up in error-correcting codes, random number generation and hash functions.
Several methods exist for deciding primality, and they suit different sizes of number. Trial division checks whether N divides by anything from 2 up to √N, which is fine for small numbers and hopeless for large ones. The Sieve of Eratosthenes is the efficient route to every prime up to N, working by striking out multiples. Miller-Rabin is probabilistic, very fast on large numbers, and returns a high-confidence answer rather than a certain one. The AKS test, published in 2002, is deterministic and runs in polynomial time, which made it theoretically important, although it remains slower in practice than Miller-Rabin.
Big primes attract record-hunters. The largest known prime as of 2024 is 2^136,279,841 − 1, a Mersenne prime with 41 million digits, found through the Great Internet Mersenne Prime Search using distributed computing. Several simple-sounding questions about primes are still open. The twin primes conjecture asks whether pairs of that kind go on forever, and is believed true but unproven. Goldbach's conjecture, that every even number above 2 is the sum of two primes, has been verified to 4 × 10^18 without being proved. The Riemann hypothesis, which concerns how primes are distributed, carries an unclaimed $1M Millennium Prize.
For UK students the subject runs from school arithmetic into serious number theory. A-level Maths covers the Fundamental Theorem, highest common factor and lowest common multiple, the Euclidean algorithm for finding a GCD, modular arithmetic and Fermat's Little Theorem, which states that a^p ≡ a mod p for prime p, along with the basics of public-key cryptography. Undergraduate courses go further into Diophantine equations, congruences and quadratic residues, and the cryptography pathways at Bristol, Royal Holloway and Birmingham build directly on that material.
Example: Is 97 prime? Factor 360.
- 97: test divisors up to √97 ≈ 9.85
- 97 is not divisible by 2, 3, 5 or 7, it is prime
- 360 = 2 × 180 = 2 × 2 × 90 = 2 × 2 × 2 × 45 = 2³ × 3² × 5
- Prime factors of 360: 2, 3 and 5
Source: BBC Bitesize — Maths
Frequently Asked Questions
- Can I check whether a large number is prime quickly?
- Any whole number above 1 with no divisors besides 1 and itself is prime, and testing divisibility only up to its square root keeps the check fast, because any larger factor would already have appeared paired with a smaller one. Checking 97 means trying divisors up to √97, about 9.85, so 2, 3, 5 and 7 are the only candidates and none of them divide it. Composite numbers are broken down into their full prime factorisation instead.
- Why is 1 not counted as a prime number?
- A prime has exactly two divisors, 1 and itself, and 1 fails that test because its only divisor is 1. Excluding it also keeps the Fundamental Theorem of Arithmetic tidy, since every integer above 1 then has one unique prime factorisation rather than endless variants padded out with 1s. By the same logic 2 is the only even prime, because every other even number divides by 2.
- How do prime numbers keep online banking secure?
- RSA encryption multiplies two large primes together and publishes the product. Recovering the original primes from that product, a semiprime, is so slow with known methods that the encryption holds up. RSA-2048, the current standard, uses 617-digit primes. The same mathematics underpins error-correcting codes, hash functions and random number generation, all of which lean on properties of primes.
- What is the largest prime number found so far?
- As of 2024 it is 2^136,279,841 − 1, a Mersenne prime running to 41 million digits, discovered through the Great Internet Mersenne Prime Search, which spreads the work across volunteers' computers. Records of that size rely on Miller-Rabin style testing rather than trial division, which would take impossibly long. Plenty about primes is still unsettled: Goldbach's conjecture, that every even number above 2 is the sum of two primes, has been verified to 4 × 10^18 but never proved.