Prime Factorization Calculator
Enter a whole number of 2 or more and press Factorize. The calculator writes it as a product of primes with exponents, such as 2^3 × 3^2 × 5 for 360, and lists the distinct primes below. It is exact up to 9,007,199,254,740,991 (2⁵³ − 1), the limit up to which a browser stores every whole number exactly. A decimal such as 12.5, a negative number, 0, 1 or a number above that limit gets a message instead of a factorization. The calculator never cuts 12.5 down to 12.
How to use the Prime Factorization Calculator
- Enter your numbers in the Prime Factorization Calculator above.
- Press the Factorize button to see the result.
- To try other numbers, change any value and press the button again.
The prime factorization process
Divide n by d = 2, 3, 4, 5, … while d × d ≤ n · · · each time d divides n, record d and divide it out · · · whatever is left above 1 is prime
Every integer greater than 1 has exactly one prime factorization (the Fundamental Theorem of Arithmetic). Trial division is simple but slow for very large numbers, and faster methods such as Pollard rho exist.
Worked example
360 = 2 × 180 = 2 × 2 × 90 = 2³ × 45 = 2³ × 3² × 5. The calculator shows 2^3 × 3^2 × 5 and the primes 2, 3 and 5. 1,000 shows as 2^3 × 5^3. 17 is prime, so it shows as 17.
Frequently asked questions
What about negative numbers, 0 and 1?
None of them has a prime factorization, so the calculator shows a message. 0 is divisible by every prime, and 1 is the product of no primes. A negative number is not a product of primes, but you can write it as −1 times the factorization of its positive value. For −360 the message shows −360 = −1 × 2^3 × 3^2 × 5.
Why is prime factorization unique?
The Fundamental Theorem of Arithmetic guarantees that every integer above 1 has exactly one prime factorization, up to the order of factors. This uniqueness underlies much of number theory.
What's the largest known prime?
As of October 20, 2026, mersenne.org lists 2^136,279,841 − 1 as the largest known prime. It has 41,024,320 digits, and the Great Internet Mersenne Prime Search (GIMPS) announced it in October 2024. It is far too large for this calculator.
How is this used in cryptography?
RSA encryption relies on how hard it is to factor the product of two large primes. A 2048-bit RSA modulus has 617 digits, far beyond what trial division, the method this calculator uses, can factor.