Prime Factorization Calculator

Break any whole number down into its prime factors instantly.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Prime factorization calculator

Enter any whole number and instantly see its prime factorization — the unique product of prime numbers that make it up, shown in exponent form like 360 = 2^3 × 3^2 × 5. It is useful for simplifying fractions, finding GCDs and LCMs, and understanding the building blocks of a number.

How it works

The tool uses trial division, dividing out each prime factor completely before moving on:

start at d = 2
while d × d ≤ remaining:
  while remaining is divisible by d: divide it out, count the power
  move to the next d
if remaining > 1, it is itself a prime factor

Counting how many times each prime divides gives the exponent form. If nothing smaller than the number divides it, the number is reported as prime.

Example

Factorizing 360:

  • 360 ÷ 2 = 180 ÷ 2 = 90 ÷ 2 = 45 → 2 appears 3 times
  • 45 ÷ 3 = 15 ÷ 3 = 5 → 3 appears 2 times
  • 5 is prime → 5 appears 1 time
  • Result: 360 = 2³ × 3² × 5
NumberPrime factorization
122² × 3
1002² × 5²
3602³ × 3² × 5
9797 (prime)

Everything runs locally in your browser, so your numbers never leave your device.

Ad placeholder (rectangle)