Skip to content
K Knidox Search…
Math · Number Theory

Prime Factorization Calculator

Break a whole number into its prime factors, in exponent and expanded form, with the division steps.

A whole number from 2 to 1,000,000,000,000.
Prime factorization of 360
2³ × 3² × 5composite

3 distinct primes · expanded form 2 × 2 × 2 × 3 × 3 × 5.

Factor tree — each split peels off the smallest prime
Factor tree for 360360180904515522233
Try a number

The prime factorization of a number is the unique set of prime numbers that multiply to give it. For example, 360 = 2³ × 3² × 5 — that is 2 × 2 × 2 × 3 × 3 × 5. Every whole number greater than 1 has exactly one such factorization, a fact known as the fundamental theorem of arithmetic.

What prime factorization means

A prime is a whole number above 1 whose only divisors are 1 and itself (2, 3, 5, 7, 11, …). To factorize an integer n is to write it as a product of primes. A composite number splits into two or more prime factors, while a prime number factors only as 1 × itself. The result is usually written in exponent form, where repeated primes are grouped as powers — 2 × 2 × 2 × 3 × 3 × 5 becomes 2³ × 3² × 5.

The trial-division method

The calculator uses trial division. Start with the smallest prime, 2, and divide n by it as many times as it goes evenly; each division records one factor. Move to the next prime (3, then the odd numbers 5, 7, 9, …) and repeat. You only need to test divisors up to √n: if nothing up to that bound divides the remaining number, whatever is left is itself prime. Reading the divisors down the ladder gives the full factorization.

  1. 1
    Start with the smallest prime. Divide n by 2 repeatedly while it stays even. For 360: 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45. That is three 2s.
  2. 2
    Move to the next prime. 45 is odd, so try 3: 45 ÷ 3 = 15, 15 ÷ 3 = 5. That is two 3s.
  3. 3
    Continue up the primes. Try 5: 5 ÷ 5 = 1. That is one 5. Only test primes up to √n; once the quotient reaches 1 you are done.
  4. 4
    Collect and group the factors. The divisors used were 2, 2, 2, 3, 3, 5, so 360 = 2 × 2 × 2 × 3 × 3 × 5. Grouping repeats as powers gives the exponent form 2³ × 3² × 5.

Prime factorizations of some common numbers

A prime factors only as 1 × itself; 97 is prime, so its factorization is just 97.

NumberPrime factorization
122² × 3
1002² × 5²
3602³ × 3² × 5
9797 (prime)
10242¹⁰
10002³ × 5³

Why it is unique — and why it matters

The fundamental theorem of arithmetic guarantees that every integer greater than 1 is either prime or can be written as a product of primes in exactly one way, apart from the order of the factors. There is no second, different set of primes that multiplies to 360. This uniqueness is why 1 is excluded from the primes: allowing it would let you insert 1 × 1 × … endlessly and break the “exactly one” guarantee.

Prime factorization is the backbone of much of number theory. It gives a direct route to the greatest common divisor and least common multiple of two numbers — take the shared primes for the GCD, and the highest power of each prime for the LCM. It also underlies fraction simplification and, in the form of very large factors, the difficulty behind modern public-key cryptography.

What is the prime factorization of 360?
360 = 2³ × 3² × 5, which is 2 × 2 × 2 × 3 × 3 × 5. It has three distinct prime factors — 2, 3, and 5 — and multiplying the powers back gives 8 × 9 × 5 = 360.
What is the fundamental theorem of arithmetic?
It states that every whole number greater than 1 is either prime or can be written as a product of primes in exactly one way, apart from the order of the factors. This is why prime factorization is unique — there is never a second, different set of primes for the same number.
How is this different from checking if a number is prime?
A prime checker only answers yes or no: does n have any divisor besides 1 and itself? This tool goes further and breaks a composite number all the way down into the primes that multiply to make it, showing each division step and the exponent form.
What is the prime factorization of a prime number?
A prime number factors only as 1 × itself, so its prime factorization is just the number on its own. For example 97 is prime, so its factorization is simply 97 — it has a single prime factor and cannot be broken down further.
Why does the method only test divisors up to the square root?
If a number n has a factor larger than √n, the matching co-factor must be smaller than √n and will already have been found. So once you have divided out every prime up to √n, whatever remains above 1 must itself be prime.
What is exponent form versus expanded form?
Expanded form lists every prime factor separately, such as 2 × 2 × 2 × 3 × 3 × 5. Exponent form groups repeated primes into powers, giving the more compact 2³ × 3² × 5. Both describe the same factorization of 360.