Math
Prime factorization calculator
Enter a whole number to split it into primes. You get the factorisation in exponent form, the division ladder that produces it, the full list of divisors, and how many there are.
From 2 up to 10²⁰ (100,000,000,000,000,000,000).
Division ladder
2 │ 360 2 │ 180 2 │ 90 3 │ 45 3 │ 15 5 │ 5 │ 1
All 24 divisors
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
| Divisor | × partner | = n |
|---|---|---|
| 1 | 360 | 360 |
| 2 | 180 | 360 |
| 3 | 120 | 360 |
| 4 | 90 | 360 |
| 5 | 72 | 360 |
| 6 | 60 | 360 |
| 8 | 45 | 360 |
| 9 | 40 | 360 |
| 10 | 36 | 360 |
| 12 | 30 | 360 |
| 15 | 24 | 360 |
| 18 | 20 | 360 |
Show the working, step by step
Divide by the smallest prime that goes in exactly, and repeat with the quotient until you reach 1. This is the ladder (or “upside-down division”) method.
360 ÷ 2 = 180 180 ÷ 2 = 90 90 ÷ 2 = 45 45 ÷ 3 = 15 15 ÷ 3 = 5 5 ÷ 5 = 1
The prime factors are the divisors down the left side. Group repeats with exponents.
360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5
Count the divisors: add 1 to each exponent and multiply. (Each divisor picks an exponent from 0 up to eᵢ for each prime.)
τ(360) = (3 + 1) × (2 + 1) × (1 + 1) = 24
Sum the divisors: multiply the geometric series 1 + p + … + pᵉ for each prime.
σ(360) = (2⁴ − 1)/(2 − 1) × (3³ − 1)/(3 − 1) × (1 + 5) = 15 × 13 × 6 = 1,170
The formulas
n = p₁^e₁ × p₂^e₂ × … × pₖ^eₖ number of divisors τ(n) = (e₁ + 1)(e₂ + 1)…(eₖ + 1) sum of divisors σ(n) = ∏ (pᵢ^(eᵢ+1) − 1) ÷ (pᵢ − 1)
A worked example: 360
Divide by the smallest prime that goes in, and repeat on the quotient:
2 │ 360 2 │ 180 2 │ 90 3 │ 45 3 │ 15 5 │ 5 │ 1
The primes down the left give 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. From the exponents, 360 has (3 + 1)(2 + 1)(1 + 1) = 24 divisors, and they add up to 15 × 13 × 6 = 1,170. The divisors come in pairs that multiply to 360: 1 × 360, 2 × 180, 3 × 120, and so on up to 18 × 20.
What the factorisation is used for
| Task | How the primes help |
|---|---|
| Greatest common divisor | Lowest power of each shared prime |
| Least common multiple | Highest power of each prime |
| Simplifying fractions and square roots | √360 = √(2² × 3² × 10) = 6√10 |
| Perfect squares and cubes | All exponents even (square) or multiples of 3 (cube) |
| Euler’s totient | φ(360) = 360 × ½ × ⅔ × ⅘ = 96 |
Why the factorisation is unique
The key fact is Euclid’s lemma: if a prime divides a product, it divides one of the factors. So if a number had two different prime factorisations, a prime from the first would divide the second product, hence equal one of its primes; cancel it and repeat until nothing is left. This uniqueness is why exponent counting works for divisors, GCDs and LCMs. Counting 1 as a prime would break it (2 × 3 = 1 × 2 × 3), which is the main reason 1 is left out.
Tips for doing it by hand
- Use the divisibility rules to spot factors of 2, 3, 5 and 11 without dividing.
- Once the quotient is below the square of the next prime to test, whatever is left is prime. After 45 ÷ 3 = 15 ÷ 3 = 5, the 5 is prime.
- Check by multiplying the factors back together.
Common mistakes
- Stopping at a composite factor, such as 360 = 2³ × 45. Every factor must be prime.
- Including 1 as a factor. 1 is not prime and is left out.
- Losing a repeated factor. Keep dividing by 2 until it no longer goes in before moving on to 3.
Common questions
What is prime factorisation?
Writing a whole number as a product of primes, such as 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. The fundamental theorem of arithmetic says every whole number above 1 has exactly one such factorisation, apart from the order of the factors.
What is the difference between a factor tree and the ladder method?
A factor tree splits the number into any two factors and keeps splitting until every branch ends in a prime (360 → 36 × 10 → …). The ladder divides by the smallest prime again and again: 360, 180, 90, 45, 15, 5, 1. Both give the same primes; the ladder has fewer choices to make, so the calculator shows it.
How do I find the number of divisors from the prime factorisation?
Add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5¹ that is (3 + 1)(2 + 1)(1 + 1) = 24 divisors. Each divisor chooses a power of 2 from 2⁰ to 2³, a power of 3 from 3⁰ to 3², and a power of 5 from 5⁰ to 5¹, which is 4 × 3 × 2 choices.
How is the sum of the divisors worked out?
Multiply together, for each prime, the sum 1 + p + p² + … up to its exponent. For 360: (1 + 2 + 4 + 8)(1 + 3 + 9)(1 + 5) = 15 × 13 × 6 = 1,170.
How large a number can it factorise?
Up to 10²⁰. Small factors are found by trial division, larger ones by Pollard’s rho method, and each factor is confirmed prime by a deterministic Miller–Rabin test. A product of two ten-digit primes such as 9,999,999,943 × 9,999,999,967 is split in well under a second.
Related calculators
-
Prime numbers
Test primality, next prime, nth prime.
-
GCD and LCM
Use the factorisations to find common factors.
-
Number theory toolbox
Totient, perfect numbers and more from the factors.
-
Divisibility rules
Spot small prime factors from the digits.