Math Calculators

Prime Factorization Calculator

Break a number into prime factors and list all of its divisors.

—
—Number of divisors
—Sum of divisors
—Type

Division steps

All divisors

What is prime factorization?

Prime factorization means writing a number as a product of prime numbers. Every whole number greater than 1 has exactly one prime factorization, apart from the order of the factors. This is called the Fundamental Theorem of Arithmetic. For example, 360 = 2 × 2 × 2 × 3 × 3 × 5, or in exponent form 2³ × 3² × 5. Factorization is used to simplify fractions, find the GCD and LCM, work with square roots and understand divisibility.

How to use the calculator

  1. Type a whole number up to one quadrillion (10¹⁵).
  2. Read the factorization in exponent form and as a plain product.
  3. Follow the division steps, which are the same steps you would write in a factor-tree or ladder method at school.
  4. See the number of divisors, their sum and the full list of divisors.

The division (ladder) method

Divide by the smallest prime that divides the number exactly, and keep going with the result:

360 ÷ 2 = 180
180 ÷ 2 = 90
90 ÷ 2 = 45
45 ÷ 3 = 15
15 ÷ 3 = 5
5 is prime

The primes you divided by are the factors: 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. You only need to test primes up to the square root of what is left; if nothing divides it, the remaining number is itself prime.

Counting divisors from the factorization

If n = pa × qb × rc, then the number of divisors is (a + 1)(b + 1)(c + 1). For 360 = 2³ × 3² × 5¹, that is 4 × 3 × 2 = 24 divisors. The sum of divisors is (pa+1 − 1)/(p − 1) × … for each prime. A number whose divisors other than itself add up to the number, like 6 or 28, is called a perfect number.

Frequently asked questions

Why is the limit 10¹⁵?

Larger numbers can take a very long time to factor in a browser. Factoring huge numbers is so hard that internet encryption depends on it.

How do I find the GCD of two numbers with factorization?

Multiply the primes they share, each to the smaller power. Or use the GCD and LCM Calculator.

Can I just check if a number is prime?

Yes, the Prime Number Checker is faster for very large numbers.