🔢

Prime Number Checker

Check if a number is prime and get its prime factorization, all divisors, and the nearest prime numbers.

Is 17 prime?

YES ✓

Next Prime

19

Previous Prime

13

# of Divisors

2

Prime Factors

1

All Divisors of 17 (2 total)

Click any divisor to check if it's prime. Numbers up to 1,000,000 are supported for instant results.

About the Prime Number Checker

A prime number is divisible only by 1 and itself - and these seemingly simple numbers are the foundation of modern cryptography. The RSA algorithm that protects your online banking and UPI transactions relies on the difficulty of factoring large numbers into their prime components. Prime factorization also underpins fraction simplification, LCM and GCD calculations, and number theory in mathematics education.

Prime Checking - Trial Division

For n > 1: check divisibility by all integers from 2 to sqrt(n). If any divides n evenly, n is composite. Otherwise, n is prime.

sqrt(n) as upper bound is sufficient because if n = a × b and a > sqrt(n), then b < sqrt(n) (already checked) · Prime factorization: divide repeatedly by smallest prime until quotient is 1

Worked Example

Is 97 prime? Find prime factorization of 360.

Is 97 prime?:Check divisibility by 2,3,5,7 (all < sqrt(97)≈9.8)
Prime factorization of 360:360 = 2×180 = 2×2×90 = 2²×2×45 = 2³×9×5 = 2³×3²×5

97 is prime (not divisible by 2, 3, 5, 7) · 360 = 2³ × 3² × 5¹

Tips & Insights

  • 1

    All prime numbers except 2 and 3 are of the form 6k+1 or 6k-1 - useful for quick elimination.

  • 2

    The number 1 is not prime by definition - primality requires exactly two distinct factors.

  • 3

    Mersenne primes (2^p - 1) are a special class of primes; 2^82,589,933 - 1 is the largest known prime as of 2024.

Why this matters for you

Understanding prime factorization is essential for school mathematics through to higher number theory. For competitive exam preparation (JEE, GMAT, CAT), prime factorization questions appear regularly. And for anyone curious about why their internet banking is secure, understanding that breaking RSA encryption requires factoring numbers with hundreds of digits makes the connection from basic primes to modern cryptography concrete.

Related Calculators

Frequently Asked Questions