Prime Factors Calculator breaks a whole number down into the prime numbers that multiply together to produce it, drawing a factor tree and writing the result in exponential form. Enter an integer of 2 or greater, and the tool peels off the smallest prime factor repeatedly until only primes remain.
Peel off the smallest prime factor
Prime factorization always works the same way: divide by the smallest prime that divides evenly, then repeat on the quotient until nothing but primes are left. For 360, the smallest prime factor is 2: 360 / 2 = 180. Dividing again by 2: 180 / 2 = 90.
Again by 2: 90 / 2 = 45. Now 2 no longer divides evenly, so move to the next prime, 3: 45 / 3 = 15, then 15 / 3 = 5. Finally 5 is itself prime, so the process stops.
Build the factor tree
The factor tree records every division visually: 360 branches into 2 and 180, 180 branches into 2 and 90, 90 branches into 2 and 45, 45 branches into 3 and 15, and 15 branches into 3 and 5. The leaves of the completed tree, read together, are 2, 2, 2, 3, 3, 5.
Prime Factors Calculator generates this same tree structure for any input, stopping each branch once it reaches a prime leaf.
Write the exponential form
Collecting repeated prime factors into exponents turns the raw list into a compact expression. The leaves 2, 2, 2, 3, 3, 5 group into three 2s, two 3s, and one 5: 2^3 × 3^2 × 5.
This exponential form is the standard way prime factorizations are reported, and Prime Factors Calculator displays it as the primary result, with the full leaf list available as supporting detail.
Verify the factorization by multiplying back
Multiplying the exponential form back out should return the original number exactly. 2^3 is 8, 3^2 is 9, and 8 × 9 × 5 = 360, confirming the factorization of 360 is correct. This check works for any factorization and is a fast way to catch an arithmetic slip during a manual attempt at the same problem.
Handle a number that is already prime
When the input itself is prime, such as 47, the factor tree has no branches at all; the number is its own single leaf, and the exponential form is just 47^1, usually written simply as 47.
Prime Factors Calculator detects this immediately by testing divisibility up to the square root of the input and finding no divisor, confirming the number is prime rather than composite.
Avoid this common mistake
A common error stops dividing too early, leaving a composite number in the final factor list instead of continuing down to primes. Factoring 360 as 2 × 2 × 2 × 45 is incomplete, since 45 is not prime; it still needs to be broken into 3 × 3 × 5.
Keep dividing every branch of the factor tree until every leaf is a prime number with no further factors of its own.
Use prime factorization to find the GCF and LCM
Prime factorization is the backbone of finding a greatest common factor or least common multiple for two numbers. Factoring 48 as 2^4 × 3 and 180 as 2^2 × 3^2 × 5, the GCF takes the lowest power of each shared prime: 2^2 × 3 = 12.
The LCM takes the highest power of every prime that appears in either factorization: 2^4 × 3^2 × 5 = 720. Prime Factors Calculator's exponential output feeds directly into both of these calculations without needing to redo the factorization separately for each one.
Factor a large number efficiently
For larger numbers, testing every integer up to the number itself would be slow, so Prime Factors Calculator only needs to test candidate divisors up to the square root of the remaining quotient at each step.
If no prime factor up to the square root of a number divides it evenly, the number itself must be prime, since any composite number has at least one factor at or below its own square root.
This is why factoring 9,973 only requires testing primes up to 100 or so, rather than testing every number up to 9,973 itself.
Frequently asked questions
What is prime factorization?
Prime factorization is the process of breaking a whole number down into the unique set of prime numbers that, multiplied together, produce that number exactly.
What is the prime factorization of 360?
The prime factorization of 360 is 2^3 × 3^2 × 5, found by repeatedly dividing by the smallest prime factor until only primes remain.
How do you build a factor tree?
To build a factor tree, divide the starting number by its smallest prime factor to get two branches, then repeat that division on any branch that is still a composite number, stopping once every branch ends in a prime leaf.
Why does every whole number greater than 1 have a unique prime factorization?
Every whole number greater than 1 has a unique prime factorization because of the fundamental theorem of arithmetic, which guarantees that the specific set of primes and their exponents for a given number is the only possible way to build that number from primes, regardless of the order factors are found in.
What if the number entered is already prime?
If the number entered is already prime, the factor tree has no branches, and the number is reported as its own single prime factor with an exponent of 1.
How is prime factorization different from listing all factors?
Prime factorization lists only the prime building blocks of a number with their exponents, while listing all factors includes every divisor, prime or composite, that divides the number evenly, which is a longer and different list for most composite numbers.
How do you use prime factorization to find the GCF of two numbers?
To find the GCF of two numbers using prime factorization, factor both numbers into primes, then multiply together the lowest power of each prime that appears in both factorizations.
Why do you only need to test divisors up to the square root when factoring?
You only need to test divisors up to the square root of a number when factoring because any composite number must have at least one prime factor at or below its own square root; if none is found up to that point, the number is prime.
Summary
Prime Factors Calculator repeatedly divides an integer by its smallest prime factor, builds the resulting factor tree, and reports the result in exponential form, such as 360 = 2^3 × 3^2 × 5. Enter any integer of 2 or greater to see the full division chain, the tree, and a multiplication check confirming the factorization returns the original number.