How to Find the Prime Factorization of a Number

What are the building blocks of 360? Break it down far enough and you always land on the same six primes. Prime factorization is the skill of finding them, and it is easier than it looks.

Quick Answer

To find a prime factorization, divide the number by the smallest prime that fits, then repeat on each quotient until you reach 1. The primes you used are the answer. Write repeats as exponents, so 360 becomes 23 x 32 x 5. Apart from order, every number above 1 has only one such answer.

What Prime Factorization Actually Means

Prime factorization writes a whole number as a product of primes. A prime is a natural number greater than 1 that is not a product of two smaller natural numbers. Our guide to prime numbers and how to find them covers that idea in depth.

The rule behind it is the fundamental theorem of arithmetic. It says every integer greater than 1 is either prime or can be written as a product of primes in exactly one way, up to the order of the factors. One example from that page is 1200 = 24 x 3 x 52.

This is also why 1 is not prime. If it were, then 2 = 2 x 1 = 2 x 1 x 1, and the answer would no longer be unique. Carl Friedrich Gauss proved the unique factorization theorem in his 1801 book Disquisitiones Arithmeticae.

Repeated Division: The Simplest Method by Hand

Repeated division, also called trial division, is the simplest hand method for a small number. You check the primes 2, 3, 5, and so on, and keep dividing.

  1. Find the smallest prime that divides evenly. Try 2 first, then 3, then 5.
  2. Write that prime down. Then divide the number by it.
  3. Repeat on the quotient. Use the same prime again if it still fits.
  4. Stop when the quotient is 1. The primes you wrote down are your answer.

Here is 360: 360 / 2 = 180, then 180 / 2 = 90, then 90 / 2 = 45, then 45 / 3 = 15, then 15 / 3 = 5, and finally 5 / 5 = 1. The primes used are 2, 2, 2, 3, 3, and 5.

You only need to test primes up to the square root of what is left. For 123,456, you divide out six 2s and one 3, which leaves 643. No prime up to 23 divides 643, so it stays in the answer. To skip the work, the prime factorization calculator returns 71 x 839 x 1471 x 6857 for 600851475143.

Factor Trees: Splitting Until Only Primes Remain

A factor tree is the same idea drawn as a picture. Write the number at the top and split it into any two factors. Keep splitting each branch until every end is a prime.

The diagram splits 360 by the smallest prime each time. The teal boxes are the primes, and reading them gives 2, 2, 2, 3, 3, and 5.

Factor tree for 360 A tree that starts with 360 at the top. 360 splits into the prime 2 and 180. 180 splits into 2 and 90. 90 splits into 2 and 45. 45 splits into 3 and 15. 15 splits into 3 and 5. Prime boxes are teal and composite boxes are navy. The six primes at the ends multiply to 360. Factor tree for 360: split until every end is prime 360 2 180 2 90 2 45 3 15 3 5 Prime (an end box) Composite (splits again) Primes: 2 × 2 × 2 × 3 × 3 × 5 8 × 9 × 5 = 360
Every path ends in a prime, and the six primes multiply back to 360.

You do not have to start with 2. Split 360 as 36 x 10 and you still end with three 2s, two 3s, and one 5. The branches change, but the final primes never do. That is the uniqueness rule at work.

Trees feel natural when you can spot an easy split right away. If a number ends in 0, you can peel off a 10 first. Repeated division is the safer choice when no split is obvious, because it follows one fixed order.

Writing and Checking the Exponent Form

Once you have the list of primes, count how many times each one appears. Write that count as a small raised number. The list 2, 2, 2, 3, 3, 5 becomes 23 x 32 x 5. A prime that appears once needs no exponent.

Always check by multiplying back. Here 23 is 8, 32 is 9, and 8 x 9 x 5 = 360. If exponents feel rusty, our guide to powers, roots, and reciprocals can help.

Try a bigger case. The number 123,456 has six 2s, one 3, and one 643, so it is 26 x 3 x 643. Check it: 64 x 3 = 192, and 192 x 643 = 123,456. Multiplying back is a quick way to catch a slip.

Order does not change the value. Most books list primes from smallest to largest, which makes two answers easy to compare.

Counting Divisors From the Exponents

The exponent form also tells you how many divisors a number has. This follows from the theorem: each divisor picks an exponent for every prime, from 0 up to that prime’s exponent in the number.

So add 1 to each exponent and multiply the results. For 360 = 23 x 32 x 51, that is (3 + 1)(2 + 1)(1 + 1) = 4 x 3 x 2 = 24 divisors.

