Complete User Guide to Prime Numbers, Composite Numbers, and Trial Division
Why Prime Numbers Are Foundational to Mathematics and Computing
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself—such as 2, 3, 5, 7, 11, 13, and 97. Numbers greater than 1 that have at least one additional divisor are called composite numbers (such as 4, 6, 9, or 49), while integers less than or equal to 1 (such as 0, 1, and negative integers) are neither prime nor composite. Prime numbers serve as the multiplicative building blocks of integers via unique prime factorization and underpin modern public-key cryptography, hashing, and algorithm design. A browser-based Prime Number Checker tests integers immediately—100% locally in your browser with zero server uploads.
How to Check a Number for Primality in 3 Easy Steps
- Enter an Integer: Type a whole number into Integer to Check, or click one of the quick chips (
2,17,49,97, or1). - Read the Classification & Divisor Info: Check whether the number is PRIME, COMPOSITE, or NEITHER, along with the trial division bound
⌊√n⌋, smallest factor greater than1, and nearby primes. - Copy or Export Results: Click Copy Result to copy the summary to your clipboard or Download .txt to save a local record.
Square-Root Trial Division Rule
If a number n > 1 is composite and has a factor a > 1, then n = a × b, meaning at least one of a or b cannot exceed √n:
If n mod d === 0 for any d ≤ ⌊√n⌋ → Composite; otherwise → Prime
Common Prime Number Pitfalls to Avoid
- 1 Is Not a Prime Number: By mathematical convention,
1is excluded from primes so that every integer greater than1has a unique prime factorization. - 2 Is the Only Even Prime: Every other even number is divisible by
2and therefore composite. - Odd Numbers Like 49 or 91 Can Still Be Composite: Always check up to
⌊√n⌋—for example,49 = 7 × 7and91 = 7 × 13.
Worked Example: Testing 97 gives trial-division bound ⌊√97⌋ = 9. Since none of 2, 3, 5, 7 divides 97 evenly, 97 is a prime number with divisors 1 and 97.