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.

60 = 2 x 2 x 3 x 5

All divisors

Jump to a common number

Numbers either side

NumberPrime factorsDivisorsPrime

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.

prime factors of 2prime factors of 3prime factors of 4prime factors of 5prime factors of 6prime factors of 7prime factors of 8prime factors of 9prime factors of 10prime factors of 11prime factors of 12prime factors of 13prime factors of 14prime factors of 15prime factors of 16prime factors of 17prime factors of 18prime factors of 19prime factors of 20prime factors of 21prime factors of 22prime factors of 23prime factors of 24prime factors of 25prime factors of 26prime factors of 27prime factors of 28prime factors of 29prime factors of 30prime factors of 31prime factors of 32prime factors of 33prime factors of 34prime factors of 35prime factors of 36prime factors of 37prime factors of 38prime factors of 39prime factors of 40prime factors of 41prime factors of 42prime factors of 43prime factors of 44prime factors of 45prime factors of 46prime factors of 47prime factors of 48prime factors of 49prime factors of 50prime factors of 51prime factors of 52prime factors of 53prime factors of 54prime factors of 55prime factors of 56prime factors of 57prime factors of 58prime factors of 59prime factors of 60prime factors of 61prime factors of 62prime factors of 63prime factors of 64prime factors of 65prime factors of 66prime factors of 67prime factors of 68prime factors of 69prime factors of 70prime factors of 71prime factors of 72prime factors of 73prime factors of 74prime factors of 75prime factors of 76prime factors of 77prime factors of 78prime factors of 79prime factors of 80prime factors of 81prime factors of 82prime factors of 83prime factors of 84prime factors of 85prime factors of 86prime factors of 87prime factors of 88prime factors of 89prime factors of 90prime factors of 91prime factors of 92prime factors of 93prime factors of 94prime factors of 95prime factors of 96prime factors of 97prime factors of 98prime factors of 99prime factors of 100prime factors of 101prime factors of 102prime factors of 103prime factors of 104prime factors of 105prime factors of 106prime factors of 107prime factors of 108prime factors of 109prime factors of 110prime factors of 111prime factors of 112prime factors of 113prime factors of 114prime factors of 115prime factors of 116prime factors of 117prime factors of 118prime factors of 119prime factors of 120prime factors of 125prime factors of 128prime factors of 144prime factors of 150prime factors of 160prime factors of 175prime factors of 180prime factors of 196prime factors of 200prime factors of 210prime factors of 225prime factors of 240prime factors of 250prime factors of 256prime factors of 270prime factors of 288prime factors of 300prime factors of 320prime factors of 360prime factors of 400prime factors of 441prime factors of 450prime factors of 480prime factors of 500prime factors of 512prime factors of 576prime factors of 600prime factors of 625prime factors of 720prime factors of 729prime factors of 750prime factors of 800prime factors of 900prime factors of 1000prime factors of 1024prime factors of 1200prime factors of 1500prime factors of 2000prime factors of 2025prime factors of 2026prime factors of 2048prime factors of 2500prime factors of 3000prime factors of 4096prime factors of 5000prime factors of 10000

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