Skip to content
Calcipedia

Prime Factorization Calculator

Break any positive integer into prime powers with repeated-division steps, factor-tree support, and exponent notation you can reuse for GCF, LCM.

Last updated

Prime factorization calculator Break a positive integer into prime powers, check whether it is already prime, and review the repeated-division path that produces the factorization.

Try an example

How this page works

The calculator uses trial division from the smallest prime upward, then groups repeated primes into exponential notation. Use the repeated-division list for a step-by-step check, and use the factor tree as a quick visual sanity check.

Enter a valid integer Enter a positive integer greater than or equal to 2.
← All Number Theory calculators

Number Theory

Prime factorization calculator: factor trees, exponents, and worked examples

A prime factorization calculator breaks any integer greater than 1 into the prime numbers that multiply to make it. Use it to check a factor tree, convert repeated primes into exponent form, and see the exact prime-power structure you need for GCF, LCM, radicals, and divisibility work.

What this prime factorization calculator solves

Every integer greater than one can be written as a product of prime numbers in exactly one way, ignoring the order of the factors. This unique decomposition reveals the building blocks of a number and is the foundation of many results in number theory.

For example, 60 equals 2 times 2 times 3 times 5, often written as two squared times three times five. No other combination of primes produces 60.

That makes a prime factorization calculator useful whenever you need more than the final answer. A good result should show which primes repeat, how many total prime factors there are, and how the factorization was produced so you can audit the arithmetic instead of trusting a black box.

The trial division method and factor-tree view

Start by dividing the number by the smallest prime, two. If it divides evenly, record two as a factor and divide. Repeat until two no longer divides evenly, then move to the next prime, three, and continue. The process ends when the remaining quotient is one.

A factor tree is simply a visual way to record the same process. Different trees may branch in a different order, but once every leaf is prime, the completed set of leaves must match the same prime factorization. The factor tree is a teaching aid; the fundamental theorem of arithmetic is what guarantees the final prime-power form is unique.

n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ

The number n is expressed as a product of prime powers, where each pᵢ is a distinct prime and aᵢ is the number of times it appears.

Worked example: factorizing 360

Take 360. Divide by 2 to get 180, divide by 2 again to get 90, and divide by 2 once more to get 45. At that point 2 no longer divides evenly, so move to 3: 45 divided by 3 is 15, and 15 divided by 3 is 5. The remaining 5 is prime, so the process stops there.

The repeated-division list gives the expanded product 2 × 2 × 2 × 3 × 3 × 5. Grouping identical primes produces the compact form 2³ × 3² × 5. Both describe the same factorization, but the exponent form is the easier one to use when you compare several numbers side by side.

What the prime powers tell you

Prime factorization is used to compute the GCF and LCM of two numbers, simplify square roots and other radicals, determine whether a number is a perfect square or cube, and in cryptographic algorithms that rely on the difficulty of factoring very large numbers.

The exponents are especially informative. If every exponent is even, the number is a perfect square. If every exponent is a multiple of three, the number is a perfect cube. When you compare two factorizations, the GCF takes the smaller shared exponents and the LCM takes the larger exponents across the set.

This is why prime factorization often sits upstream of other number-theory tools. Once you know the prime powers, finding the greatest common factor, least common multiple, or a simplified radical becomes a matching-and-exponents exercise rather than a fresh divisibility search.

What this calculator does not cover

This calculator is built for ordinary integers and educational number-theory work. It does not attempt advanced integer-factorization methods for extremely large numbers, negative-integer sign conventions, polynomial factorization, or symbolic algebra.

It also does not list every divisor of the number. Prime factorization and a full factor list are related but different tasks. If you need factor pairs or all divisors after finding the prime powers, the related factor calculator is the better next step.

Frequently asked questions

Is one a prime number?

No. By convention, 1 is neither prime nor composite, which is why prime factorization starts at integers greater than 1. This convention matters because the uniqueness of prime factorization would break down if 1 were treated as prime: you could keep multiplying any factorization by extra copies of 1 without changing the value.

Can prime factorisation be used to find the LCM?

Yes. Write the prime factorization of each number, then keep the highest exponent of every prime that appears in any of them. Multiplying those retained prime powers gives the LCM. This is often faster and cleaner than listing multiples, especially when the numbers are large or there are more than two of them.

What is a factor tree?

A factor tree is a visual diagram that breaks a number into two factors at each branch until every leaf is prime. The prime leaves are then multiplied together to recover the original number. The tree shape can vary, but once all leaves are prime the completed prime factorization must agree with any other correct tree for the same number.

Can two different factor trees give the same answer?

Yes, and that is exactly what should happen. One tree might split 72 into 8 × 9 first, while another might split it into 6 × 12 first. As long as both trees keep factoring until all leaves are prime, they both end at 2³ × 3². Different paths can lead to the same unique prime-power result.

Also in Number Theory

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.