What prime factorisation is
Prime factorisation is breaking a whole number down into the set of prime numbers that multiply together to make it. A prime number is a whole number greater than 1 with exactly two factors, 1 and itself, such as 2, 3, 5, 7 or 11; every other whole number above 1 is composite, meaning it is built from smaller factors. Prime factorisation finds the specific primes that build a given composite number and how many times each one is used.
Take 84. It is not prime, since it splits into smaller factors, and working through those splits all the way down gives 84 = 2 × 2 × 3 × 7, or 2² × 3 × 7 in shorter exponent form. Every prime in that list actually divides 84 exactly, and multiplying them back together lands squarely on 84 again, which is the whole point: a prime factorisation is a way of writing a number that is completely equivalent to the number itself, just broken into its smallest possible building blocks.
Three ways to see the same breakdown
This page shows every result three different ways, since school and textbook questions ask for each by name. A division ladder repeatedly divides by the smallest prime that fits, one row at a time. A factor tree splits a number into a prime and whatever is left, branching again until every branch ends on a prime. Exponent form and expanded form write out the same primes, just more or less compactly. All three always agree, since they all come from the one unique factorisation underneath.
The division ladder, step by step
A division ladder starts with the number and repeatedly divides by the smallest prime that goes into it exactly, writing the divisor to one side and the result underneath, until the result reaches 1. For 84: 84 ÷ 2 = 42, then 42 ÷ 2 = 21 (2 no longer divides evenly, so move to the next prime), then 21 ÷ 3 = 7, then 7 ÷ 7 = 1. Reading the divisors down the ladder in order gives the full factorisation directly: 2, 2, 3, 7.
The ladder always ends at 1, and the column of divisors written down the side is the complete list of prime factors, repeats included. It is usually the fastest method to do by hand, since at each step there is only one thing to check: does the smallest untried prime still divide evenly.
The factor tree
A factor tree starts from the same number but branches instead of stacking. At each step, split the current value into a prime factor and whatever remains, draw both as branches underneath, then repeat on the remaining branch until every branch ends on a prime with nothing left to divide. The tree below reads top to bottom: each split peels off a prime branch (a dead end, since primes cannot be split further) until nothing but primes is left.
For 84, one valid tree splits off 2² (the 2 appears twice, shown as one branch) leaving 21, and 21 then splits into the primes 3 and 7. A different starting split, say 84 into 4 and 21, ends at exactly the same primes once fully branched out, since the theorem below guarantees only one possible set of prime leaves whichever split you start from.
Exponent form and expanded form
Once the primes and how many times each appears are known, the same factorisation can be written two equivalent ways. Exponent form groups repeats using a small raised power, useful because it stays compact even when a prime repeats many times.
Expanded form writes every copy out in full instead, useful for seeing exactly what multiplies together without needing to read an exponent.
Both lines describe the exact same factorisation of the exact same number; exponent form is just a shorter way of writing a repeated factor, the same way 2² is shorter than writing 2 × 2.
Prime numbers: the building blocks
Every prime number is, in a sense, its own prime factorisation: since its only factors are 1 and itself, there is nothing smaller to break it into. Entering a prime number here, such as 97, returns a verdict rather than a longer breakdown, along with the working that confirms it really is prime. The table below lists the first 25 primes for quick reference.
| # | Prime |
|---|---|
| 1 | 2 |
| 2 | 3 |
| 3 | 5 |
| 4 | 7 |
| 5 | 11 |
| 6 | 13 |
| 7 | 17 |
| 8 | 19 |
| 9 | 23 |
| 10 | 29 |
| 11 | 31 |
| 12 | 37 |
| 13 | 41 |
| 14 | 43 |
| 15 | 47 |
| 16 | 53 |
| 17 | 59 |
| 18 | 61 |
| 19 | 67 |
| 20 | 71 |
| 21 | 73 |
| 22 | 79 |
| 23 | 83 |
| 24 | 89 |
| 25 | 97 |
Checking whether a number is prime: trial division to the square root
The most direct way to check whether a number is prime is trial division: try dividing it by every whole number from 2 upward and see whether any of them fits exactly. The useful shortcut is that this search never needs to go past the square root of the number being tested. If a number has a factor bigger than its own square root, that factor has to be paired with a matching factor smaller than the square root, since two numbers both bigger than the square root would multiply to something bigger than the original number. Once every whole number up to the square root has been tried and failed, no larger one can work either.
Take 97. Its square root is about 9.85, so only whole numbers up to 9 are worth testing, and only the primes among them actually need checking: 2, 3, 5 and 7. None of those divides 97 exactly. The next prime after 7 is 11, and 11² is 121, already bigger than 97, so nothing larger needs testing: 97 is prime.
This calculator uses exactly that shortcut, and the same search doubles as the factorisation method above: trial-dividing up to a million is enough to fully factorise, or fully confirm as prime, any whole number up to a trillion. Beyond that limit, this calculator says so plainly rather than guessing at an unverified answer.
The fundamental theorem of arithmetic: why the breakdown is unique
The fundamental theorem of arithmetic states that every whole number greater than 1 is either prime itself, or can be written as a product of primes in exactly one way, aside from the order the primes are written in. 84 is always 2² × 3 × 7, however it is arrived at, whether by a division ladder, a factor tree starting from a different first split, or any other route; there is no alternative set of primes that also multiplies to 84. That is what makes prime factorisation dependable as a building block for other maths: two different people, using two different methods, always land on the identical set of primes.
What about 1 and 0?
Neither 1 nor 0 gets a prime factorisation on this page, and both are excluded for good reason rather than by accident. 1 is neither prime nor composite; by convention it is the "empty product", the result of multiplying together zero primes, which is exactly why the fundamental theorem of arithmetic above is stated for whole numbers of 2 and up rather than 1 and up. 0 is excluded differently: every whole number divides 0 exactly, so there is no single meaningful set of primes that could be called 0's factorisation.
Where prime factorisation is actually used
Simplifying a fraction leans directly on prime factorisation: dividing the top and bottom of a fraction by every prime factor they share reduces it to lowest terms, exactly the working a fraction calculator carries out automatically. Finding the greatest common factor or least common multiple of two numbers is really a comparison of their prime factorisations side by side, taking the lowest or highest shared power of each prime; a greatest common factor calculator shows that comparison worked out in full, alongside the same answer reached by Euclid's algorithm.
Prime factorisation also sits underneath a large share of modern computer security: multiplying two very large prime numbers together is quick, but starting only from the product and working backwards to find those two primes again gets so slow for numbers hundreds of digits long that it underpins the RSA encryption used across much of the internet today.
Questions people ask
What is prime factorisation?
It is writing a whole number as a product of prime numbers, the smallest building blocks a number can be broken into. 84, for example, is 2² × 3 × 7; multiplying those primes back together lands exactly on 84 again.
Why does every number have only one prime factorisation?
This is the fundamental theorem of arithmetic: every whole number above 1 is prime, or breaks down into primes in exactly one way, aside from the order they are written in. However the breakdown is reached, whether by a division ladder or a factor tree starting from a different first split, the same set of primes always turns up at the end.
Is 1 a prime number, and what is its prime factorisation?
1 is neither prime nor composite. By convention it is treated as the "empty product", the result of multiplying together zero primes, so it has no prime factorisation of its own; that is exactly why the fundamental theorem of arithmetic starts at 2 rather than 1.
Why do we only need to check divisors up to the square root of a number to test if it is prime?
Because any factor larger than the square root has to be paired with a matching factor smaller than the square root; two factors both bigger than the square root would multiply to more than the original number. Once every whole number up to the square root has failed to divide evenly, nothing bigger can work either.
What is the difference between a division ladder and a factor tree?
Both reach the same primes. A division ladder repeatedly divides by the smallest prime that fits, one row at a time, in a single column. A factor tree splits a number into a prime and whatever is left, branching outward until every branch ends on a prime; it is drawn rather than stacked, but the underlying working is the same.
Is there a limit to how large a number this calculator can factorise?
Yes, stated plainly rather than hidden: factorisation is checked by trial division up to a million, which fully covers any whole number up to a trillion (10²=1,000,000²). Beyond that limit, this calculator says so rather than showing an unverified breakdown.
Where is prime factorisation actually used?
Simplifying fractions and finding a greatest common factor or least common multiple both lean directly on it. It also underpins a large share of modern computer security: multiplying two huge primes together is quick, but reversing the process for numbers hundreds of digits long is slow enough to keep RSA encryption secure.
Every result on this page comes from exact whole-number (BigInt) arithmetic, trial-divided up to a million; nothing here is rounded or approximated at any step. For every divisor of a number rather than only its prime factors, or for the greatest common factor of two or more numbers, see the related tools below.