Try it with your numbers
Show every step
That single guarantee is why the idea is worth learning. It lets you find a greatest common factor, simplify a fraction or a root, count divisors and test for perfect squares from one short line of primes. The sections below show how to find the factorization quickly, how to know you are finished, and what to do with the result.
What is prime factorization, and why is it unique?
A prime is a whole number greater than 1 whose only positive factors are 1 and itself. The first few are , and the full run up to 100 is on the prime numbers from 1 to 100 page. Every other whole number above 1 is composite, which means it splits into two smaller whole numbers. Splitting cannot go on forever because the pieces keep shrinking, so every composite number eventually turns into a product of primes.
Uniqueness is the part that needs an argument. It is called the fundamental theorem of arithmetic, and it rests on one fact: if a prime divides a product , then divides or divides . Suppose a number had two different prime factorizations. A prime on one side would have to divide something on the other side, so it would equal one of those primes. Cancel that pair and repeat, and the two lists turn out to be identical.
If 1 counted as prime, then would be two different factorizations. Excluding 1 is what keeps uniqueness true.
Uniqueness is not automatic in every number system. In the set of numbers of the form , you get , and none of those four factors can be split further. Ordinary whole numbers are unusually well behaved, which is why the method in this lesson never gives two answers.
Quick check
Answer:
How do you find the prime factorization of a number?
The division method is a fixed routine that cannot go wrong if you follow it.
- Divide by the smallest prime, 2, as many times as it goes in evenly.
- When 2 fails, move to 3, then 5, then 7, then 11, always using the current quotient.
- Stop when the quotient reaches 1. The divisors you used are the prime factors.
Here it is on :
The divisors used were , so
The divisibility rules make each trial instant: even numbers pass the 2 test, a number passes the 3 test when its digit sum does (for , ), and a last digit of 0 or 5 means 5 divides it. Going in increasing order has a built-in benefit. Once 2 stops dividing the current quotient, it never divides it again, so you never look backward.
The classic trap is stopping too early. Writing looks finished but contains composite numbers. A factorization is complete only when every factor is prime, and the exponent form is the tidy way to show it.
Factor tree or division method: which is faster?
Both reach the same primes, so the choice is about speed and habit. A factor tree lets you start with any factor pair you can see, which is quicker when a number has an obvious large factor. The division method is better when nothing jumps out, because it forces a search order and never leaves a composite leaf behind.
| Method | Best when | Weak spot |
|---|---|---|
| Division (ladder) | The number is large or has no obvious factors | Slow if a big factor pair is staring at you |
| Factor tree | You can spot a big factor pair quickly | Easy to leave a composite number on a branch |
Take . One tree starts with . Then and , which gives . A different tree starts with . Then and , and combining gives
Different trees, identical result. Uniqueness works as an error alarm: if two routes disagree, one contains an arithmetic slip.
Every trailing zero hides a and a . For example, .
When can you stop testing primes?

You only need to test primes up to . The reason is one clean idea: if with , then , so the smaller factor is at most . If no prime up to divides , no factor pair exists and is prime.
Factor . Since and , the square root is between 19 and 20, so the primes to test are . A list of perfect squares makes this bound easy to estimate.
- : 391 is odd, so no.
- : the digit sum is , so no.
- : the last digit is 1, so no.
- : , remainder 6, so no.
- : the alternating sum is not a multiple of 11, so no.
- : , remainder 1, so no.
- : , so yes.
The quotient only needs testing against 2 and 3 (since ), and both fail, so 23 is prime. Therefore . Numbers like this catch people out because they pass every quick rule for 2, 3 and 5 yet are not prime.
Try this: Decide whether is prime. First work out which primes you must test (stop at ), then test them one by one and multiply back to check.
Prime factorization of negative numbers, 0 and 1
Prime factorization is defined for whole numbers greater than 1, but negatives come up in algebra, and the convention is simple. Factor the absolute value, then keep the sign as a separate factor of :
The sign follows the usual rules for multiplying integers: an odd count of negative factors gives a negative product. Here there is one factor of , so the product is negative.
The number 1 has an empty prime factorization, a product of no primes at all, in the same way an empty sum is 0. The number 0 has none: it is divisible by every prime, so there is no finite list of primes that builds it. When a problem asks you to factor 0 or 1, the honest answer is that the question does not apply.
Quick check
Answer:
How to use prime factorization for GCF and LCM

