Skip to main content
PF

Prime Factorization Calculator

Break any whole number down into its prime factors, shown with clean exponent notation like 2³ × 3².

Did you like the tool? Thanks!
Share:

How to Use Prime Factorization Calculator

Enter any whole number greater than 1. The calculator repeatedly divides by the smallest possible prime factor and displays the full factorization with proper superscript exponents for repeated primes, e.g. "360 = 2³ × 3² × 5".

About Prime Factorization Calculator

Prime factorization is the process of breaking a whole number down into the specific set of prime numbers that multiply together to produce it. Every whole number greater than 1 has one, and only one, prime factorization — a result so important it is called the Fundamental Theorem of Arithmetic. No matter which order you break a number down in, you always end up with the exact same set of prime factors (and their exponents). This uniqueness is what makes prime factorization such a powerful and reliable tool across mathematics, from simplifying fractions to modern cryptography. To find the prime factorization of a number by hand, repeatedly divide it by the smallest prime number that divides it evenly, and keep dividing the result by that same prime until it no longer divides evenly, then move on to the next prime. Let's factor 360. Start with the smallest prime, 2: 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45. Now 45 is odd, so 2 no longer divides it — we move to the next prime, 3: 45 ÷ 3 = 15, 15 ÷ 3 = 5. Now 5 is no longer divisible by 3, so we move to the next prime, 5: 5 ÷ 5 = 1. We've reached 1, so we're done. Along the way we divided by 2 three times and by 3 two times and by 5 once, so 360 = 2 × 2 × 2 × 3 × 3 × 5, which is more compactly written using exponents as 2³ × 3² × 5. That compact exponent notation is standard because repeated prime factors are extremely common, especially in "round" numbers with lots of factors like 360, 720, or 1,000. Writing out every repeated multiplication becomes unwieldy for larger numbers, so mathematicians write 2 × 2 × 2 as 2³ (read "two cubed" or "two to the third power"), where the small raised number, the exponent, tells you how many times that prime appears in the factorization. This calculator uses real superscript Unicode characters (like ² and ³) so the result reads exactly like it would in a textbook, rather than an awkward "2^3" typed with a caret. Prime factorization directly powers several other calculators on this site. The GCF and LCM calculators can, in principle, be computed by comparing the prime factorizations of two numbers (take the lowest shared exponent of each common prime for GCF, the highest exponent of every prime involved for LCM), though the Euclidean algorithm used by those tools is faster for large numbers. Simplifying a fraction to lowest terms is really just canceling out prime factors that the numerator and denominator share. Even the Prime Number Checker on this site is closely related: a number is prime precisely when its prime factorization contains only one prime, raised to the power of 1 — itself. A subtlety worth understanding is why the algorithm only needs to test candidate primes up to the square root of the remaining number at each step, exactly like the trial-division method used by the Prime Number Checker. Once you have divided out every small prime factor and the remaining value is still greater than 1, that remaining value must itself be prime — there is no need to keep testing further, because if it had any factor at all besides 1 and itself, that factor would have already been found by an earlier, smaller candidate prime. This is exactly why the factorization of a large prime number (like 9,973) terminates quickly: the algorithm tries dividing by 2, 3, 5, 7… up to about 99 (the square root of 9,973), finds nothing, and correctly concludes the number is entirely its own single prime factor. A common misconception is that only "special" numbers have interesting factorizations. In reality, every composite number has exactly one correct factorization, and finding it (rather than guessing or memorizing it) is precisely what this calculator automates.

Details & Tips

