Prime Factorisation Calculator with Division Ladder and Steps

Enter any whole number and this tool writes it as a product of prime numbers. It shows the division ladder step by step, the answer in exponent form, how many factors the number has, the full list of factors, and whether the number is a perfect square or a perfect cube. It is made for students of Classes 6 to 10 who want to check their working.

A whole number from 2 up to 1015

What is prime factorisation?

A prime number has exactly two factors, 1 and itself (2, 3, 5, 7, 11, 13, ...). A composite number has more than two factors. Prime factorisation means writing a composite number as a product of primes only. For example, 12 = 2 × 2 × 3. The Fundamental Theorem of Arithmetic (Class 10, Real Numbers) says that every composite number can be written as a product of primes in exactly one way, if we ignore the order of the factors.

How the division ladder works

  1. Write the number on the right of a vertical line.
  2. Divide by the smallest prime that divides it exactly (try 2, then 3, then 5, 7, 11 and so on). Write the prime on the left and the quotient below.
  3. Repeat with the quotient until you reach 1.
  4. The primes on the left side, multiplied together, give the number.

You only need to try primes up to the square root of the number left over. If no prime up to its square root divides it, that number is itself prime.

Using the prime factorisation

If N = pa × qb × rc, where p, q and r are different primes, then:

  • Number of factors of N = (a + 1) × (b + 1) × (c + 1)
  • N is a perfect square if every power a, b, c is even. To make N a perfect square, multiply it by each prime that has an odd power.
  • N is a perfect cube if every power is a multiple of 3.

Worked example

Question: Find the prime factorisation of 1260. How many factors does it have? What is the smallest number by which 1260 must be multiplied to make it a perfect square?

Division ladder: 1260 ÷ 2 = 630, 630 ÷ 2 = 315, 315 ÷ 3 = 105, 105 ÷ 3 = 35, 35 ÷ 5 = 7, 7 ÷ 7 = 1.

So 1260 = 2 × 2 × 3 × 3 × 5 × 7 = 22 × 32 × 5 × 7.

Number of factors = (2 + 1) × (2 + 1) × (1 + 1) × (1 + 1) = 3 × 3 × 2 × 2 = 36.

Perfect square: the powers of 5 and 7 are odd (1 each). Multiply by 5 × 7 = 35. Then 1260 × 35 = 44,100 = 22 × 32 × 52 × 72, and √44,100 = 2 × 3 × 5 × 7 = 210.

Common mistakes

  • Stopping at a composite number such as 9, 15 or 21 and writing it as a "prime factor". Every number on the left of the ladder must be prime.
  • Dividing by a composite number like 4 or 6 in the ladder. Divide only by primes.
  • Writing 1 as a factor in the product, for example 12 = 1 × 2 × 2 × 3. 1 is not a prime number, so it is left out.
  • Forgetting to add 1 to each power when counting factors. 22 × 3 has (2 + 1) × (1 + 1) = 6 factors, not 2 × 1 = 2.
  • Thinking 51 or 91 are prime. 51 = 3 × 17 and 91 = 7 × 13, so always test the primes up to the square root.

Practise with

The tool works with whole numbers from 2 up to 1015. The full list of factors is shown when there are 200 factors or fewer.