Prime Factorization Calculator

Decompose any integer greater than one into its exact prime factors and compact exponential form.

Find prime factors
Enter a positive whole number greater than one.

About prime factorization

Prime factorization expresses a positive integer as a product of prime numbers. A prime number has exactly two positive divisors, one and itself, so primes act as the indivisible building blocks of whole-number multiplication. For example, 360 can be written as 2 × 2 × 2 × 3 × 3 × 5, or more compactly as 2³ × 3² × 5. The fundamental theorem of arithmetic guarantees that every integer greater than one has exactly one prime factorization apart from the order of its factors. The calculator uses trial division. It first removes every factor of two, recording how many times the division succeeds. It then tests odd candidate divisors in increasing order. Testing can stop when the candidate squared exceeds the remaining number, because any composite remainder would have had a factor no larger than its square root. If a remainder greater than one survives, that remainder is prime and becomes the final factor. Exponents make repeated factors easy to read. In 2³, the exponent three means that three copies of two are multiplied. A prime that occurs once is displayed without an exponent. The reported distinct-factor count tells you how many different primes occur, not how many prime factors occur when repetitions are counted. Thus 360 has three distinct prime factors but six factors when multiplicity is included. Prime factorization is useful for reducing fractions, finding greatest common divisors and least common multiples, identifying perfect squares or cubes, and solving divisibility problems. To find a greatest common divisor, compare factorizations and take each shared prime at its smaller exponent. To find a least common multiple, take every prime that appears at its larger exponent. A number is a perfect square exactly when all exponents in its prime factorization are even. Cryptography also relies on the difference between multiplication and factorization. Multiplying two large primes is straightforward, while recovering them from their product can be computationally difficult. This browser calculator is designed for ordinary educational and practical integers, not for attacking cryptographic key sizes. Very large prime inputs can require many trial divisions, although obvious small factors are removed quickly. The domain begins at two because one is neither prime nor composite and has an empty prime product. Zero and negative integers need additional conventions: zero has no prime factorization, while a negative integer can be represented by -1 times the factorization of its absolute value. Enter a positive integer here to receive the standard unique form used in arithmetic and number theory.

Prime factorization examples

Repeated prime factors are grouped with exponents.

IntegerPrime factorizationObservation
122² × 3Two occurs twice and three occurs once.
842² × 3 × 7The number has three distinct prime factors.
3602³ × 3² × 5The exponents account for all six repeated factors.
9797A prime number is its own complete factorization.

How to use the prime factorization calculator

  1. Enter a positive whole number greater than one.
  2. Choose Find Prime Factors to test divisors and collect repeated factors.
  3. Read the compact product, where exponents indicate repeated primes.
  4. Use the factors for divisibility, fraction, GCD, or LCM work.

Prime factorization calculator FAQ

Is one a prime number?

No, one has only one positive divisor and does not meet the definition of prime. Excluding it also keeps prime factorizations unique.

Can a prime number be factorized?

Its prime factorization is simply the number itself. There are no smaller prime factors to extract.

Why is prime factorization unique?

The fundamental theorem of arithmetic proves uniqueness for every integer greater than one. Factor order may change, but the primes and their exponents cannot.

How does factorization help find a GCD?

Factor both numbers and identify their shared primes. Multiply those shared primes using the smaller exponent from the two factorizations.

What does an exponent mean in the result?

It records how many times the same prime occurs as a factor. For example, 2³ means 2 multiplied by itself three times.