What Is a Prime Number?
A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. In other words, a prime number has exactly two distinct positive divisors: 1 and the number itself.
How to Use the Prime Number Checker
- Enter any positive integer greater than 0 into the input field.
- Click "Check Prime".
- View whether the number is prime or composite, along with its complete list of factors.
Formula & How the Calculation Works
Trial Division: Test divisibility by primes up to √n.
If a number has no divisors less than or equal to its square root, it is guaranteed to be prime.
Worked Calculation Example
Scenario: Check if 29 is prime.
- Calculate √29 ≈ 5.385.
- Test prime divisors up to 5: 2, 3, 5.
- 29 is not divisible by 2 (odd), nor by 3 (sum of digits 11), nor by 5 (ends in 9).
- Result: 29 has no divisors ≤ √29, so 29 is a prime number.
Key Considerations & Common Mistakes to Avoid
- Thinking 1 is a prime number: By modern mathematical definition, 1 is neither prime nor composite.
- Assuming all odd numbers are prime: Many odd numbers (like 9, 15, 21, 25, 27) are composite.