Prime Factorization Calculator
Decompose any positive integer into its unique set of prime number factors. Use it for simplifying fractions, finding GCDs, or exploring number theory.
About this calculator
The Fundamental Theorem of Arithmetic states that every integer greater than 1 can be expressed as a unique product of prime numbers. To find the prime factorization, use trial division: starting from the smallest prime (2), divide the number repeatedly by the current divisor as long as it divides evenly, recording each prime factor, then move to the next integer. Continue until the remaining value reaches 1. The result is written as a product: n = p₁ × p₂ × p₃ × .... For example, 60 = 2 × 2 × 3 × 5, or in exponential form 2² × 3 × 5. Prime factorization is the foundation for computing GCDs, LCMs, and simplifying fractions.
How to use
Find the prime factorization of 84. Start with divisor 2: 84 ÷ 2 = 42, then 42 ÷ 2 = 21. Now 21 is not divisible by 2, so move to 3: 21 ÷ 3 = 7. Now 7 is not divisible by 3, move to 4 (skip), then 5 (skip), then try 6 (skip), then 7: 7 ÷ 7 = 1. Done. The factors collected are 2, 2, 3, 7, so 84 = 2 × 2 × 3 × 7. Enter 84 in the Number field and the calculator returns this factorization instantly.
Frequently asked questions
What is prime factorization and why does it matter?
Prime factorization is the process of expressing a number as a product of its prime number building blocks. By the Fundamental Theorem of Arithmetic, this representation is unique for every integer greater than 1. It matters because it reveals the underlying structure of a number, making it straightforward to compute GCDs, LCMs, and simplify fractions. It is also used in cryptography — RSA encryption relies on the difficulty of factoring very large numbers.
How do you find the prime factorization of a large number?
For large numbers, trial division becomes slow, but the principle is the same: divide by each prime starting from 2 until the quotient reaches 1. A key shortcut is that you only need to test divisors up to the square root of the number — if no prime up to √n divides n, then n itself is prime. For very large numbers (hundreds of digits), advanced algorithms like Pollard's rho or the general number field sieve are used, but for everyday calculations trial division is perfectly sufficient.
Can every number be expressed as a product of prime factors?
Yes — every integer greater than 1 has a prime factorization, guaranteed by the Fundamental Theorem of Arithmetic. Prime numbers themselves are their own factorization (e.g., 7 = 7). Composite numbers break down into two or more prime factors. The number 1 is a special case: it is neither prime nor composite and has no prime factors. Negative integers can also be factored if you include −1 as a unit, but this calculator is designed for positive integers.