ToolNimba Browse

🧮 Prime Factorization Calculator

By ToolNimba Editorial Team · Updated 2026-06-19

Prime factorization
-
Expanded product
-
Number of prime factors
-
All divisors (factors)
-

Enter a whole number greater than 1 to see its prime factorization.

This prime factorization calculator breaks any whole number greater than 1 into the prime numbers that multiply together to make it. Enter a number and you will see its factorization in compact power form (for example 60 = 2^2 x 3 x 5), the expanded product, how many prime factors it has, and the full list of every divisor. If the number is itself prime, the calculator says so, since a prime factorizes to just the number itself.

What is the Prime Factorization Calculator?

Every whole number greater than 1 is either prime or can be written as a product of prime numbers. The prime factorization is that product: the unique set of primes (with their repeats) that multiply back to the original number. For 60, that product is 2 x 2 x 3 x 5, which we usually write more compactly using exponents as 2^2 x 3 x 5. The fundamental theorem of arithmetic guarantees this factorization is unique apart from the order in which you write the factors, so every number has exactly one prime fingerprint.

The method this tool uses is trial division. It repeatedly divides the number by the smallest prime that fits: pull out all the 2s first, then test 3, 5, 7 and the other odd numbers in turn, dividing as many times as each one goes in. You only need to test divisors up to the square root of the value still left, because if no factor below the square root divides it, whatever remains must itself be prime. This is the arithmetic behind the classic factor tree you may have drawn at school, where each branch splits a number into two factors until every leaf is prime.

Knowing the prime factorization unlocks a lot of other results. The exponents tell you how many divisors a number has: multiply each exponent plus one together (for 60 = 2^2 x 3^1 x 5^1 that is 3 x 2 x 2 = 12 divisors). The factorizations of two numbers give their greatest common factor (take the lowest power of each shared prime) and their least common multiple (take the highest power of every prime that appears). Prime factorization is also the workhorse behind simplifying fractions, finding common denominators, and the difficulty that keeps modern encryption secure.

When to use it

  • Checking homework on prime factorization or building a factor tree for a school assignment.
  • Finding the greatest common factor or least common multiple of numbers by comparing their prime factorizations.
  • Simplifying fractions or reducing ratios by spotting the prime factors shared between the top and bottom.
  • Counting how many divisors a number has, or listing every factor at a glance.

How to use the Prime Factorization Calculator

  1. Type a whole number greater than 1 into the input box.
  2. Read the prime factorization in power form, shown at the top (for example 60 = 2^2 x 3 x 5).
  3. Check the expanded product, the count of prime factors, and the full list of divisors below it.
  4. Try the example buttons, or copy the divisor list with the Copy button.

Formula & method

n = p1^a1 x p2^a2 x ... x pk^ak, where p1, p2, ..., pk are the distinct prime factors of n and a1, a2, ..., ak are how many times each one divides n. Trial division tests divisors d only up to d x d less than or equal to n; any remaining value above 1 is itself prime.

Worked examples

Factorize 60.

  1. Divide by 2: 60 ÷ 2 = 30, again 30 ÷ 2 = 15. That is two 2s.
  2. 15 is odd, so test 3: 15 ÷ 3 = 5. That is one 3.
  3. 5 is prime and below the next test, so it stays as one 5.
  4. Collect the primes: 2 x 2 x 3 x 5.
  5. Write with exponents: 2^2 x 3 x 5.

Result: 60 = 2^2 x 3 x 5

Factorize 360.

  1. Pull out the 2s: 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45. That is three 2s.
  2. 45 is odd, test 3: 45 ÷ 3 = 15, ÷ 3 = 5. That is two 3s.
  3. 5 is prime, so it stays as one 5.
  4. Collect the primes: 2 x 2 x 3 x 3 x 5.
  5. Write with exponents: 2^3 x 3^2 x 5. Check: 8 x 9 x 5 = 360.

Result: 360 = 2^3 x 3^2 x 5

