Prime factorization calculator

Type a whole number. We write it as a product of primes, for example 360 = 2³ × 3² × 5.

Prime factorization calculator

At least 2, up to 30 digits.

Result

2³ × 3² × 5Prime factorization

Number of different primes
3
2 appears 3 time(s)
3 appears 2 time(s)
5 appears 1 time(s)

Prime factorization calculator

Inputs

Whole number
360

How it is calculated

Divide by 2 as long as possible, then by 3, 5, 7… (up to 100,000).

Result

Prime factorization

2³ × 3² × 5
Number of different primes
3

How it is calculated

  1. Divide by 2 as long as possible, then by 3, 5, 7… (up to 100,000).
  2. If a large leftover is not prime, look for a factor with Pollard’s rho method.
  3. Each factor is checked with the Miller–Rabin primality test.
  4. Work time is limited: if it is not enough, the tool says so instead of freezing.

Example

360 = 2 × 180 = 2 × 2 × 90 = … = 2³ × 3² × 5.

Good to know

  • Up to 30 digits. A number made of two very large primes may be refused (“too large”).
  • Above about 25 digits, a prime factor is “probable”, not proven.

When to use it

  • Find prime factors to simplify a fraction or work out an LCM.
  • Check whether a whole number is prime.
  • Find whether a number is a perfect square: every power in its factorization is even.
  • For the full list of divisors built from these factors, use Divisors of a number.

Frequently asked questions

Is 1 a prime number?

No. A prime has exactly two divisors, 1 and itself, and 1 has only one. That is why it never appears in a factorization.

Is the factorization always the same?

Yes. Apart from the order of the factors, every whole number above 1 has only one prime factorization.

How do I get the GCD from two factorizations?

Keep the primes they share, each with its smaller power. 360 = 2³ × 3² × 5 and 84 = 2² × 3 × 7 give 2² × 3 = 12.

Updated October 10, 2026

Indicative result. For an important decision, check with a professional.