Prime Factorization Calculator
Break any integer into its prime building blocks instantly. Use this when simplifying fractions, finding GCDs, or verifying primality. Results display as a product or exponent form.
About this calculator
Prime factorization decomposes a positive integer into a product of prime numbers that, when multiplied together, reproduce the original number. For example, 360 = 2³ × 3² × 5. The algorithm used here is trial division: starting from divisor d = 2, divide n repeatedly while d divides n, then increment d. Any remaining factor greater than 1 is itself prime. Every integer greater than 1 has a unique prime factorization, a fact guaranteed by the Fundamental Theorem of Arithmetic. Results can be shown in expanded form (2 × 2 × 2 × 3 × 3 × 5), exponential form (2^3 × 3^2 × 5), or as a comma-separated list, depending on your chosen display mode.
How to use
Suppose you want to factor 360. Enter 360 in the 'Number to Factorize' field and select 'Exponential' as the display format. The calculator divides by 2 three times (360 → 180 → 90 → 45), then by 3 twice (45 → 15 → 5), leaving 5 as the final prime. The result is 2^3 × 3^2 × 5. Multiply back: 8 × 9 × 5 = 360 ✓. Toggle 'Include 1' off to keep the output clean.
Frequently asked questions
What is prime factorization and why is it useful in math?
Prime factorization expresses any integer greater than 1 as a unique product of prime numbers. It is foundational for computing GCDs and LCMs, simplifying fractions, and solving problems in number theory and cryptography. RSA encryption, for instance, relies on the difficulty of factoring very large numbers. Knowing the prime factors of two numbers immediately tells you their greatest common divisor.
How does the trial division algorithm find prime factors?
Trial division tests divisors d starting from 2. Each time d divides the current value of n, d is recorded as a factor and n is reduced. Once d² exceeds n, any remaining n > 1 must itself be prime. This method is straightforward and fast for numbers up to several million. For very large numbers, more advanced algorithms like Pollard's rho are used instead.
What is the difference between exponential and expanded display format for prime factors?
Expanded format lists every prime factor individually, such as 2 × 2 × 2 × 3 × 3 × 5, making each occurrence visible. Exponential format groups repeated factors using powers, giving a more compact result like 2^3 × 3^2 × 5. The exponential form is standard in textbooks and exams. Both representations convey identical mathematical information; the choice depends on readability preference.