Prime Factorization Calculator
Break any number into its prime factors with step-by-step division, exponent form, and a visual factor tree.
Prime factorization
Loading calculator…
The prime factorization of a number is the unique way of writing it as a product of prime numbers. For example, 360 = 2³ × 3² × 5. This calculator handles any whole number up to one trillion and shows every division step, so you can follow the method rather than just copy the answer. To find all divisors instead of just the primes, use the factor calculator.
What is prime factorization?
Every whole number greater than 1 is either a prime number or can be written as a product of primes. Prime factorization is the process of finding those primes.
What makes it special is uniqueness. The number 84 factorizes as 2² × 3 × 7, and there is no other combination of primes that multiplies to 84. This is the Fundamental Theorem of Arithmetic, and it's why prime factorization is a reliable foundation for other calculations like GCF, LCM, and fraction simplification.
A prime number has exactly two divisors: 1 and itself. The first primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. Numbers with more than two divisors are composite, and only composite numbers can be broken down further.
How to factorize a number step by step
The standard approach is the division method, also called the ladder method. Work through the primes in order, dividing as many times as each one goes in evenly.
Worked example — 84:
- 84 ÷ 2 = 42 (2 divides evenly, so divide again)
- 42 ÷ 2 = 21 (2 no longer divides 21, move to 3)
- 21 ÷ 3 = 7 (3 no longer divides 7, move on)
- 7 ÷ 7 = 1 (7 is prime — we're done)
Prime factors: 2, 2, 3, 7. In exponent form: 84 = 2² × 3 × 7.
Shortcut: you never need to test a divisor larger than the square root of the remaining quotient. Once your test divisor squared exceeds what's left, whatever remains is prime.
The factor tree method
A factor tree reaches the same answer visually. Split the number into any two factors, then keep splitting composite branches until every leaf is prime.
Worked example — 180:
- 180 splits into 18 × 10
- 18 splits into 2 × 9, and 9 splits into 3 × 3
- 10 splits into 2 × 5
The prime leaves are 2, 3, 3, 2, 5 — giving 180 = 2² × 3² × 5. Notice that even if you start by splitting 180 into 4 × 45 instead, you end up with the same primes. The path differs; the result never does.
Counting divisors from the prime factorization
Prime factorization gives you a shortcut for counting all divisors of a number without listing them. Add 1 to each exponent, then multiply.
For 360 = 2³ × 3² × 5¹, the divisor count is (3+1) × (2+1) × (1+1) = 4 × 3 × 2 = 24 divisors. The calculator above shows this derivation for whatever number you enter.
This is why divisor properties and prime factorization are so closely linked — one determines the other.
Where prime factorization is used
- Simplifying fractions: factorize numerator and denominator, then cancel shared primes.
- Finding the GCF: take the lowest power of each shared prime. Try the GCF calculator.
- Finding the LCM: take the highest power of every prime that appears. Try the LCM calculator.
- Cryptography: RSA encryption relies on the fact that factorizing a product of two large primes is computationally hard.