Prime Factorization Calculator

Break any whole number up to 30 digits into prime factors, check if it is prime, and list its divisors.

Runs in your browser. Nothing is uploaded.

Up to 30 digits.

Prime factorisation

–

Divisors

How to use the Prime Factorization Calculator

  1. Enter a whole number of 2 or more, up to 30 digits.
  2. Read its prime factorisation in exponent form, such as 2⁴ × 3² × 5 × 7.
  3. See whether it's prime, how many divisors it has and their sum.
  4. Open the divisor list to see every factor in order.

Break any number into primes

Enter a whole number and the calculator finds its prime factors straight away, written as powers (2⁴ × 3² × 5 × 7) and in full (2 × 2 × 2 × 2 × 3 × 3 × 5 × 7). It tells you whether the number is prime and lists facts that follow from the factors.

Why prime factors are useful

  • Simplifying fractions: cancel the common prime factors of the numerator and denominator.
  • GCD and LCM: the greatest common divisor uses the primes the numbers share; the least common multiple uses all of them.
  • Square roots: pairs of equal primes come out of a root, so √72 = √(2³ × 3²) = 6√2.
  • Divisibility: the factors show at a glance what a number divides by.

Divisor facts

From the factorisation the calculator works out:

  • Number of divisors: add one to each exponent and multiply. 5040 = 2⁴ × 3² × 5 × 7 has 5 × 3 × 2 × 2 = 60 divisors.
  • Sum of divisors and whether the number is perfect.
  • Euler’s totient φ(n): how many numbers up to n share no factor with it, used in number theory and cryptography.
  • All divisors in order, when there are 2,000 or fewer.

Fast for big numbers too

Trial division works for small numbers but is far too slow for large ones. This tool combines trial division with the Miller–Rabin primality test and Pollard’s rho factoring method, so numbers up to 30 digits factor quickly in your browser.

Private

Your numbers stay on your device.

Frequently asked questions

What is prime factorisation?

Writing a number as a product of prime numbers. Every whole number above 1 has exactly one such product (apart from the order), which is why primes are called the building blocks of numbers.

How does it handle huge numbers?

It divides out small primes first, tests what remains with a Miller–Rabin primality test, and splits large composite parts with Pollard's rho algorithm. Numbers with up to 30 digits usually take a fraction of a second.

Is 1 a prime number?

No. A prime has exactly two different divisors, 1 and itself. 1 has only one divisor, so it is neither prime nor composite.

What is a perfect number?

A number equal to the sum of its divisors other than itself, like 6 = 1 + 2 + 3 or 28. The calculator tells you when you've found one.

Is my number uploaded?

No. The factorisation runs in your browser.

Tutorials