Prime Factorization Calculator

Break any whole number into its prime factors, shown in exponent form like 360 = 2³ × 3² × 5.

Prime factorization
Total prime factors

How to Find the Prime Factorization

Enter a whole number greater than 1.

1

Enter the number

Type a positive whole number, such as 360.

2

Read the prime factors

The number is divided by primes until it reaches 1, giving the factorization in exponent form.

3

Use the count

The total number of prime factors (with repeats) is shown alongside.

Frequently Asked Questions

What is prime factorization?
Prime factorization expresses a whole number as a product of prime numbers. For 360 the factorization is 2³ × 3² × 5, meaning 2 × 2 × 2 × 3 × 3 × 5. By the fundamental theorem of arithmetic every integer above 1 has exactly one such factorization, apart from the order of the factors. That uniqueness is what makes prime factorization the basis for finding a GCF, an LCM or the simplest form of a fraction.
How is it calculated?
Divide the number by the smallest prime that goes into it, repeat with the quotient, and continue until you reach 1, collecting the primes as you go. For 360: 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, ÷ 5 = 1, giving 2³ × 3² × 5. Trial division only has to test primes up to the square root of n, because any larger factor pairs with a smaller one already tested. If nothing divides the number, it is prime itself.
Is 1 a prime number?
The number 1 is neither prime nor composite. A prime is defined as having exactly two distinct positive divisors, and 1 has only one, so it is excluded. Excluding it is what keeps prime factorization unique, because otherwise 6 could be written as 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3, and so on. Every prime factorization therefore starts from 2, the smallest prime.
Is my data sent anywhere?
Nothing you enter into the prime factorization calculator leaves your device. The prime factorization calculator does all of its arithmetic client-side in JavaScript, so the number you enter are never uploaded to a server. No account is needed and no calculation is stored or logged. Once the page has loaded it works with no network connection at all.