Prime Factorization
Factors, exponents, and all divisors
Prime Factorization
Prime or Composite
All Divisors

Prime Factorization Calculator

Prime factorization is the process of breaking a composite number down into a product of prime numbers. Every integer greater than 1 has a unique prime factorization — this is known as the Fundamental Theorem of Arithmetic.

How It Works

The calculator uses trial division: it tests divisibility by every integer from 2 up to the square root of n. When a factor is found, it divides n repeatedly until the factor no longer divides evenly, then continues with the next candidate.

Example: 360 = 2³ × 3² × 5
Full expansion: 360 = 2 × 2 × 2 × 3 × 3 × 5

Prime vs. Composite Numbers

  • Prime: Has exactly two distinct divisors — 1 and itself. Examples: 2, 3, 5, 7, 11, 13.
  • Composite: Has more than two divisors. Examples: 4, 6, 8, 9, 12.
  • Special case: 1 is neither prime nor composite.

Why Factorization Matters

Prime factorization is foundational to number theory and underlies practical applications:

  • LCM and GCD: Finding the least common multiple or greatest common divisor of two numbers requires factorization.
  • Cryptography: RSA encryption relies on the computational difficulty of factoring the product of two large primes.
  • Simplifying fractions: Finding the GCD via factorization reduces fractions to lowest terms.

Frequently Asked Questions

Why is 1 not a prime number?

If 1 were prime, the Fundamental Theorem of Arithmetic would break down — every number would have infinitely many factorizations (e.g., 6 = 2 × 3 = 1 × 2 × 3 = 1 × 1 × 2 × 3, etc.). Excluding 1 preserves uniqueness.

Is 2 the only even prime?

Yes. Every even number greater than 2 is divisible by 2, making it composite. 2 is the smallest and only even prime number.