Prime Factorization Calculator

Write any whole number as a product of primes, with the division ladder, every divisor and the divisor count and sum.

Number

Whole number from 2 to 9,007,199,254,740,991. Difficult cases may reach a work limit.

Division ladder

Divide by the smallest prime that fits until you reach 1.

  1. 2720
  2. 2360
  3. 2180
  4. 290
  5. 345
  6. 315
  7. 55
  8. 1

Results

Prime factorisation
2⁴ × 3² × 5
720 = 2 × 2 × 2 × 2 × 3 × 3 × 5
Type
Composite
Distinct primes: 2, 3, 5
Number of divisors
30
(4 + 1)(2 + 1)(1 + 1) = 30
Sum of divisors
2,418
Sum of every divisor, including the number

All 30 divisors of 720

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 30, 36, 40, 45, 48, 60, 72, 80, 90, 120, 144, 180, 240, 360, 720

The fundamental theorem of arithmetic

Every whole number n>1n > 1 can be written as a product of prime powers in exactly one way. Euclid came close to it in the Elements; Gauss gave the first complete proof in 1801.

n=p1a1×p2a2×⋯×pkakn = p_1^{a_1} \times p_2^{a_2} \times \dots \times p_k^{a_k}

Counting and adding divisors

Every divisor of nn uses the same primes, each with an exponent from 0 up to its exponent innn. That gives the count τ(n)\tau(n) and the sum σ(n)\sigma(n):

τ(n)=(a1+1)(a2+1)⋯(ak+1)\tau(n) = (a_1 + 1)(a_2 + 1)\cdots(a_k + 1)
σ(n)=∏i=1kpiai+1−1pi−1\sigma(n) = \prod_{i=1}^{k} \frac{p_i^{a_i + 1} - 1}{p_i - 1}

Worked example: 720

These are the calculator's default numbers. Divide by the smallest prime that goes in exactly, each time:

Trial division of 720
StepDivisionQuotient
Step 1720 ÷ 2360
Step 2360 ÷ 2180
Step 3180 ÷ 290
Step 490 ÷ 245
Step 545 ÷ 315
Step 615 ÷ 35
Step 75 ÷ 51

The primes used are 2, 2, 2, 2, 3, 3 and 5, so 720 = 24 × 32 × 5. The number of divisors is (4 + 1)(2 + 1)(1 + 1) = 30, and their sum is 31 × 13 × 6 = 2,418.

Where prime factors help

  • GCD and LCM: take the lowest power of each shared prime for the GCD, and the highest power of every prime for the LCM.
  • Simplifying fractions and roots: 720 = 24 × 32 × 5, so √720 = 22 × 3 × √5 = 12√5.
  • Perfect squares and cubes: a number is a perfect square exactly when every exponent is even.
  • Checking divisibility: 1,200 = 2⁴ × 3 × 5², so it is divisible by 8 and 25 but not by 9.

Frequently asked questions

What is the fundamental theorem of arithmetic?
Every whole number greater than 1 is either prime or can be written as a product of primes in exactly one way, apart from the order of the factors. For example, 1,200 = 24 × 3 × 52, and no other set of primes multiplies to 1,200.
How do you find the number of divisors from the prime factorisation?
Add 1 to each exponent and multiply the results. If n = pa × qb × rc, then n has (a + 1)(b + 1)(c + 1) divisors. For example, 12 = 22 × 3 has (2 + 1)(1 + 1) = 6 divisors: 1, 2, 3, 4, 6 and 12.
Is 1 a prime number?
No. A prime has exactly two positive divisors, 1 and itself. The number 1 has only one divisor, so it is neither prime nor composite. Leaving it out is what makes prime factorisations unique.
What is trial division?
It is the simplest way to factorise: try dividing by 2, then 3, 5, 7 and so on. Whenever a divisor goes in exactly, divide it out and keep going. You only need to try divisors up to the square root of what is left; if none divides it, what is left is prime.
What is a factor tree or division ladder?
Both are ways to write out the factorisation by hand. A factor tree splits a number into two factors and keeps splitting until every branch ends in a prime. A division ladder divides by the smallest prime at each step, writing the prime on the left and the quotient below, until the quotient is 1. The primes on the left are the prime factors.
How large a number can I factorise here?
Whole numbers from 2 to 9,007,199,254,740,991 are accepted without losing digits. Small prime division, Miller-Rabin primality checks and Pollard-Brent factorisation handle large values. A fixed work limit stops difficult cases and asks for a smaller number; speed depends on the device.
Esc