Prime factorization calculator

Enter a whole number above 1 to get its unique prime factorization, such as 360 = 2³ × 3² × 5. Handy for homework, simplifying roots and finding GCD and LCM.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter number.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

n = p1^e1 × p2^e2 × p3^e3 and so on, found by repeated division by small primes, then Pollard rho for large factors. Number of divisors = the product of (e + 1) over every exponent.

Example

Inputs: Number = 360. Result: Prime factorization: 2³ × 3² × 5; Distinct prime factors: 3; Number of divisors: 24.

Limits and caveats

  • Accepts whole numbers from 2 to 10^15.
  • Zero, 1 and negative numbers have no prime factorization in the usual sense.

Questions about this tool

Is the prime factorization unique?

Yes. By the fundamental theorem of arithmetic every number above 1 has exactly one factorization into primes, ignoring order.

How do I get the number of divisors from it?

Add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5 that is (3+1)(2+1)(1+1) = 24 divisors.

What if the result is the number itself?

If the number appears alone, it is prime, like 97.