Exponent choices that build the 24 divisors of 360 Three groups of boxes. The power of 2 can be 0, 1, 2 or 3, which is four choices. The power of 3 can be 0, 1 or 2, which is three choices. The power of 5 can be 0 or 1, which is two choices. Four times three times two gives 24 divisors. One example pick of exponents 1, 2 and 0 gives the divisor 18. Each divisor of 360 picks one exponent per prime Power of 2 Power of 3 Power of 5 0 1 2 3 0 1 2 0 1 4 choices 3 choices 2 choices × × 4 × 3 × 2 = 24 divisors One pick: exponents 1, 2, 0 give 2 × 9 × 1 = 18, and 18 divides 360.
Pick one exponent for each prime, and the number of picks is the divisor count.
Prime factorizations and divisor counts
Number Prime factorization Exponents plus 1 Divisors
84 22 x 3 x 7 3 x 2 x 2 12
97 97 (prime) 1 + 1 2
360 23 x 32 x 5 4 x 3 x 2 24
1001 7 x 11 x 13 2 x 2 x 2 8
1200 24 x 3 x 52 5 x 2 x 3 30
2310 2 x 3 x 5 x 7 x 11 2 x 2 x 2 x 2 x 2 32

A prime always has exactly 2 divisors, itself and 1. The number 2310 is the product of the first five primes, so it has 25 = 32 divisors.

Using Prime Factors for GCF, LCM, and Fractions

Prime factorization turns three common jobs into simple comparisons. The greatest common factor (GCF) takes each shared prime at its lowest exponent. The least common multiple (LCM) takes every prime at its highest exponent. Our guide to LCM and GCF covers other methods too.

Take 360 = 23 x 32 x 5 and 84 = 22 x 3 x 7. The shared primes are 2 and 3, so GCF = 22 x 3 = 12. For the LCM, use 23, 32, 5, and 7, which gives 2,520.

GCF and LCM from prime blocks Two rows of prime blocks. The row for 360 has three 2s, two 3s and one 5. The row for 84 has two 2s, one 3 and one 7. Teal blocks are the shared lowest powers: 2, 2 and 3, which multiply to the GCF of 12. Amber blocks are the extras: 2, 3, 5 and 7. The teal blocks plus all amber blocks multiply to the LCM of 2,520. Lowest powers give the GCF, highest powers give the LCM Prime 2 3 5 7 360 84 2 2 2 3 3 5 2 2 3 7 Shared: goes in GCF Extra: only in LCM Blank slot = none of that prime GCF = 2 × 2 × 3 = 12 LCM = 12 × 2 × 3 × 5 × 7 = 2,520
Teal blocks make the GCF. Teal plus amber blocks make the LCM.

Check it: 360 x 84 = 30,240, and 12 x 2,520 = 30,240 too. The same factors also simplify fractions. For 84/360, divide the top and bottom by 12 to get 7/30. See how to simplify fractions for more practice.

Mistakes That Change the Answer

Most errors come from stopping too early or losing track of repeats. Watch for these six.

  • Stopping at a composite. If 12 is still in your answer, keep going: 12 = 2 x 2 x 3.
  • Counting 1 as a prime factor. The number 1 is not prime, so it never belongs in the list.
  • Missing repeats. The number 360 has three 2s, not one.
  • Testing only odd numbers. Always try 2 first, and try it again after each division.
  • Forgetting the leftover prime. If the last quotient is prime, like 643 earlier, it goes in the answer.
  • Mixing up factors and prime factors. Factors are all the divisors. Prime factors are only the primes.

That last pair is easy to blur. The number 360 has 24 factors but only three different prime factors: 2, 3, and 5.

Want to check your work?

Enter any whole number in the prime factorization calculator to see its primes and its divisor count.

FAQs About Prime Factorization

Is 1 a prime number?

No. If 1 were prime, then 2 = 2 x 1 = 2 x 1 x 1, and factorizations would not be unique. The theorem covers integers greater than 1, so 1 has no prime factorization.

What is the prime factorization of a prime number?

It is the prime itself. For example, 97 is prime, so its factorization is just 97. It has exactly two divisors, 1 and 97.

How do I know when to stop dividing?

Stop when the quotient reaches 1. By hand, you only need to test primes up to the square root of what is left. If none fit, what is left is prime.

Can a number have two different prime factorizations?

No, apart from the order of the factors. The fundamental theorem of arithmetic says every integer greater than 1 has exactly one. For 360, it is always 2^3 x 3^2 x 5.

How many divisors does a number have?

Add 1 to each exponent in its prime factorization, then multiply. For 360 = 2^3 x 3^2 x 5, that is 4 x 3 x 2 = 24 divisors.

What is the difference between factors and prime factors?

Factors are all the numbers that divide evenly, such as 1, 6, 12, and 360. Prime factors are only the primes in that list. For 360, those are 2, 3, and 5.

Why is factoring a very large number considered hard?

No efficient non-quantum algorithm is known for very large numbers. That presumed difficulty is important for cryptography such as RSA.

Sources and Further Reading

Sources

This article is a general math guide. Check your course for the answer format it expects. Reviewed for accuracy by Prof. Dr. Khalil Mudassar, PhD. Last updated 2026-10-15.


Author

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~ More Posts

Shakeel is the Founder and Editor-in-Chief of MultiCalculators.com, with over 15 years of experience in digital publishing and online tool development. He oversees editorial quality, formula accuracy, and usability to ensure the platform delivers reliable, practical calculators for users worldwide.