Math
Prime Factorization Calculator
Enter a whole number to break it down into its prime factors, with exponential notation and a visual factor tree.
Enter a whole number of 2 or greater.
Prime Factorization
—
Is Prime?
—
Total Divisors
—
Distinct Prime Factors
—
Total Prime Factors
—
Factor Tree
Method
Division method
Divide by 2, 3, 5, 7… repeatedly
Divide by the smallest prime until it no longer divides evenly, then move to the next prime
Trial division limit
Stop when divisor² > remaining value
If anything remains, that remainder is itself prime
Exponential form
p₁^a × p₂^b × p₃^c …
Each distinct prime raised to how many times it divides the number
Divisor count
(a+1) × (b+1) × (c+1) …
Multiply one more than each exponent to get total divisors
Prime check
Only 2 divisors: 1 and itself
A number with no smaller factors besides 1 is prime
Why Prime Factorization Matters
Fundamental theorem of arithmetic
Every integer greater than 1 has exactly one prime factorization, aside from the order the factors are written in. No two different sets of primes multiply to the same number.
GCF, LCM & fractions
Comparing the prime factorizations of two numbers instantly reveals their greatest common factor (shared primes at the lowest power) and least common multiple (all primes at the highest power).
Multiplying two large primes is easy, but factoring the result back apart is extremely hard — the basis of RSA cryptography.
Tips
The number 1: It is neither prime nor composite, so it has no prime factorization.
Prime input: If the number itself is prime, its "factorization" is just that number to the first power.
Perfect squares: A number is a perfect square if every exponent in its prime factorization is even.
FAQ
Frequently asked questions.
What is prime factorization?
Prime factorization is the process of breaking a number down into the set of prime numbers that multiply together to produce it. Every integer greater than 1 is either prime itself or can be written as a unique product of primes — for example, 360 = 2³ × 3² × 5. This unique breakdown is called the number's prime factorization, and it forms the basis for simplifying fractions, finding the GCF and LCM, and many topics in number theory.
How do you find the prime factorization of a number?
The most common approach is the division method: divide the number by the smallest prime that divides it evenly (starting with 2), then keep dividing the result by that same prime until it no longer divides evenly, then move to the next prime (3, 5, 7, and so on) and repeat. Continue until the remaining value is 1. The primes you divided by, with how many times each was used, form the prime factorization. This calculator automates that process using trial division.
What is the factor tree method?
The factor tree method finds a prime factorization visually by splitting a number into any two factors, then splitting each of those factors again, and repeating until every branch ends in a prime number. For example, 360 can branch into 36 × 10, then 36 into 6 × 6 and 10 into 2 × 5, continuing until only primes remain at the tips of the tree. No matter which factor pairs you choose along the way, the final set of prime numbers at the branch tips is always the same, thanks to the fundamental theorem of arithmetic.
What makes a number prime?
A prime number is a whole number greater than 1 that has exactly two positive divisors: 1 and itself. The first several primes are 2, 3, 5, and 7 — notice that 2 is the only even prime, since every other even number is divisible by 2 and therefore has a third divisor. Numbers with more than two divisors, such as 4, 6, 8, 9, and 10, are called composite numbers and can be broken down into prime factors. The number 1 is a special case: it is neither prime nor composite because it has only one divisor.
What is the fundamental theorem of arithmetic?
The fundamental theorem of arithmetic states that every integer greater than 1 is either a prime number itself or can be expressed as a product of prime numbers in exactly one way, aside from the order in which the factors are written. This guarantees that no matter how you break a number down — whether by a factor tree, division method, or any other approach — you always arrive at the same set of prime factors and exponents. It is the mathematical reason prime factorization is meaningful and unique.
How do you find the number of divisors from a prime factorization?
Once a number is written in prime factorization form as p₁^a × p₂^b × p₃^c and so on, the total number of positive divisors equals (a+1) × (b+1) × (c+1), multiplying one more than each exponent. For example, 360 = 2³ × 3² × 5¹, so the number of divisors is (3+1) × (2+1) × (1+1) = 4 × 3 × 2 = 24. This shortcut avoids having to list every divisor by hand.
What is prime factorization used for in real life?
Prime factorization is used to simplify fractions to lowest terms, find the greatest common factor (GCF) and least common multiple (LCM) of two or more numbers, and determine whether a number is a perfect square or cube by checking whether its exponents are all even or all divisible by three. It is also foundational to cryptography — modern encryption systems like RSA rely on the fact that multiplying two large primes together is easy, but factoring the resulting large number back into those primes is computationally very hard.
Last updated: August 17, 2026