Mathematics · Number Theory
Prime Factorization Calculator
Decompose any integer into its prime factors and display the full factorization in exponential notation.
Calculator
Formula
Every integer n > 1 can be uniquely expressed as a product of prime powers, where p₁ < p₂ < ... < pₖ are prime numbers and a₁, a₂, ..., aₖ are positive integers.
Source: Fundamental Theorem of Arithmetic
How it works
The calculator uses trial division: it divides the input number by successive integers starting from 2. When a divisor divides evenly, it is a prime factor — the algorithm records it and continues with the quotient. This process repeats until the remaining quotient is 1.
For example, to factorize 360: divide by 2 three times (360 → 180 → 90 → 45), then by 3 twice (45 → 15 → 5), then 5 once (5 → 1). Result: 2³ × 3² × 5¹.
Worked example
Factorize 360:
360 ÷ 2 = 180
180 ÷ 2 = 90
90 ÷ 2 = 45
45 ÷ 3 = 15
15 ÷ 3 = 5
5 ÷ 5 = 1
Result: 360 = 2³ × 3² × 5
Limitations & notes
For very large numbers (above 10 million), trial division becomes slow. The calculator is optimized for integers up to 10,000,000. For cryptographic-scale numbers, specialized algorithms like Pollard's rho are required.
Frequently asked questions
What is the prime factorization of 1?
The number 1 has no prime factorization — it is neither prime nor composite by definition. Prime factorization applies only to integers greater than 1.
How many prime factors can a number have?
A number can have repeated prime factors. For example, 8 = 2³ has one distinct prime factor (2) but three total prime factors counting multiplicity.
Why is prime factorization useful?
Prime factorization is fundamental in computing GCD, LCM, simplifying fractions, and in cryptography — RSA encryption relies on the difficulty of factoring large numbers.
Is every number's factorization unique?
Yes — this is the Fundamental Theorem of Arithmetic. Every integer greater than 1 has exactly one prime factorization (ignoring order of factors).
What is the largest number this calculator can handle?
The calculator handles integers up to 10,000,000 efficiently. Beyond that, the trial division algorithm may slow down significantly.
Last updated: 2025-01-15 · Formula verified against primary sources.