Prime Factorization Calculator
The division ladder, and why it always works
The method is a ladder: divide by 2 as many times as you can, then by 3, then 5, 7, 11 — the primes in order. Each prime is exhausted before moving on, so the leftovers shrink fast. The stopping rule is the square root: once the prime being tested is larger than the square root of what remains, the remainder must itself be prime, because a composite remainder would have a factor at or below its own square root, and that factor would already have divided out. That is why factoring even a nine-digit number by trial division is quick work for a computer — at most a few thousand trial primes.
The exponent form is more than shorthand. It is the working form: the divisor count comes straight from the exponents, the HCF of two numbers takes the smaller exponent of each shared prime, the LCM takes the larger, and a number is a perfect square exactly when every exponent is even. Learn to read 2³ × 3² × 5 and you can answer half a dozen different questions about 360 without touching a list of factors.
Where factorization is actually used
Beyond the classroom, the uniqueness of prime factorization is load-bearing. Simplifying fractions, finding common denominators and checking whether a ratio can reduce all run on it. Computer science leans on it harder: the RSA encryption that secures banking and messaging rests on the fact that multiplying two large primes is trivial while factoring the product back apart is, at sufficient size, practically impossible — the same trial-division ladder on this page would need longer than the age of the universe for a 600-digit product. Checksums, hash functions and procedural generation in games all borrow the same idea: primes are the indivisible building blocks, and building blocks make reliable machinery.
Factor trees and the ladder method
Classrooms teach two drawings for the same process. The factor tree splits a number into any two factors, then splits each composite factor again, branching until every leaf is prime — the leaves, collected, are the factorization, and the tree's charm is that any split order works because the final leaf set is unique. The ladder (or division) method used by this calculator divides repeatedly by primes in ascending order, writing each divisor down the side; it is more compact, harder to lose a factor in, and it produces the primes already sorted. Both are the same mathematics wearing different paper. A third representation, the Venn diagram of two numbers' prime factors, turns HCF and LCM into set operations — the intersection of the circles is the HCF, the union the LCM — which is why factorization is taught before either of those topics.
Frequently asked questions
What is prime factorization?
It is writing a number as a product of prime numbers only. 360 breaks down as 2 x 2 x 2 x 3 x 3 x 5, written compactly with exponents as 2^3 x 3^2 x 5. The fundamental theorem of arithmetic guarantees that every whole number above 1 has exactly one such breakdown — the order can differ, the set of primes cannot — which is what makes factorization a fingerprint for a number and the starting point for HCF, LCM, simplifying fractions and much of cryptography.
How do you find the prime factors of a number?
Divide repeatedly by the smallest prime that fits. Start with 2 and divide as many times as possible, then move to 3, then 5, and so on, stopping when the prime you are testing squared exceeds what is left. For 360: divide by 2 three times to reach 45, by 3 twice to reach 5, and 5 is itself prime. You never need to test a prime larger than the square root of the remaining value, because if a bigger factor existed, a smaller partner would already have divided out. This calculator shows every division step so the method, not just the answer, is visible.
What if the calculator says my number is prime?
It means no prime up to its square root divides it, so its only factorization is 1 x itself. 97 is prime: nothing among 2, 3, 5 and 7 (the primes up to the square root of 97, about 9.8) divides it. Primes are the atoms of this system — they cannot be broken down further — and their factorization is written as the number itself. Large primes are genuinely hard to identify by hand, which is precisely the difficulty public-key cryptography is built on.
How do I get the number of divisors from the factorization?
Add 1 to each exponent and multiply. For 360 = 2^3 x 3^2 x 5^1, that is (3+1) x (2+1) x (1+1) = 24 divisors. The logic is simple: a divisor chooses how many copies of each prime to include — from zero up to the full exponent — so each prime contributes (exponent + 1) independent choices. The calculator shows the divisor count alongside the factorization, and the same exponent trick, comparing minimums and maximums across two numbers, produces their HCF and LCM.
Is 1 a prime number in factorization?
No — 1 is neither prime nor composite, and it never appears in a prime factorization. If 1 counted as prime, factorizations would stop being unique: 6 could be 2 x 3, or 1 x 2 x 3, or 1 x 1 x 2 x 3, forever. Excluding 1 is what keeps the fundamental theorem true. So the smallest factorization is 2 itself, and every composite number resolves into primes 2 and above.
Related tools
Figures checked on 24 November 2026. Everything is calculated in your browser — nothing you type is sent anywhere.