Math calculator
Prime Number Calculator
Check if a number is prime and list primes in a range.
Quick answer
How do you know if a number is prime?
Divide it by every whole number from 2 up to its square root. If none divide evenly, it is prime. For 97, √97 ≈ 9.85, and 2, 3, 5, 7 don't divide it, so 97 is prime. 91 = 7 × 13, so it is composite.
A prime number has exactly two factors: 1 and itself. To test n, try dividing by every prime up to √n — if none divide evenly, n is prime.
⚡ Answer updates as you type · Enter = calculate · Esc = reset
- Only test divisors up to √97 ≈ 9.8489.
- No whole number from 2 to 9 divides 97 evenly, so it is prime — its only factors are 1 and 97.
Check if any number is prime or composite, see the nearest primes and its prime factorization, or list every prime in a range.
About this Prime Number Calculator
The Prime Number Calculator checks whether any whole number up to one trillion is prime or composite, shows the smallest divisor and prime factorization when it isn't prime, and finds the nearest primes before and after it. Switch modes to list every prime number in a range.
What you'll need
- • Mode: check a number, or list primes in a range
- • A whole number
- • Range start and end
How it works
- 1. Choose check or list mode.
- 2. Enter a number or a range.
- 3. The calculator tests divisors up to the square root.
- 4. Read prime or composite, plus nearest primes.
- 5. See the prime factorization for composite numbers.
Worked example
Is 221 prime? √221 ≈ 14.9. Testing 2, 3, 5, 7, 11, 13: 221 ÷ 13 = 17, so 221 = 13 × 17 is composite. The nearest primes are 211 and 223.
Related searches
Prime Number Calculator FAQ
What is the Prime Number Calculator?
The Prime Number Calculator is a free online tool that helps you check if a number is prime and list primes in a range.
How do I use the Prime Number Calculator?
Open the Prime Number Calculator, enter the requested values, and review the instant estimate on the page.
Is the Prime Number Calculator free?
Yes. The Prime Number Calculator is free to use on Fast Online Calculator and does not require an account.
What are the prime numbers 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 — 25 primes in total.
Is 1 a prime number?
No. A prime must have exactly two different factors. 1 has only one, so it is neither prime nor composite.
Is 2 the only even prime?
Yes. Every other even number divides by 2, so it has at least three factors.
Why only test up to the square root?
If n = a × b, one of a or b must be at most √n. So if nothing up to √n divides n, nothing above it can either.
Related calculators
School
Factor Calculator
Find factors, prime factorization, GCF, and LCM with steps.
School
GCF Calculator
Find the greatest common factor of 2+ numbers with steps.
School
LCM Calculator
Find the least common multiple of 2+ numbers with steps.
Math
Scientific Calculator
Use arithmetic, square roots, powers, trigonometry, logarithms, and percent tools.