Prime Factorization

Factor a number into primes.

Output appears here.

Every whole number greater than 1 breaks down into a unique set of prime number building blocks — this tool finds exactly that breakdown, the prime factorization, for any number you enter.

A uniqueness theorem so important it has its own name

The Fundamental Theorem of Arithmetic — proven rigorously in its modern form by Carl Friedrich Gauss in his influential 1801 work "Disquisitiones Arithmeticae," though the core idea traces back to Euclid — establishes that every integer greater than 1 has exactly one prime factorization, regardless of the order the factors are found in; 60 is always 2 × 2 × 3 × 5, no matter how you approach breaking it down. This uniqueness property isn't just a mathematical curiosity — it's foundational to huge areas of number theory and, practically, to cryptographic systems that depend on the difficulty of reversing this factorization process for very large numbers.

How this tool finds the factorization

The tool repeatedly divides your number by the smallest possible prime (starting with 2, then 3, 5, 7 and upward), continuing to divide by that same prime as many times as it evenly divides before moving to the next larger prime candidate, until the remaining value is reduced all the way to 1 — the sequence of primes used along the way, collected together, is your number's complete, unique prime factorization.

Where prime factorization is genuinely useful

  • Simplifying fractions — finding the greatest common divisor between a fraction's numerator and denominator, a calculation that becomes straightforward once both numbers are broken into their prime factors.
  • Understanding cryptographic security — grasping conceptually why factoring large numbers is computationally hard is essential to understanding why systems like RSA encryption are considered secure.
  • Math education and number theory — a foundational concept taught across middle school through advanced number theory coursework, essential for understanding concepts like GCD, LCM and modular arithmetic.
  • Puzzle-solving and recreational mathematics — many classic math puzzles and competition problems hinge on recognizing or exploiting a number's prime factorization.

Frequently asked questions

Is prime factorization always unique, no matter how you find it? Yes — this is precisely what the Fundamental Theorem of Arithmetic guarantees; whether you start dividing by small primes first or approach the problem in a completely different order, you'll always arrive at the exact same set of prime factors (though possibly discovered in a different sequence).

Why is factoring large numbers considered "hard" for computers? Not because the algorithm itself is complicated, but because the amount of computation required grows so dramatically as numbers get larger that even powerful modern computers would take an impractically long time (potentially longer than the age of the universe, for sufficiently large numbers) to factor certain large composite numbers using currently known methods — this specific difficulty is what cryptographic systems like RSA are built around.

What's the prime factorization of a prime number itself? Just the number itself — since a prime number, by definition, has no divisors other than 1 and itself, its "factorization" is simply that single prime, with no further breakdown possible.

Further reading