Prime Factorization Calculator
Enter a whole number and we split it into prime factors. You also get a quick answer to "is it prime?" and how many divisors it has.
Be the first to rate this tool
The formula
n = p1^a x p2^b x ... where each p is prime. Number of divisors = (a + 1)(b + 1)...
What prime factorization means
Every whole number above 1 is either prime or can be built by multiplying primes together, and there is only one way to do it. 360 = 2 x 2 x 2 x 3 x 3 x 5, written as 2^3 x 3^2 x 5.
How to do it by hand
Divide by the smallest prime that fits, then keep going with the result. 360 / 2 = 180, / 2 = 90, / 2 = 45, then 2 no longer fits so try 3: 45 / 3 = 15, / 3 = 5, and 5 is prime. That is where the factor tree in your textbook ends up.
What you can do with it
- Find the GCF and LCM of several numbers.
- Simplify fractions with big numerators.
- Count the divisors of a number: for 360 it is (3 + 1)(2 + 1)(1 + 1) = 24.
- Check for perfect squares: every exponent is even.
Limits
We accept whole numbers from 2 up to 1,000,000,000,000. Beyond that, trial division becomes slow in a browser. Factoring very large numbers is exactly the problem that modern encryption relies on being hard.
Examples to check
Type these into the calculator above to see how it behaves. Every result below was produced by the same calculator code that runs on this page.
| What you enter | What you get |
|---|---|
| Whole number (2 to 1,000,000,000,000): 360 | Prime factorization: 2^3 x 3^2 x 5 |
| Whole number (2 to 1,000,000,000,000): 97 | Prime factorization: 97 |
| Whole number (2 to 1,000,000,000,000): 1001 | Prime factorization: 7 x 11 x 13 |
| Whole number (2 to 1,000,000,000,000): 12345 | Prime factorization: 3 x 5 x 823 |
Prime Factorization Calculator: frequently asked questions
Is 1 a prime number?
No. A prime has exactly two divisors, 1 and itself, and 1 has only one. That convention keeps factorization unique.
Is 2 really prime?
Yes, and it is the only even prime. Every other even number is divisible by 2.
How accurate is this calculator?
It uses standard double-precision arithmetic, accurate to about 15 significant digits. Results are rounded only for display.
Is what I enter in this calculator saved or sent anywhere?
No. The calculation runs in your browser, so what you enter is not sent to our servers. We only count, anonymously, whether a tool ran successfully.
Is this calculator free to use?
Yes. It is free, needs no sign-up and has no usage limit.
Last reviewed: October 3, 2026