Prime Factorization Calculator

Break a number into its prime factors and count its divisors.

Prime factorization
Distinct primes
Prime factors (with repeats)
Number of divisors
Is it prime?

Works on whole numbers from 2 upward. Very large numbers may take a moment to factor.

The building blocks of numbers

Primes are the atoms of arithmetic. Every whole number above 1 is either prime or a unique product of primes — a fact so central it is called the fundamental theorem of arithmetic.

360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5

The calculator divides out the smallest prime repeatedly, then the next, and so on, until only 1 remains — collecting the factors and tallying the divisors along the way.

Worked example

360 factors into 2³ × 3² × 5. Its distinct primes are 2, 3 and 5, and it has 24 divisors in all — found by multiplying (3+1)(2+1)(1+1).

Why primes matter

Once you have the prime factorization, a lot falls out for free: simplifying fractions, computing greatest common divisors and least common multiples, and counting divisors. On a grander scale, the difficulty of factoring huge numbers keeps much of modern encryption secure.

Quick checks

  • Even? Factor out 2. Keep halving while it stays even.
  • Digit sum divisible by 3? Then so is the number.
  • Ends in 0 or 5? It has a factor of 5.

Frequently asked questions

What is prime factorization?
Writing a number as a product of prime numbers — those divisible only by 1 and themselves. Every whole number above 1 has exactly one such factorization.
How is the divisor count found?
Add 1 to each prime’s exponent and multiply the results. For 2³ × 3² × 5, that is 4 × 3 × 2 = 24 divisors, including 1 and the number itself.
What if the number is prime?
Then its only factorization is itself, and it has exactly two divisors: 1 and the number. The calculator flags primes for you.
Where is this useful?
Prime factors underpin simplifying fractions, finding GCDs and LCMs, and modern cryptography, which leans on how hard it is to factor very large numbers.