MathQuarryCalculators

Learn / How to Find the Prime Factorization of a Number

How to Find the Prime Factorization of a Number

Prime factorization means breaking a number down into the specific set of prime numbers that multiply together to produce it. Every whole number greater than 1 has exactly one prime factorization (ignoring the order the primes are written in) — this is the Fundamental Theorem of Arithmetic, and it's why prime factorization is often called a number's mathematical "fingerprint."

The Repeated-Division Method

Start dividing your number by the smallest prime that goes into it evenly (usually 2), and keep dividing the result by that same prime until it no longer divides evenly, then move to the next prime (3, then 5, then 7, and so on) and repeat. Continue until what's left is 1.

Worked example: prime factorization of 84. 84 ÷ 2 = 42 (even, so 2 works). 42 ÷ 2 = 21 (still even). 21 ÷ 2 = not whole, move to 3. 21 ÷ 3 = 7. 7 ÷ 3 = not whole, move to 5, then 7. 7 ÷ 7 = 1. Done. Collecting the primes used: 2, 2, 3, 7 — so 84 = 2² × 3 × 7. Checking: 4 × 3 × 7 = 84. Correct.

Worked example: prime factorization of 90. 90 ÷ 2 = 45. 45 is odd, move to 3. 45 ÷ 3 = 15. 15 ÷ 3 = 5. 5 ÷ 3 = not whole, move to 5. 5 ÷ 5 = 1. Done. Primes used: 2, 3, 3, 5 — so 90 = 2 × 3² × 5. Checking: 2 × 9 × 5 = 90. Correct.

The Factor Tree, a Visual Alternative

Some people find it easier to build a "tree" instead of dividing in a strict line: write the number at the top, split it into any two factors (they don't have to be prime yet), then split each of those factors again, and keep going until every branch ends in a prime. For 84: split into 4 × 21, then split 4 into 2 × 2 (both prime, stop), and split 21 into 3 × 7 (both prime, stop). Reading the prime "leaves" at the bottom: 2, 2, 3, 7 — the identical result as the division method above, just reached via a different visual path. Both methods always agree, because there's only one correct prime factorization for any given number.

How you know you're done. The process stops exactly when what remains after your last division is 1. If you divide and get another number greater than 1 that isn't further divisible by your current prime, move to the next larger prime rather than stopping — a common error is stopping as soon as division by the current prime "fails," without checking whether a larger prime might still divide the remainder.

Writing the answer. Prime factorizations are conventionally written using exponents for repeated primes rather than listing them out — 2 × 2 × 3 × 7 becomes 2² × 3 × 7 — both are mathematically identical, but the exponent form makes the count of each prime factor immediately visible, which matters for downstream calculations like GCF and LCM.

Why This Matters Beyond the Exercise

Prime factorization is the foundation underneath GCF and LCM calculations (see What Is GCF and What Is LCM), underneath simplifying fractions to lowest terms, and underneath identifying whether a number is a perfect square or perfect cube just by looking at its prime exponents (a number is a perfect square exactly when every exponent in its prime factorization is even; 36 = 2² × 3², both exponents even, confirming 36 is a perfect square). It's also the mathematical basis for RSA encryption, which relies on the fact that multiplying two large primes is fast while reversing the process — factoring their product back apart — is not, for sufficiently large primes.

Common mistakes. Forgetting to keep dividing by the same prime as many times as it divides evenly is the most frequent error — dividing 84 by 2 once (getting 42) and immediately moving on to 3, without noticing 42 is still even and 2 divides it again. Another common mistake is including a non-prime number in the final factorization by stopping too early — writing 84 = 4 × 3 × 7 instead of continuing to break the 4 down into 2 × 2, since 4 itself isn't prime and doesn't belong in a final prime factorization.

Worked example: prime factorization of 252. 252÷2=126. 126÷2=63. 63÷2 not whole, move to 3. 63÷3=21. 21÷3=7. 7÷3 not whole, move to 5 (skip), then 7. 7÷7=1. Done. Primes used: 2,2,3,3,7 — so 252 = 2² × 3² × 7. Checking: 4×9×7=252. Correct.

Worked example: prime factorization of a larger number, 1,001. 1001 is odd, so 2 doesn't work. Digit sum 1+0+0+1=2, not divisible by 3. Doesn't end in 0/5. Try 7: 1001÷7=143. 143÷7 not whole, move to 11: 143÷11=13. 13÷11 not whole, move to 13: 13÷13=1. Done. Primes used: 7, 11, 13 — so 1001 = 7 × 11 × 13, a genuinely elegant factorization worth knowing, since it means any number formed by repeating a three-digit block twice (like 247247) is automatically divisible by 1001, and therefore by 7, 11, and 13.

Recognizing when a number is already prime, so you stop immediately. If, while working through the division method, you reach a point where the remaining value is itself prime (nothing from 2 up to its own square root divides it), that value is the final prime factor — no further division needed. This is exactly what happens at the last step of both worked examples above, where the final remaining value (7, then 13) was already prime.

A note on numbers that are already powers of a single prime. Some numbers, like 128, break down into just one repeated prime: 128=2⁷. These are quick to spot once you notice a number is a familiar power of 2 (2,4,8,16,32,64,128,256,512,1024...) — recognizing this pattern on sight skips the step-by-step division entirely for these specific, common cases.

For finding the shared prime factors between two numbers specifically (rather than one number's full breakdown), see What Is GCF, and How Do You Find It? and What Is LCM, and How Do You Find It?, both of which build directly on the method taught here.

For more practice

  • Humble Math — 100 Days of Timed Tests (Multiplication, Division, Addition & Subtraction)

    Straightforward daily drill sheets for building fast, automatic recall of the operations this site's calculators walk through by hand.

  • Brain Quest Workbook series (Workman Publishing)

    Grade-leveled practice covering fractions, percentages, and basic geometry alongside general math fundamentals.

  • Singapore Math Practice workbook series

    A widely-used, methodical approach to number sense, fractions, and ratios that pairs well with this site's step-by-step teaching style.

As an Amazon Associate, this site earns from qualifying purchases made through the links above.