Prime Factorization Calculator

Find all prime factors of any number with factor tree visualization and step-by-step solutions.

Enter a Number

Result

Prime Factorization
2^3 x 3^2 x 5
Number 360
Prime Factors (list) 2, 2, 2, 3, 3, 5
Distinct Primes 2, 3, 5
Number of Divisors 24

Factor Tree (Division Method)

Step-by-Step Solution

360 = 2^3 x 3^2 x 5^1

Understanding Prime Factorization

Prime factorization is the process of breaking down a composite number into a product of prime numbers. According to the Fundamental Theorem of Arithmetic, every integer greater than 1 can be represented uniquely as a product of prime numbers, up to the order of the factors. This makes prime factorization a cornerstone of number theory.

Methods of Prime Factorization

Trial Division

Divide by the smallest prime (2), then 3, 5, 7, etc., until the quotient is 1.

Divide by primes up to sqrt(n)

Factor Tree

Repeatedly split the number into two factors until all leaves are prime.

Split: 12 -> 2 x 6 -> 2 x 2 x 3

Exponential Form

Group repeated prime factors using exponents for compact notation.

72 = 2^3 x 3^2

Applications of Prime Factorization

  • Cryptography: RSA encryption relies on the difficulty of factoring large numbers.
  • GCD and LCM: Prime factorization provides the easiest method to find greatest common divisors and least common multiples.
  • Simplifying fractions: Cancel common prime factors from numerator and denominator.
  • Number of divisors: If n = p1^a1 * p2^a2 * ..., then the number of divisors is (a1+1)(a2+1)...
  • Perfect squares: A number is a perfect square if and only if all exponents in its factorization are even.

Counting Divisors

Given the prime factorization n = p1^a1 * p2^a2 * ... * pk^ak, the total number of positive divisors of n equals (a1+1)(a2+1)...(ak+1). For example, 360 = 2^3 * 3^2 * 5^1 has (3+1)(2+1)(1+1) = 4 * 3 * 2 = 24 divisors.

The Fundamental Theorem of Arithmetic

This theorem guarantees that prime factorization is unique for every positive integer greater than 1. No matter what method you use or what order you factor, you will always arrive at the same set of prime factors with the same exponents. This uniqueness is what makes prime factorization so powerful in mathematics.