**Method:** Starting with the candidate divisor 2, repeatedly divide the number by the current candidate for as long as it divides evenly, counting how many times (the exponent). Move to the next candidate (3, 5, 7, 9, 11...) and repeat, stopping once the candidate squared exceeds the remaining value — whatever value is left over at that point (if greater than 1) is itself a prime factor with exponent 1. **Worked example 1:** Factor 100. 100 ÷ 2 = 50, 50 ÷ 2 = 25 (two divisions by 2, so 2² so far, remaining value 25). 25 is odd, so move to 3: 25 ÷ 3 is not exact, move to 5: 25 ÷ 5 = 5, 5 ÷ 5 = 1 (two divisions by 5, so 5²). Result: 100 = 2² × 5². **Worked example 2 (a prime number):** Factor 47. Testing 2, 3, 5 (since √47 ≈ 6.86, only need to check up to 6): none divide evenly. The remaining value, 47 itself, is greater than 1, so it is prime on its own. Result: 47 = 47 (displayed with no exponent, since 47 appears only once and there is nothing to factor it into). **How this calculator displays results:** Each prime factor is shown with a real superscript exponent (¹²³⁴⁵⁶⁷⁸⁹⁰) whenever it appears more than once, and with no exponent at all when it appears exactly once, matching standard textbook notation. Multiple distinct prime factors are joined with " × ", for example "84 = 2² × 3 × 7". **Edge cases handled:** - Input of 1, 0, or any negative number shows the hint "Enter an integer greater than 1," since prime factorization is only defined for whole numbers strictly greater than 1. - Non-integer input (like 12.5) is also rejected with the same hint, since factorization only applies to whole numbers. - Prime number input (like 97) correctly shows just that single number with no exponent and no additional factors, since a prime's only factorization is itself. - Numbers that are a single prime raised to a high power (like 128 = 2⁷) display cleanly with the correct large exponent. - Very large inputs are still factored correctly, though the process naturally takes marginally longer for large prime numbers, since every candidate divisor up to the square root must be tried before concluding the number itself is prime. **Practical tip:** Prime factorization is the fastest manual way to simplify a fraction: factor the numerator and denominator, cancel any prime factors they have in common, and multiply what remains. It is also directly useful for finding all the divisors of a number — every divisor is some combination of the prime factors raised to powers at or below their exponents in the factorization. For a related but different lookup — checking whether a single number is prime and finding just its smallest factor rather than the complete breakdown — use the companion Prime Number Checker on this site, which uses the same trial-division logic in a lighter-weight form.

Frequently Asked Questions

What is prime factorization?
It is breaking a whole number down into the specific set of prime numbers that multiply together to produce it.
Does every number have a unique prime factorization?
Yes, every whole number greater than 1 has exactly one prime factorization, a result known as the Fundamental Theorem of Arithmetic.
How do you read exponent notation like 2³?
It means the prime 2 is multiplied by itself 3 times: 2 × 2 × 2 = 8. The small raised number is called the exponent.
What is the prime factorization of a prime number?
A prime number's only prime factor is itself, raised to the power of 1, so it is displayed with no exponent at all.
Why can't I factorize 1?
Prime factorization is only defined for whole numbers greater than 1; 1 has no prime factors at all, since it is not itself prime.
How do I find the prime factorization of a large number?
Repeatedly divide by the smallest prime that divides evenly, moving to the next prime once the current one no longer divides — this calculator automates that process.
Can negative numbers have a prime factorization?
No, prime factorization applies only to positive whole numbers greater than 1 in standard mathematics.
How is prime factorization used to simplify fractions?
Factor the numerator and denominator into primes, cancel any shared prime factors, and multiply what remains for the simplified fraction.
What is the relationship between GCF, LCM, and prime factorization?
GCF and LCM can both be derived by comparing the prime factorizations of two numbers, taking the lowest or highest shared exponents respectively.
Why does the calculator only need to test up to the square root?
If a remaining value still has a factor after all smaller candidates are tried, and none up to its square root worked, the remaining value must itself be prime.
What does the superscript number mean in the result?
It shows how many times that particular prime factor appears in the factorization — for example, 3² means the prime 3 appears twice.

Also Available As

prime factorization, factor tree calculator, prime factors calculator, decompose number into primes, factorization tool, prime decomposition

Found a Problem?

Let us know if something with Prime Factorization Calculator isn't working as expected.

Thanks — we'll take a look.