Prime Factorization Calculator
Enter a whole number to write it as a product of primes, see the exponent form and find out whether the number is prime.
How it works
The number is divided by 2, then 3, then each larger candidate while it divides exactly. Each prime found is a factor. When the remaining number is 1, the factorization is complete.
Worked example
Using the default values: Whole number = 1260.
The calculator returns: Prime factorization: 2 × 2 × 3 × 3 × 5 × 7; Exponent form: 2^2 × 3^2 × 5 × 7; Number of prime factors (with repeats): 6; Distinct primes: 4; Is 1,260 prime?: No.
Limits and assumptions
- Works up to 9,007,199,254,740,991 (253 − 1).
- Numbers with very large prime factors may take a few seconds.
- The number 1 has no prime factors and is neither prime nor composite.
Frequently asked questions about the Prime Factorization Calculator
Is the factorization unique?
Yes. The fundamental theorem of arithmetic says every whole number above 1 has exactly one prime factorization, apart from the order.
What is a prime number?
A whole number above 1 with no divisors other than 1 and itself.
Why does it stop at the square root?
If a number has a factor larger than its square root, it must also have a smaller one, so testing up to the square root is enough.