Prime Factorization Calculator

Every whole number greater than 1 is either prime or a product of primes in exactly one way. Finding that product is prime factorization, and it unlocks the GCF, the LCM, simplified fractions and counting divisors. Enter a number and this tool splits it into primes step by step.

How to use the prime factorization calculator

  1. Enter a whole number from 2 to 1,000,000,000,000.
  2. Read the factorization in exponent form (for example 2³ × 3² × 5).
  3. Use the division steps to follow the process, and the divisor rows for extra facts.

Formula

Divide by the smallest prime that fits (2, 3, 5, 7, …) until the quotient is 1. If n = p₁a × p₂b × …, then the number of divisors is (a + 1)(b + 1)… and the sum of divisors is the product of (pe+1 − 1) ÷ (p − 1) for each prime.

Worked examples

360

360 = 2³ × 3² × 5. The number of divisors is (3 + 1)(2 + 1)(1 + 1) = 24, and they add up to 1,170.

A prime

97 has no smaller factor, so it is prime and its factorization is just 97.

What you can do with prime factors

Find the GCF and LCM

Write both numbers as primes. The GCF multiplies the primes they share, using the smaller exponent; the LCM multiplies all primes, using the larger exponent. For 12 = 2² × 3 and 18 = 2 × 3², the GCF is 2 × 3 = 6 and the LCM is 2² × 3² = 36.

Count the divisors

Add one to each exponent and multiply. For 360 = 2³ × 3² × 5¹: (3 + 1)(2 + 1)(1 + 1) = 24 divisors. The tool lists this and the sum of the divisors.

Check for perfect squares and cubes

A number is a perfect square when every exponent is even, and a perfect cube when every exponent is a multiple of 3. 144 = 2⁴ × 3² has even exponents, so it is a square (12²).

Cryptography

Multiplying two large primes is easy, but factoring the product is very hard. Modern encryption, such as RSA, relies on that gap. The numbers used are hundreds of digits long, far beyond this tool’s trillion limit.

Practice problems

Try these yourself first, then check your answer. The answers come from the calculator above.

  1. Factor 252 into primes.
    Show answer

    Prime factorization: 2^2 × 3^2 × 7

  2. Factor 1001 into primes.
    Show answer

    Prime factorization: 7 × 11 × 13

Common mistakes to avoid

  • Stopping when a factor is composite. Keep splitting until every factor is prime.
  • Treating 1 as a prime. It is not.
  • Forgetting exponents when a prime repeats. 72 is 2³ × 3², not 2 × 3.

Frequently asked questions

What is prime factorization?

Writing a number as a product of prime numbers. It is unique for every whole number above 1.

How do I use it to find the GCF?

Take the primes both numbers share, using the smaller exponent. See the GCF and LCM calculator.

What is a factor tree?

A diagram that splits a number into two factors, then splits those, until only primes remain.

How many divisors does a prime have?

Exactly two: 1 and itself.

Reviewed September 26, 2026 by the SolveCalcPro editorial team. Found a mistake? Tell us; see our editorial policy.