Prime Factorisation Calculator: Factors, GCD and LCM
Heading to the field? Install this site from your browser menu and this tool works with no signal. See how
Prime Factorisation Calculator
Breaks a number into its prime factors, lists every divisor, and says whether it is prime. Every whole number above one has exactly one prime factorisation, which is what makes this the most fundamental thing you can know about a number.
All divisors
Jump to a common number
Numbers either side
| Number | Prime factors | Divisors | Prime |
|---|
Every row and chip is a live link you can bookmark or share.
How to use this tool
Type a number. You get the prime factorisation, the same thing written with exponents, every divisor as a clickable link, and whether the number is prime. The second box lets you compare against another number for the greatest common divisor and lowest common multiple, which is the usual reason people are factorising in the first place.
The green box shows the actual division steps rather than just the answer, because seeing 60 divided by 2 is 30, then by 2 is 15, then by 3 is 5 is what makes the method stick.
Why the answer is always unique
Every whole number above one can be written as a product of primes in exactly one way, ignoring the order. That statement is the fundamental theorem of arithmetic, and it is why prime factorisation is worth doing at all.
Sixty is 2 times 2 times 3 times 5, and there is no other set of primes that multiplies to sixty. You can start dividing by 5 instead of 2 and take a different route, but you always arrive at the same collection. That uniqueness is what lets you read off the greatest common divisor and the lowest common multiple by comparing two factorisations, and it is why the divisor count can be worked out without listing them.
This is also the honest reason one is not prime. If it were, you could write 60 as 1 times 2 times 2 times 3 times 5, or with a hundred ones in front, and the factorisation would stop being unique. Excluding one is not an arbitrary convention, it is what keeps the theorem true.
Counting divisors without listing them
Write the factorisation with exponents and add one to each exponent, then multiply. That gives the number of divisors, and it works because every divisor is built by choosing how many of each prime to include.
Sixty is 2 squared times 3 times 5. The exponents are 2, 1 and 1. Add one to each to get 3, 2 and 2, multiply and you get 12. Sixty has exactly twelve divisors, and the tool lists all twelve so you can check.
A useful consequence: a number has an odd count of divisors only when it is a perfect square. Divisors normally pair up, one below the square root with one above, and the only way to break the pairing is for the square root to pair with itself.
A worked check you can repeat on paper
Factor 60 by trial division. Start at 2: sixty halves to thirty, thirty halves to fifteen, and fifteen is odd so stop with 2. Move to 3: fifteen divided by three is five. Move to 5: five divided by five is one. The primes collected are 2, 2, 3, 5, and multiplying them gives sixty.
You never needed to test past the square root. Once the running number drops below the square of the divisor you are testing, whatever is left must itself be prime. That is why factoring 97 finishes almost immediately: nothing up to 9 divides it, so it is prime.
Try this year for a less tidy example. 2026 is even, so halve it to 1013. Test upward and nothing divides 1013 before its square root of about 31.8, so 1013 is prime and 2026 is 2 times 1013.
Mistakes that catch people out
Counting 1 as a prime factor. It is a divisor of everything and a prime factor of nothing. Including it would break the uniqueness that makes factorisation useful.
Stopping too early. After dividing out a factor you have to try the same prime again. Sixty gives up two twos, and quitting after the first leaves you with 2 times 30 rather than a factorisation.
Confusing factors with prime factors. Sixty has twelve divisors but only three distinct primes. The divisor list and the factorisation answer different questions.
Expecting large numbers to factor quickly. Trial division slows down badly as numbers grow, and that difficulty is not a flaw. Public key cryptography rests on the fact that multiplying two large primes is easy while recovering them is not.
Prime factors of common numbers
The numbers people look up most. Each opens the calculator on that value with its own address.
How this was checked
The strongest available test was run across the whole working range. Every number from 2 to 20000 was factorised and the factors multiplied back together, and all 19999 returned the original number. Any missed repeat or premature stop would have shown up immediately as a product that did not match.
Individual cases were checked against known answers: 60 gives 2 times 2 times 3 times 5, 100 gives 2 times 2 times 5 times 5, 1024 gives ten twos, and 97 comes back as prime rather than being broken up. The divisor lists were checked too, with 36 giving 1, 2, 3, 4, 6, 9, 12, 18 and 36, which is nine divisors and odd because 36 is a perfect square.
The greatest common divisor was verified with the Euclidean algorithm against worked examples, and the lowest common multiple derived from it, so that the two agree by construction rather than by coincidence.
Related Calculators and Reference
- Decimal to Fraction Converter for reducing a fraction, which is exactly cancelling shared prime factors.
- Ratio and Proportion Calculator for simplifying ratios using the same greatest common divisor.
- Binary, Hex and Decimal Converter for why powers of two factor so cleanly.
- Number to Words Converter for writing the result out in full.
- Square Root Calculator: square, cube and nth roots in simplest radical form.
- Long Division Calculator: see why only 2s and 5s make a decimal end.
- GCF Calculator: the greatest common factor of a list of numbers, by factor lists, primes and Euclid’s algorithm.
- LCM Calculator: the least common multiple of a list of numbers, with a fractions mode for common denominators.
