Prime Factorization Calculator
Decompose an integer into its product of prime factors.
Every number has exactly one factorisation
A prime has exactly two distinct divisors, itself and 1 — which is why 1 is not prime, having only one. Prime factorisation breaks a number into the primes that multiply to make it: 60 = 2² × 3 × 5. The fundamental theorem of arithmetic guarantees this decomposition is unique for every integer above 1, ignoring order.
Trial division is the straightforward method: divide by 2 as many times as it goes, then 3, then 5, and upward through the primes. You only need to test up to the square root — if a number has no prime factor at or below its square root, it is prime, because any larger factor would require a smaller partner that you would already have found.
The factorisation makes other problems easy. The GCF is the product of shared primes at their lowest powers; the LCM is the product of all primes at their highest. It is also why simplifying fractions and finding common denominators reduce to the same underlying operation. The practical difficulty of factorising very large numbers is, separately, what most public key cryptography rests on.
Frequently Asked Questions
What is prime factorization?
Prime factorization is expressing a composite number as the product of prime numbers (e.g. 12 = 2 × 2 × 3).
What is the Fundamental Theorem of Arithmetic?
Every integer greater than 1 has a unique prime factorization up to the order of factors.
What is prime factorisation?
Expressing a number as a product of primes: 60 = 2^2 x 3 x 5. The fundamental theorem of arithmetic guarantees this decomposition is unique for every integer above 1, ignoring order - which is why primes are called the building blocks of the integers.
Why is factoring large numbers hard?
No efficient classical algorithm is known. The difficulty of factoring the product of two large primes is what RSA encryption rests on: multiplying two 300-digit primes is instant, while factoring the result would take conventional computers longer than the age of the universe. Shor's algorithm would break this on a sufficiently large quantum computer.