Factorize 97.

  1. 97 is odd, so 2 does not divide it.
  2. Test 3, 5, 7: none divide 97 evenly.
  3. The square root of 97 is about 9.8, so once we pass 9 we can stop.
  4. No prime up to 9 divides 97, so 97 has no smaller factors.
  5. 97 is therefore prime: its factorization is just itself.

Result: 97 is prime (factorization is 97)

Prime factorizations of some common numbers

NumberPrime factorizationNumber of divisors
122^2 x 36
362^2 x 3^29
602^2 x 3 x 512
1002^2 x 5^29
3602^3 x 3^2 x 524
10242^1011

The first prime numbers (have no factorization beyond themselves)

RangePrimes
1 to 202, 3, 5, 7, 11, 13, 17, 19
21 to 4023, 29, 31, 37
41 to 6041, 43, 47, 53, 59
61 to 10061, 67, 71, 73, 79, 83, 89, 97

Common mistakes to avoid

  • Listing 1 as a prime factor. The number 1 is not prime and is never part of a prime factorization. Writing 60 = 1 x 2^2 x 3 x 5 is wrong; the factorization is just 2^2 x 3 x 5. (1 is a divisor of every number, so it does appear in the full list of divisors, but not among prime factors.)
  • Stopping before peeling out a prime fully. A prime can divide a number several times. For 360 you must divide by 2 three times, not once. Keep dividing by the same prime until it no longer goes in before moving to the next one.
  • Confusing prime factors with all factors. The prime factors of 60 are 2, 3 and 5, but 60 has twelve divisors in total (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60). Prime factorization lists only the prime building blocks, not every divisor.
  • Trying to factorize 0, 1, or a negative number. Prime factorization is defined for integers greater than 1. The number 1 has no prime factors, 0 is divisible by everything, and negatives are usually handled by factorizing their absolute value and noting the minus sign separately.

Glossary

Prime number
A whole number greater than 1 whose only divisors are 1 and itself, such as 2, 3, 5, 7 and 11.
Composite number
A whole number greater than 1 that has at least one divisor other than 1 and itself, so it can be factorized into smaller primes.
Prime factorization
The unique way of writing a number as a product of prime numbers, for example 60 = 2^2 x 3 x 5.
Divisor (factor)
A whole number that divides another exactly with no remainder. 12 has the divisors 1, 2, 3, 4, 6 and 12.
Exponent
The small raised number showing how many times a prime is multiplied, so 2^3 means 2 x 2 x 2 = 8.
Fundamental theorem of arithmetic
The rule that every integer greater than 1 has exactly one prime factorization, apart from the order of the factors.

Frequently asked questions

What is prime factorization?

Prime factorization is the process of writing a whole number as a product of prime numbers. For example, 60 breaks down into 2 x 2 x 3 x 5, written compactly as 2^2 x 3 x 5. Every integer greater than 1 has exactly one such factorization, apart from the order of the factors.

How does this calculator find the prime factors?

It uses trial division. The tool divides out every factor of 2, then tests 3, 5, 7 and the other odd numbers in turn, dividing as many times as each goes in. It only needs to test divisors up to the square root of the remaining value, since anything left after that must itself be prime.

What does the calculator show if I enter a prime number?

If the number is prime, its only prime factorization is the number itself, so the calculator says so directly. For example, 97 is prime, and its only divisors are 1 and 97.

What is the difference between a factor tree and prime factorization?

A factor tree is a visual way of doing prime factorization: you split a number into two factors, then keep splitting each branch until every leaf is a prime. The prime factorization is the final list of those prime leaves multiplied together. Both give the same answer.

Why are 0 and 1 not factorized?

Prime factorization is only defined for integers greater than 1. The number 1 has no prime factors at all, and 0 is divisible by every number, so neither has a meaningful prime factorization. The calculator asks for a whole number greater than 1.

How do I find the number of divisors from the factorization?

Take each exponent in the prime factorization, add 1 to each, and multiply them together. For 60 = 2^2 x 3^1 x 5^1 that is (2+1) x (1+1) x (1+1) = 3 x 2 x 2 = 12, so 60 has 12 divisors.