Prime factorization turns the greatest common factor and the least common multiple into bookkeeping. Write both numbers as prime powers, with a missing prime counted as exponent 0. The GCF takes the smaller exponent of each prime, and the LCM takes the larger.
Find both for and :
Check with the identity . Here and . The identity holds because for each prime, the smaller exponent plus the larger exponent equals the sum of the two exponents.
The same GCF simplifies fractions. Dividing top and bottom of by 6 gives , and since 14 and 15 share no prime, the fraction is fully reduced. This is the idea behind simplifying fractions: cancel shared primes and nothing else.
What the exponents in a prime factorization tell you
Once a number is in the form , the exponents answer several questions without any more division.
The number of positive divisors is . Each divisor chooses an exponent from up to for every prime, giving choices. For this gives divisors.
A number is a perfect square exactly when every exponent is even, and a perfect cube when every exponent is a multiple of 3. So is not a square, because the exponents of 2 and 3 are odd. Even exponents also let you pull factors out of a root:
That is the whole method behind simplifying square roots.
Each zero at the end of needs a 2 and a 5, and 2s are plentiful, so count the 5s: zeros.
The factorial trick above is prime factorization in disguise: it counts how many times the prime 5 appears in the product .
Quick check
Answer:
How do you check a prime factorization?
Three checks catch nearly every error, and each takes under a minute.
- Multiply back. The product of your prime powers must equal the original number exactly.
- Test every factor. Each leftover factor must be prime. If it is under 100, look it up on a prime list; if larger, apply the rule.
- Casting out nines. A number and its digit sum leave the same remainder when divided by 9, so you can compare digit sums of the number and of the product.
Try the third check on . The digit sum of 2024 is . The factors reduce to , then , then , and , whose digit sum is . The two sides agree.
The nines check can miss a swapped-digit slip, which is why multiplying back remains the final word. Also confirm that the exponents count correctly: means three 2s, not .
Why is factoring huge numbers so hard?
Trial division needs up to steps, which is fine for 391 and hopeless for a 617-digit number. A 2048-bit number is about , written compactly with scientific notation, so its square root still has over 300 digits. Faster algorithms exist, but none is fast enough to break numbers of that size on conventional computers.
That gap is the foundation of RSA encryption. Multiplying two huge primes takes a fraction of a second, while recovering them from the product is practically impossible. The difficulty is not proven mathematically, only unbroken so far. A quantum algorithm due to Peter Shor could factor large numbers efficiently in principle, which is a major reason cryptographers are designing replacements.
For homework-sized numbers, none of this matters: the division method plus the rule always finishes. It is worth knowing, though, that the same routine you use on 360 is the one that, scaled up, holds back an entire field of computing.
Practice problems
0 of 5 solved
- Find the prime factorization of .
Answer:
Divide by 2: , then . Now divide by 3: , and is prime. The primes used are , so . - Find the prime factorization of .
Answer:
and . Then and . So . Check: . - Find the prime factorization of .
Answer:
, , . Now is odd, its digit sum is (not divisible by 3), it does not end in 0 or 5, and so 7 fails. But . So . - Use prime factorizations to find the GCF and LCM of and .
Answer: GCF , LCM
and . GCF uses the smaller exponents: . LCM uses the larger exponents: . Check: . - What is the smallest positive integer for which is a perfect square?
Answer:
. A perfect square needs every exponent even, and the exponents of and are odd. Multiply by to get .
Common questions
What is prime factorization in simple terms?
It is writing a whole number greater than 1 as a product of prime numbers only. For example, . Every such number has exactly one prime factorization, ignoring the order of the factors.
What is the prime factorization of 100?
. Start with , then split each into and collect the repeated primes as exponents.
Is 1 a prime number?
No. A prime needs exactly two positive factors, and 1 has only one. If 1 were prime, numbers would have infinitely many prime factorizations, such as .
What is the difference between a factor tree and the division method?
A factor tree splits a number into any factor pair and keeps splitting. The division method divides by the smallest prime each time, in a fixed order. Both always end with the same primes.
How do you know when a number is prime?
Test whether any prime up to divides it. If none does, is prime. You never need to test larger primes, because a factor pair always has one member at or below .
How is prime factorization used to find the GCF and LCM?
Write each number as a product of prime powers. The GCF takes each shared prime with its smaller exponent, and the LCM takes every prime with its larger exponent.