What Is Prime Factorization? Definition, Methods and Worked Examples
Updated: 2026-09-29
Prime factorization is the answer to a simple question: which prime numbers multiply together to make this number? Take 48 — it is 2 × 2 × 2 × 2 × 3, and no other set of primes does the job. That single idea is what this guide unpacks: the exact definition, why the answer is always unique, the two hand methods everyone is taught, seven numbers worked step by step (18, 24, 30, 36, 48, 72 and 84), and the mistakes that turn up in almost every homework attempt.
The short answer
The prime factorization of a whole number is the way of writing it as a product of prime numbers — the primes that multiply together to give it exactly, each one repeated as many times as it divides. The prime factorization of 12 is 2 × 2 × 3, usually written 2^2 × 3. The prime factorization of 48 is 2 × 2 × 2 × 2 × 3, written 2^4 × 3. Once every factor in the product is prime, the job is finished, because nothing further can be broken down.
Both halves of the phrase carry weight. “Factorization” means splitting a number into factors that multiply back to it, and a number has many factorizations: 48 = 6 × 8 = 4 × 12 = 3 × 16. “Prime” is what makes the answer single-valued — only one of those splits consists entirely of primes, and only one such split exists. If you write 3 × 16 you have factored 48 but you have not finished, because 16 is still composite and is itself 2^4.
In a math class the term shows up because it is the machinery underneath several things you are asked to compute: the greatest common factor, the least common multiple, reducing fractions to lowest terms, and simplifying square roots. Outside class it is the arithmetic that RSA encryption and much of modern cryptography are built on, which is why “hard to factor large numbers” matters at all.
- In math: the complete multiplicative breakdown of a number into primes, repeats included.
- Of a number: divide repeatedly by primes until you reach 1; the primes you divided by are the answer, gathered into powers.
- Of 18: 2 × 3^2 · Of 24: 2^3 × 3 · Of 30: 2 × 3 × 5 · Of 36: 2^2 × 3^2
- Of 48: 2^4 × 3 · Of 72: 2^3 × 3^2 · Of 84: 2^2 × 3 × 7
First, what makes a number prime
A prime number is a whole number greater than 1 that has exactly two positive divisors: 1 and itself. The primes below 30 are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Everything above 1 that is not on that list is called composite, because it can be built by multiplying smaller numbers: 15 = 3 × 5, 21 = 3 × 7, 25 = 5 × 5, 27 = 3 × 3 × 3.
The one that trips people up is 1. It is not prime, and that is not an arbitrary rule. Under the definition above, 1 has only one positive divisor — itself, which is also 1 — so it fails the “exactly two divisors” test immediately. But the deeper reason is what happens to factorization if you let 1 in: 12 could then be written as 2^2 × 3, or 1 × 2^2 × 3, or 1 × 1 × 2^2 × 3, with as many 1s as you like. The prime factorization would stop being unique, and the whole point of the concept is that it is a single, canonical breakdown. So 1 is given its own category: neither prime nor composite.
The other prime worth pausing on is 2. It is the only even prime, because every other even number is divisible by 2 and therefore composite. That single fact shapes the method: you always strip the 2s out first by halving repeatedly, and from 3 onward every prime you test is odd. If a number never divides by 2, it is odd, and its entire factorization is made of odd primes.
Why there is exactly one prime factorization
The statement that every whole number greater than 1 can be written as a product of primes, and can be written that way in only one way apart from the order of the factors, is called the Fundamental Theorem of Arithmetic. Existence is the easy half: if your number is prime you are done, and if it is composite you split it, then split the parts, and since the pieces keep getting smaller you cannot do that forever — you must land on primes. Uniqueness is the genuinely deep half, and it is a theorem about the integers that Euclid already had the tools to prove: if a prime divides a product, it divides one of the factors, which forces any two prime products of the same number to match up factor by factor.
This is why “the” prime factorization is a well-defined object. It does not matter that one person writes 48 = 6 × 8 and another writes 48 = 2 × 24 — simplify either and both give 2^4 × 3, four 2s and a single 3. What varies is only the order you list the primes in, which is why the standard form collects equal primes into powers and lists them ascending: 2^4 × 3, never 3 × 2^4 or 2 × 3 × 2^3.
Uniqueness is also what makes the factorization useful as information rather than as one of several answers. Because the prime powers are fixed, they encode everything multiplicative about the number: how many divisors it has, whether it is a perfect square, what it shares with any other number, what its square or cube root simplifies to. A prime factorization is not a chore — it is a complete description.
Method 1 and method 2: factor tree vs division ladder
There are two standard ways to find a prime factorization by hand, and both always reach the same answer because the answer is unique. Which one to use is a matter of the number in front of you and how you like to work, so it is worth knowing both — school curricula tend to teach one and then test with the other, and autocomplete queries about “factor tree” and “lattice/boating method” are really asking about the same result by two routes.
The difference in practice is discipline versus freedom. The factor tree lets you take any easy split you spot, which is faster when you can see one, but leaves you to collect and count the primes yourself at the end. The ladder insists you go smallest-prime-first, which is slower step by step but produces the answer already sorted, with nothing to lose. Below, each is worked on the same number so you can compare the shape of the output.
The factor tree
Write the number at the top, split it into any two factors, then split each composite factor the same way until every branch ends on a prime. Those primes at the bottom of the tree are the factorization. For 48: split into 6 and 8; 6 splits into 2 × 3, both prime, so those branches stop; 8 splits into 2 and 4, and 4 splits into 2 × 2. The leaves are 2, 3, 2, 2, 2 — four 2s and one 3 — so 48 = 2^4 × 3.
The freedom to choose the split is the strength. Starting 48 = 4 × 12 instead gives leaves 2, 2 and then 2, 2, 3: the same multiset, because uniqueness guarantees it. The weakness is bookkeeping. The leaves come out scattered and unsorted, so you have to count them yourself and convert that count into exponents, and on a big tree it is easy to overlook one branch. It is also easy to stop on a number you assumed was prime — 51 (which is 3 × 17), 57 (3 × 19), 87 (3 × 29) and 91 (7 × 13) are the classic look-alikes, none of them prime.
The ladder, or repeated division
The ladder method is mechanical: divide by the smallest prime that divides the number, write the quotient underneath, and repeat until the quotient is 1. The primes down the side of the ladder are the factorization, already in ascending order. For 48: 48 ÷ 2 = 24, then 24 ÷ 2 = 12, then 12 ÷ 2 = 6, then 6 ÷ 2 = 3, then 3 ÷ 3 = 1. Read down the left: four 2s and one 3, so 48 = 2^4 × 3.
Because you never move to a larger prime until the current one stops dividing, nothing can be missed and nothing can be left composite — a composite divisor would have a smaller prime factor, which you already removed. The cost is that numbers with a large power of 2 need many lines: 48 alone takes five. For anything over a few thousand, the division ladder is what you want displayed step by step rather than reconstructed from a tree, which is exactly how the calculator linked at the end of this page presents its result.
Which one to use
Use the tree when the number has an obvious friendly split — 84 = 4 × 21 is easy to see, and 4 and 21 are both quick to finish. Use the ladder when you have no idea, when the number is large, or when you need the exponents to come out right without recounting. In an exam setting, the ladder is the safer default for larger inputs precisely because it is boring.
One tip that applies to both: circle or underline each prime as you find it. In a tree, crossing out a branch you have finished prevents re-splitting it; in a ladder, keeping a running list of divisors means you can multiply back at the end and catch an arithmetic slip immediately.
Divisibility rules that make it fast
The ladder only runs quickly if you can tell, without long division, whether a prime divides the number in front of you. These tests are exact, not heuristics, and they cover the small primes you will actually use. They also tell you when to stop: once your quotient is a number you recognise as prime, you are finished — the general stopping test is that if no prime up to the square root of a number divides it, that number is prime.
For the quotients you get in practice, 2, 3 and 5 do most of the work, because they divide so often. Digit sums are the second most useful trick to know: they turn the tests for 3 and 9 into mental arithmetic, and a number that fails both is still not necessarily prime, it just has no factor of 3 in it.
- Divisible by 2: the last digit is even — 0, 2, 4, 6 or 8.
- Divisible by 3: the digits sum to a multiple of 3. For 84, 8 + 4 = 12, so 3 divides it.
- Divisible by 4: the last two digits form a number divisible by 4. 48 ends in 48, and 48 ÷ 4 = 12.
- Divisible by 5: the last digit is 0 or 5.
- Divisible by 9: the digits sum to a multiple of 9. 72 gives 7 + 2 = 9, so 9 divides it — and so does 3.
- Divisible by 6: divisible by both 2 and 3.
- Divisible by 10: the last digit is 0, which means the number contains both 2 and 5.
Worked examples, number by number
These are the numbers people actually look up, worked with the ladder so you can see every line. Each one ends with the answer in standard form and a check: the divisor count that follows from the exponents, which is a fast way to confirm you did not lose a factor. If you would rather not do the divisions yourself, the calculator in the section at the end produces this same ladder for any number up to 10^14.
Notice how different the shapes are. Some are almost pure powers of 2 (24, 48), some are balanced across two primes (36, 72), one is a product of three distinct primes with nothing repeated (30), and one brings in 7 (84). Reading the pattern of exponents is half of what makes prime factorization useful.
Prime factorization of 18
18 is even, so divide by 2: 18 ÷ 2 = 9. Nine is not divisible by 2, so move to 3: 9 ÷ 3 = 3, then 3 ÷ 3 = 1. The divisors used are 2, 3 and 3, so 18 = 2 × 3^2. The exponents are 1 and 2, so the divisor count is (1 + 1) × (2 + 1) = 6: 1, 2, 3, 6, 9 and 18.
Prime factorization of 24
Keep halving: 24 ÷ 2 = 12, 12 ÷ 2 = 6, 6 ÷ 2 = 3, and 3 ÷ 3 = 1. Three 2s and one 3, so 24 = 2^3 × 3. Check by multiplying back: 8 × 3 = 24. The divisor count is (3 + 1) × (1 + 1) = 8, namely 1, 2, 3, 4, 6, 8, 12 and 24.
24 is a good example of why repeated division is worth the lines: the 2s run out only after three steps, and stopping early would leave you with something like 2 × 12, which is a correct factorization but not a prime one.
Prime factorization of 30
30 ÷ 2 = 15; 15 is odd, so 15 ÷ 3 = 5; and 5 is prime, so 5 ÷ 5 = 1. Hence 30 = 2 × 3 × 5. Every prime appears exactly once, which makes 30 squarefree — no factor divides it twice, and its square root does not simplify at all.
It is also the smallest number that is the product of three distinct primes, and it has 2 × 2 × 2 = 8 divisors: 1, 2, 3, 5, 6, 10, 15 and 30. Because 30 contains both 2 and 5, it is divisible by 10, which is the same fact written differently.
Prime factorization of 36
36 ÷ 2 = 18, 18 ÷ 2 = 9, then 9 ÷ 3 = 3, then 3 ÷ 3 = 1. Two 2s and two 3s, so 36 = 2^2 × 3^2. Every exponent here is even, which is exactly what it means for a number to be a perfect square: 36 = 6^2, and √36 = 2 × 3 = 6.
The divisor count follows as (2 + 1) × (2 + 1) = 9 — an odd number of divisors, which happens only for perfect squares, because divisors otherwise pair up and the pair 6 × 6 is the one that does not advance to a new value. The nine divisors are 1, 2, 3, 4, 6, 9, 12, 18 and 36.
Prime factorization of 48
The full ladder: 48 ÷ 2 = 24, 24 ÷ 2 = 12, 12 ÷ 2 = 6, 6 ÷ 2 = 3, and finally 3 ÷ 3 = 1. That is four 2s and one 3, so 48 = 2^4 × 3. Multiplying back as a check: 16 × 3 = 48.
A factor tree gets there too and looks different on the way: 48 splits into 6 and 8, then 6 into 2 × 3 and 8 into 2 × 4 with 4 into 2 × 2, leaving the leaves 2, 3, 2, 2, 2 — the same four 2s and one 3. With exponents 4 and 1, the divisor count is (4 + 1) × (1 + 1) = 10: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48.
Prime factorization of 72
72 ÷ 2 = 36, 36 ÷ 2 = 18, 18 ÷ 2 = 9, 9 ÷ 3 = 3, 3 ÷ 3 = 1. Three 2s and two 3s, so 72 = 2^3 × 3^2, and 8 × 9 = 72 confirms it. The divisor count is (3 + 1) × (2 + 1) = 12: 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36 and 72.
The quick route with a tree is 72 = 8 × 9, and both of those are already familiar prime powers — 2^3 and 3^2 — so you can write the answer straight out. That is the argument for memorising the small prime powers: spotting 8 × 9, 16 × 3 or 4 × 9 saves several division lines.
72 also shows why this breakdown is used to simplify radicals: 2^3 × 3^2 = 2^2 × 3^2 × 2 = 36 × 2, so √72 = 6√2.
Prime factorization of 84
84 ÷ 2 = 42, 42 ÷ 2 = 21, and 21 is odd so 21 ÷ 3 = 7, and 7 is prime so 7 ÷ 7 = 1. Two 2s, one 3 and one 7: 84 = 2^2 × 3 × 7. Check: 4 × 3 × 7 = 84. The divisor count is (2 + 1) × (1 + 1) × (1 + 1) = 12 — 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42 and 84.
The tree route is 84 = 4 × 21, which splits cleanly into 2 × 2 and 3 × 7 and gives the answer in two levels. Note the digit-sum test doing its job at the middle step: 8 + 4 = 12, and 12 is divisible by 3, so you know before dividing that 3 goes into 84.
What you can do once you have it
The reason this is taught rather than skipped is that most multiplicative questions become arithmetic on exponents once both numbers are factorized. For the greatest common factor, take every prime that appears in both and use the smaller exponent: with 48 = 2^4 × 3 and 36 = 2^2 × 3^2, the shared primes give 2^2 × 3 = 12. For the least common multiple, take every prime that appears in either and use the larger exponent: 2^4 × 3^2 = 144, which is indeed the smallest number both 48 and 36 divide.
Reducing a fraction is the same operation viewed differently. 48/36 becomes (2^4 × 3)/(2^2 × 3^2); cancel the shared 2^2 and one 3 and you are left with 2^2/3 = 4/3, with no guessing whether 6 or 12 was the biggest thing you could divide by. And for radicals, a square root simplifies whenever an exponent is at least 2: √72 = √(2^3 × 3^2) = 2 × 3 × √2 = 6√2, while √30 = √(2 × 3 × 5) has nothing to take out because all three exponents are 1.
The exponents also answer structural questions. The number of divisors is the product of each exponent plus one — for 72 that is (3 + 1)(2 + 1) = 12 — and that product is odd exactly when the number is a perfect square, since only then are all exponents even. Two numbers with no prime in common are coprime, which is what “no common factor to cancel” means precisely.
At the far end of the scale, factoring is the hard problem rather than the routine one. Multiplying two primes is instant; recovering them from a product hundreds of digits long is not feasible, and that asymmetry is the foundation RSA encryption rests on. The jump from 48 to real cryptography is difficulty, not definition — the concept you just practised is the same concept.
Common mistakes
Stopping one level short. The most frequent error by far: writing 36 = 6 × 6, or 24 = 4 × 6, or 48 = 6 × 8 and calling it done. Those are factorizations, not prime factorizations — 4, 6 and 8 are all composite and still break down. The test is simple: look at every factor you wrote and ask whether it is on the prime list. If any of them is 4, 6, 8, 9, 10, 12, 14, 15, 16, 21, 25 or anything else composite, keep going.
Assuming a factor is prime when it is not. The reverse error, and nastier because it looks like a complete answer. Numbers like 51, 57, 87, 91, 111 and 119 all have small hidden factors — 91 is 7 × 13, 119 is 7 × 17 — and none are on the prime list. If you are unsure about a factor, test divisibility by 2, 3, 5 and 7 in particular; if none of them up to the square root of the number divide it, then it really is prime.
Losing a repeated prime. Writing 72 = 2^3 × 3 instead of 2^3 × 3^2, or 18 = 2 × 3 instead of 2 × 3^2. The primes that divide a number do so as many times as they divide, so a factor that appears twice has to appear twice in the product. The reliable cure is to multiply your answer back out at the end — 8 × 3 = 24 is not 72, and the check catches it in two seconds.
Counting 1 as a prime, or writing it into the answer. Neither is harmless: 1 is not prime, and including it means the factorization is no longer unique, since you can append any number of 1s. Standard form never contains a 1.
Sorting the answer wrongly. 3 × 2^4 is mathematically the same product as 2^4 × 3, so it is not an error in content, but teachers and answer keys expect ascending primes with equal primes collected into powers. Write 2^4 × 3.
Trying to factor a number that is already prime. 17 = 17; its prime factorization is itself, which is a legitimate answer and not a sign that you failed to do something. And the question has no answer at all for 0 or 1 — neither has a prime factorization — so check what the number actually is before starting the ladder.
Doing it in the browser
For anything past two or three division lines, a calculator is the right tool, and it should show its work rather than just the product — a bare answer teaches you nothing, whereas a division ladder you can read side by side with your own is a fast way to check a homework method. The Prime Factorization Calculator linked here takes any number up to 10^14 and returns the prime product in superscript form, such as 2^4 × 3 for 48, alongside the complete ladder of divisions that produced it.
It also returns two things people rarely expect and frequently need: the divisor count and the full list of divisors. For 72 that is 12 divisors enumerated explicitly, which is how you verify a “how many factors does N have” question without writing pairs out by hand, and a primality badge that resolves the “is this factor actually prime?” judgement call on any input — including the awkward ones like 91.
There is a batch mode for factoring several numbers in one pass, which is what you want when simplifying a list of radicals or reducing a set of fractions, and it is how the examples in this guide were cross-checked. Everything runs in the page itself, so the numbers you enter stay on your device and the tool works without a server doing the arithmetic.
Learning by hand still matters, because the method is what exams test and what makes the output meaningful. The sensible workflow is to do the ladder yourself on a scrap of paper, then confirm against the tool's ladder — the two should match line for line, and if they do not, the disagreement tells you exactly where your arithmetic went wrong.
Frequently asked questions
What is prime factorization in math?
It is the expression of a whole number greater than 1 as a product of prime numbers, with each prime repeated as many times as it divides. For example, 48 = 2^4 × 3 and 84 = 2^2 × 3 × 7. In math it is treated as the number's multiplicative fingerprint, because the Fundamental Theorem of Arithmetic says that product is unique apart from the order of the factors — which is why it can be used to compute greatest common factors, least common multiples, and to reduce fractions and simplify radicals reliably.
How do you find the prime factorization of a number?
Divide by the smallest prime that goes in, take the quotient, and repeat until you reach 1; the primes you divided by, collected into powers, are the answer. With 48 that is 48 ÷ 2 = 24, 24 ÷ 2 = 12, 12 ÷ 2 = 6, 6 ÷ 2 = 3, and 3 ÷ 3 = 1, giving four 2s and one 3, or 2^4 × 3. The alternative is a factor tree, where you split the number into any two factors and keep splitting composites until every branch ends on a prime — both methods always give the same product.
What is the prime factorization of 48?
48 = 2^4 × 3, that is 2 × 2 × 2 × 2 × 3. Multiplying back gives 16 × 3 = 48, and from those exponents you get (4 + 1) × (1 + 1) = 10 divisors: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48. Be careful not to leave the answer as 6 × 8 or 4 × 12 — both are true factorizations, but 4, 6, 8 and 12 are composite, so the job is unfinished.
What are the prime factorizations of 36, 24, 18 and 30?
36 = 2^2 × 3^2, 24 = 2^3 × 3, 18 = 2 × 3^2 and 30 = 2 × 3 × 5. Notice the differences: 36 has all even exponents, which is what makes it a perfect square (6^2); 24 and 18 differ only in how many 2s they contain; and 30 is squarefree, with each of its three primes appearing exactly once, so its square root cannot be simplified.
What is the prime factorization of 72 and of 84?
72 = 2^3 × 3^2, and 84 = 2^2 × 3 × 7. Quick checks: 8 × 9 = 72 and 4 × 3 × 7 = 84. Each has exactly 12 divisors, computed from the exponents as (3 + 1) × (2 + 1) and (2 + 1) × (1 + 1) × (1 + 1) respectively, which is a useful coincidence to remember — two numbers can have the same number of divisors while sharing very few of them.
Why is 1 not a prime number?
A prime has exactly two distinct positive divisors, 1 and itself, and 1 has only one — so it fails the definition outright. The rule also protects the thing you actually care about: if 1 counted as prime, then 12 could be written as 2^2 × 3, or 1 × 2^2 × 3, or with any number of extra 1s, and no number would have a unique prime factorization. For the same reason 0 has no prime factorization at all, since every prime divides 0.
What is the difference between factors and prime factorization?
The factors of a number are every whole number that divides it, including 1 and the number itself, composite ones included — the factors of 12 are 1, 2, 3, 4, 6 and 12. The prime factorization is the product of just the prime ones, written with exponents: 12 = 2^2 × 3. One is a list you count, the other is a multiplication that rebuilds the number, and the second is what determines the first.
Does every number have a prime factorization?
Every integer greater than 1 does, and that is half of the Fundamental Theorem of Arithmetic. A prime is its own case — the prime factorization of 17 is simply 17 — while 1 and 0 are excluded by definition. For negative integers the usual convention is to factor out −1 and factorize the positive part, so −48 = −1 × 2^4 × 3.
What is the fastest way to factor a large number?
By hand, strip the small primes in order — all the 2s by halving, then 3 by the digit-sum test, then 5, 7 and onward — and stop when the remaining quotient is prime, which you confirm by testing primes up to its square root. That works well into the low thousands and gets tedious fast, so for anything larger a calculator is the practical answer; the tool linked on this page handles numbers up to 10^14, prints the full division ladder, and lists every divisor.
Is prime factorization the same as factorizing a polynomial?
No, though the idea of “irreducible building blocks” carries over. Prime factorization works on integers and breaks a number into primes, which cannot be factored further within the integers. Factoring a polynomial breaks an expression such as x^2 − 5x + 6 into (x − 2)(x − 3), where the pieces are irreducible polynomials rather than numbers. Both rely on uniqueness, but the integers have exactly one prime factorization while polynomial factorization is unique only up to a constant multiple and the choice of number system.