Prime Factorization Calculator

Write any whole number as a product of primes, with a drawn factor tree, the division ladder and the exponent form.

Any whole number from 2 up to 20 digits.
Exponent form
23 × 32 × 5
Expanded form
2 × 2 × 2 × 3 × 3 × 5
Distinct prime factors
2, 3, 53 distinct, 6 counting repeats
Number of divisors
24(3+1) × (2+1) × (1+1)
Prime or composite
Composite
Prime factorization of 36023 × 32 × 5

Division ladder

  1. Divide by the smallest prime that goes in evenly, and repeat with the quotient until you reach 1:
  2. 360 ÷ 2 = 180
  3. 180 ÷ 2 = 90
  4. 90 ÷ 2 = 45
  5. 45 ÷ 3 = 15
  6. 15 ÷ 3 = 5
  7. 5 ÷ 5 = 1
  8. Collect the divisors: 2 × 2 × 2 × 3 × 3 × 5 = 23 × 32 × 5
323618224520360

Prime factors (the leaves of the tree)

Every whole number greater than 1 is either prime or a product of primes, and that product is unique. Finding it — the prime factorization — is the gateway to simplifying fractions, finding the greatest common factor and least common multiple, simplifying square roots and counting divisors. This calculator factors numbers up to 20 digits, draws a factor tree, writes out the division ladder taught in many classrooms and gives the exponent form.

How to use the prime factorization calculator

  1. Enter a whole number from 2 up to 20 digits. Commas are fine.
  2. Choose a factor tree style: balanced splits each number into the two factors closest to its square root; smallest prime peels off the smallest prime factor at every step, matching the division ladder.
  3. The tape shows the exponent form, the expanded product and the number of divisors. Below it you’ll find the division ladder and the factor tree.

Two ways to factor by hand

The division ladder (repeated division)

Divide by the smallest prime that goes in evenly, write down the quotient and repeat:

360 ÷ 2 = 180

180 ÷ 2 = 90

90 ÷ 2 = 45

45 ÷ 3 = 15

15 ÷ 3 = 5

5 ÷ 5 = 1

Divisors used: 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5

The factor tree

Start with any factor pair and branch until every leaf is prime. For 360 you could begin with 18 × 20, or 10 × 36, or 2 × 180 — every route ends with the same leaves: three 2s, two 3s and one 5. The diagram above the steps draws one such tree, with primes circled.

Writing the answer in exponent form

Group repeated primes and use exponents, listing primes from smallest to largest:

n = p₁a × p₂b × p₃c × …
Number Prime factorization
12 2² × 3
60 2² × 3 × 5
84 2² × 3 × 7
100 2² × 5²
360 2³ × 3² × 5
1,001 7 × 11 × 13
1,024 2¹⁰

What the factorization tells you

  • Number of divisors: add 1 to each exponent and multiply. 360 has (3+1)(2+1)(1+1) = 24 divisors.
  • Perfect squares and cubes: a number is a perfect square when every exponent is even (100 = 2² × 5²) and a perfect cube when every exponent is a multiple of 3. 46,656 = 2⁶ × 3⁶ is both.
  • Greatest common factor: take the primes the numbers share, each to its smallest exponent. See the GCF calculator.
  • Least common multiple: take every prime that appears, each to its largest exponent. See the LCM calculator.
  • Simplifying radicals: pairs of equal primes come out of a square root, so √360 = √(2² × 3² × 2 × 5) = 6√10.

Tips for factoring large numbers

Quick divisibility checks save time: a number is divisible by 2 if it ends in an even digit, by 3 if its digits add up to a multiple of 3, and by 5 if it ends in 0 or 5. You only need to test primes up to the square root of what remains — if nothing divides it by then, the remaining number is prime.

For very large numbers, trial division becomes slow, so this calculator switches to faster methods: the Miller–Rabin primality test and Pollard’s rho algorithm, both standard in computational number theory. They are what let it factor a 20-digit number in a fraction of a second.

To list every factor rather than just the primes, use the factors calculator. To check whether a single number is prime and find its neighbors, try the prime number checker.

Frequently asked questions

What is prime factorization?

Writing a whole number as a product of prime numbers. The prime factorization of 360 is 2 × 2 × 2 × 3 × 3 × 5, which is written in exponent form as 2³ × 3² × 5.

How do I make a factor tree?

Write the number at the top and split it into any two factors. Keep splitting each composite branch until every branch ends in a prime. For 360 you might split into 18 × 20, then 18 into 3 × 6 and 20 into 4 × 5, and so on. The primes at the ends of the branches are the prime factorization.

Does every number have only one prime factorization?

Yes. The Fundamental Theorem of Arithmetic says every whole number greater than 1 has exactly one prime factorization, apart from the order of the factors. Different factor trees always end with the same primes.

What is the prime factorization of a prime number?

The prime itself. 97 is prime, so its prime factorization is just 97.

How do I find the number of factors from the prime factorization?

Add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5¹, the number of factors is (3+1)(2+1)(1+1) = 24.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.