Prime Number Calculator
Check whether a number is prime, or list all prime numbers up to a given limit.
About the Prime Number Calculator
A prime number is a whole number greater than 1 with no divisors other than 1 and itself — the building blocks of number theory. This calculator either checks whether a specific number is prime, or lists every prime number up to a limit you choose.
How It Works
To check a single number, the calculator tests divisibility by every whole number from 2 up to its square root — if none divide evenly, the number is prime. To list primes up to a limit, it applies that same primality test to every number in the range and collects the ones that pass.
A number n is prime if no integer from 2 to √n divides it evenly.
Example
Scenario: Checking whether 97 is prime.
Result: 97 is a prime number, since no whole number between 2 and its square root divides it evenly.
Assumptions & Limitations
- Only tests whole numbers 2 or greater — 0, 1, and negative numbers are not considered prime by mathematical definition.
- The 'list primes' mode caps results at a reasonable number of entries for readability.
- Listing primes up to very large limits can take noticeably longer, since the check scales with the size of the range.