Prime Factorization Calculator
Break any whole number into its prime factors — with a drawn factor tree, a division ladder and an exponent chart.
Prime factorisation
Note: Trial division is used, which is instant for everyday sizes and practical up to about a trillion. Numbers below 2 have no prime factorisation.
Breaking a Number Into Primes
Every whole number above 1 is either prime or a unique product of primes — the fundamental theorem of arithmetic — and this calculator finds that product. The ladder table shows the division steps: keep dividing by the smallest prime that fits until only 1 remains. The factor tree draws the same breakdown as a diagram, splitting each composite branch into a prime and a smaller number until every leaf is prime. The exponent chart counts how often each prime appears.
Worked Example
360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, ÷ 5 = 1 — six divisions, giving 360 = 2³ × 3² × 5. That is 6 prime factors counted with repetition and 3 distinct primes. The exponent form is the useful one: it instantly gives the factor count ((3 + 1)(2 + 1)(1 + 1) = 24 factors), the GCF and LCM against any other factorised number, and whether the number is a perfect square (all exponents even — not here, since 5 stands alone).
Why Factorising Is Both Easy and Hard
For the sizes on this page, trial division is instant. But factorising is believed to be fundamentally hard at scale: no known method efficiently splits a 600-digit product of two large primes, and that one-way difficulty is exactly what RSA encryption banks on. Your number is safe to factorise here — the practical ceiling is around a trillion, where trial division up to the square root is still quick in a browser.
Frequently Asked Questions
What is prime factorization?
Writing a number as the product of prime numbers only: 360 = 2 cubed x 3 squared x 5. Every whole number above 1 has exactly one such form.
How does the ladder method work?
Divide by the smallest prime that fits, then divide the result again, until you reach 1. The divisors you used, collected, are the prime factorisation.
What does the factor tree show?
The same breakdown as a diagram: each composite number splits into a prime and a smaller number until every branch ends in a prime leaf.
Why is factorising large numbers hard?
Trial division must test primes up to the square root, and no shortcut is known for huge numbers. That difficulty protects RSA encryption — but everyday sizes factorise instantly here.