Prime Factorization Calculator

Enter a whole number to see it written as a product of primes, with its divisor count and divisor sum.

Prime Factorization Calculator

Your result will appear hereFill in the fields and press “Factorise”.

Formula

  • n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ
  • number of divisors = (a₁ + 1)(a₂ + 1)…(aₖ + 1)
  • sum of divisors = Π (p^(a+1) − 1) ÷ (p − 1)
  • Each pᵢ is a prime and aᵢ is how many times it divides n

Every whole number above 1 is a product of primes in exactly one way, ignoring order.

Worked examples

360

Whole number (2 or more)
360

Prime factorisation of 360

2³ × 3² × 5

Distinct prime factors: 2, 3, 5

Number of divisors: 24

Sum of divisors: 1,170

A prime: 9973

Whole number (2 or more)
9,973

Prime factorisation of 9,973

9,973 (prime)

Distinct prime factors: 9,973

Number of divisors: 2

Sum of divisors: 9,974

How it works

The fundamental theorem of arithmetic says every whole number greater than 1 is a product of primes in exactly one way. 360 = 2³ × 3² × 5, which means 2 divides it three times, 3 twice and 5 once. The calculator divides out the smallest primes in turn, and stops early once what remains is itself prime.

The exponents tell you more than the factors alone. Add 1 to each exponent and multiply to count the divisors — (3 + 1)(2 + 1)(1 + 1) = 24 for 360 — and use the sum formula for the total of all divisors. A number is a perfect square exactly when every exponent is even.

Factorisation underlies the HCF and LCM Calculator and the simplified radical form in the Square Root Calculator. To check a single number quickly use the Prime Number Checker, and to test divisibility by small numbers use the Divisibility Checker.

Assumptions and limits

  • Whole numbers from 2 up to 10¹⁵, factorised exactly.
  • Numbers that are the product of two very large primes take longer; if a number is too large to handle reliably the tool says so.