Every whole number bigger than 1 breaks down into a specific set of prime numbers, and finding that set is called prime factorization. This calculator takes any number you enter and works out that exact breakdown for you, showing the primes on their own, in exponent form, and as a factor tree so you can see exactly how the answer was reached. Below, we walk through what prime factorization actually means, how the calculator arrives at its answer, and how to do the same thing by hand using the two methods most people learn in school. Toward the end, we also look at how a single prime factorization feeds into other calculations you might need next, such as finding a GCF, an LCM, or simplifying a fraction.
What Does Prime Factorization Mean?
Prime factorization is simply writing a number as a product of prime numbers only. Take 60 as an example. It breaks down into 2 x 2 x 3 x 5, and every number in that list is prime, meaning none of them can be split any further. This idea rests on something mathematicians call the Fundamental Theorem of Arithmetic, which states that any number above 1 has exactly one such breakdown. It does not matter which order you multiply the primes in or which method you use to get there, you will always land on the same set of primes for a given number. That is one of the more reassuring things about this topic. Once you have the correct prime factorization, there is no other valid version sitting somewhere else, so if your answer matches, you know you got it right.
It is worth noting early that 1 does not count here. Since 1 only has one factor, itself, it fails the basic prime definition, so it never shows up as part of any prime factorization, no matter what number you are working with.
How Is a Prime Factor Different From a Regular Factor?
This is probably the single question that trips people up the most. Every number has factors, which are just any numbers that divide it evenly. Take 18. Its full list of factors is 1, 2, 3, 6, 9, and 18. But its prime factors are only 2 and 3, because those are the only two numbers on that list that are themselves prime. So prime factors are always a smaller subset sitting inside the bigger list of regular factors. If you are ever unsure whether you have found the full factorization or just one possible split, check whether every number in your answer is prime. If even one of them can still be divided further, you are not done yet.
Type | Numbers |
All Factors of 18 | 1, 2, 3, 6, 9, 18 |
Prime Factors of 18 | 2, 3 |
How Does This Prime Factorization Calculator Work?
Behind the scenes, the calculator does essentially what a person would do by hand, just without the risk of a small arithmetic slip. It starts testing the number against the smallest prime, 2, and keeps dividing as many times as that prime fits evenly. Once 2 no longer divides the number cleanly, it moves on to the next prime, 3, then 5, then 7, and so on, repeating the same process. This continues until whatever is left over is itself a prime number, at which point the factorization is complete. The calculator does not guess or skip steps, it works through the same logical sequence a careful student would use with pencil and paper, just at a speed no person could match once the numbers get larger.
What Input Limits Does the Calculator Support?
Like any tool built around trial division, this calculator has a practical ceiling on how large a number it can factor quickly. Some well known calculators cap their input around 10 trillion, which works out to 13 digits, while a few others accept numbers up to roughly nine quadrillion before results start slowing down. For homework, coursework, or general curiosity, numbers of that size cover pretty much everything you would realistically need. If you are working with something dramatically larger, like the kind of numbers used in cryptography research, dedicated tools built around methods such as the elliptic curve method or the quadratic sieve are a better fit, since plain trial division becomes impractical once a number's smallest prime factor is unusually large.
What Do the Calculator's Results Include?
When you enter a number, you will get three things back. First, the plain list of prime factors, written out in order, something like 2, 2, 3, 5. Second, the same result condensed into exponent form, so that list becomes 2^2 x 3 x 5. Third, a factor tree, which lays the same information out visually, branch by branch, so you can see how the number was split down to its primes. Showing all three matters because different people need different things from this page. A student checking homework might specifically need the exponent form because that is what their teacher marks. Someone doing a quick mental check just wants the plain list. The tree helps when you want to actually follow the logic rather than just read an answer off a screen.
How Do You Find Prime Factors by Hand?
There are two standard ways to do this without a calculator, and most textbooks teach both. One is the division method, sometimes called the ladder method, and the other is the factor tree. They will always give you the exact same set of prime factors in the end, they just get there by laying the work out differently on paper. Which one you use usually comes down to preference, or whichever your class happens to teach first.
How Does the Division (Ladder) Method Work?
This method works by dividing the number by the smallest prime that fits evenly, writing the result underneath, and repeating with the next smallest prime each time the previous one stops working. Let's walk through 60 as an example.
β 60 divided by 2 is 30
β 30 divided by 2 is 15
β 15 is no longer divisible by 2, so move to 3
β 15 divided by 3 is 5
β 5 is itself prime, so the process stops here
Putting that together, 60 = 2 x 2 x 3 x 5. You know you are finished the moment your last quotient is a prime number on its own, since a prime cannot be divided any further.
How Does the Factor Tree Method Work?
A factor tree starts the same way, but instead of a straight line of division, you branch the number into any two factors you like, then keep branching each non-prime branch until every branch ends in a prime. Let's use 48 this time. Split it into 8 and 6 to start. Then 8 splits into 4 and 2, and 4 splits again into 2 and 2. Meanwhile 6 splits into 2 and 3. Circle every prime as you reach it, and once nothing is left un-split, read the primes off the bottom of the tree: 2, 2, 2, 2, 3, or 2^4 x 3. You could have started this same number with a completely different split, say 4 and 12, and you would still land on the exact same primes at the end. That is the Fundamental Theorem of Arithmetic doing its job.
How Do You Write a Prime Factorization Using Exponents?
Once you have your full list of primes, exponent form is just a shorthand for how many times each one shows up. If a number's factorization comes out to 2 x 2 x 2 x 3 x 3, you count three 2's and two 3's, and write it as 2^3 x 3^2. Any prime that only appears once is usually left without an exponent at all, so 2 x 5 stays as 2 x 5 rather than 2^1 x 5^1. This is the notation most US classrooms expect on a graded answer, so it is worth getting comfortable with even if the plain list feels more intuitive at first.
Number | List Form | Exponent Form |
36 | 2 x 2 x 3 x 3 | 2^2 x 3^2 |
100 | 2 x 2 x 5 x 5 | 2^2 x 5^2 |
72 | 2 x 2 x 2 x 3 x 3 | 2^3 x 3^2 |
How Do You Know a Prime Factorization Is Complete and Correct?
There is a neat shortcut for knowing when you can stop testing primes, and it comes from a simple fact: if a number has a factor pair, the smaller number in that pair can never be larger than the square root of the original number. In practical terms, that means once you have tested every prime up to the square root of your number and none of them divide it evenly, whatever is left over has to be prime itself, and you are done. Take 97 as an example. Its square root is just under 10, so you only need to test 2, 3, 5, and 7. None of them divide 97 evenly, which tells you immediately that 97 is prime, without needing to check anything higher.
Beyond that shortcut, there is an easy way to double check any answer you get, by hand or from a calculator: multiply all the listed prime factors back together and confirm you land on your original number. If you do, your factorization is right. If you do not, something got missed or miscounted along the way.
What Common Mistakes Happen During Prime Factorization?
A handful of errors come up again and again, and most of them are easy to avoid once you know what to look for.
β Stopping a factor tree too early and leaving a composite number sitting in the final answer, rather than splitting it down the rest of the way.
β Assuming an odd number is automatically prime just because it is not divisible by 2. Numbers like 9, 15, and 21 are all odd and all composite.
β Mixing up how exponents combine, rather than simply counting how many times a prime actually appears in the list.
β Losing track of the square root rule and testing far more primes than necessary, or stopping too soon and missing a larger prime factor.
β Accidentally including 1 in a list of prime factors, when it should never appear there at all.
None of these mistakes are complicated once you are aware of them, but they are worth double checking against, especially the stopped too early one, since it is by far the most common.
How Does Prime Factorization Connect to Other Math Tools?
On its own, prime factorization answers one specific question, what primes make up this number. But in practice, it is rarely the final destination. Once you have a number broken down into its primes, that breakdown becomes the starting point for several other calculations, finding the greatest common factor or least common multiple of two numbers, reducing a fraction to its simplest form, or simplifying a square root that does not come out to a whole number. Each of these builds directly on the same prime factorization work you have just done, so if you are heading toward one of those next, you do not need to start over from scratch.
How Do You Use Prime Factorization to Find the GCF of Two Numbers?
To find a greatest common factor, you take the prime factorization of both numbers, then multiply together only the primes they share, using the lower of the two exponents each time. For 24 and 36, the factorizations are 2^3 x 3 and 2^2 x 3^2. They share 2 and 3, so you take the lower exponent for each, 2^2 and 3^1, giving a GCF of 12.
If you would rather try this with your own numbers instead of working it out by hand, the GCF calculator will run the same comparison instantly and show the shared primes side by side.
How Do You Use Prime Factorization to Find the LCM of Two Numbers?
The least common multiple works almost the same way, except you take every prime that shows up in either number, each raised to the higher of the two exponents. Sticking with 24 and 36, both share 2 and 3, so you take 2^3, the higher exponent from 24, and 3^2, the higher exponent from 36, multiplying them out to get an LCM of 72.
If you would rather skip the manual multiplication, the LCM calculator handles any pair of numbers and lays out the working for you.
How Does Prime Factorization Help Simplify a Fraction?
Fractions reduce to their simplest form once you cancel out whatever prime factors the numerator and denominator have in common. Take 18/24. Breaking both down, 18 is 2 x 3 x 3 and 24 is 2 x 2 x 2 x 3. They share a 2 and a 3, so cancelling those out leaves 3/4. This approach works reliably every time, unlike guessing at a common factor, since prime factorization guarantees you have found every shared piece, not just the first one you happened to notice.
If you would rather have this done for you on any fraction, the fraction calculator reduces it and shows each cancelled step.
How Does Prime Factorization Help Simplify a Square Root?
Square roots simplify the same way, by writing the number under the root sign as a prime factorization and pulling out any prime that shows up in a matched pair. Take the square root of 72. Its factorization is 2^3 x 3^2, which can be rewritten as 2^2 x 2 x 3^2. Both the 2^2 and the 3^2 are matched pairs, so they come out from under the root as a 2 and a 3, leaving a single unmatched 2 behind. That gives you 6 times the square root of 2.
If you want to check this against a different number, the square root calculator walks through the same simplification with its own worked steps.


