Skip to content

Prime factorization calculator

Break any whole number up to 10¹⁵ into its prime factors, see the step-by-step division ladder, find out whether the number is prime and how many divisors it has.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Enter a whole number of 2 or more.
  2. Read the prime factorization with exponents.
  3. Check whether it is prime and how many divisors it has.
  4. Review the division steps.
Try it now

What prime factorization is

Every whole number greater than 1 is either a prime (divisible only by 1 and itself) or can be written as a product of primes in exactly one way, apart from the order. This is the fundamental theorem of arithmetic, and that product is the number's prime factorization.

Example: 360 = 2 · 2 · 2 · 3 · 3 · 5 = 2³ · 3² · 5

The calculator writes the result with exponents, lists the distinct prime factors, tells you whether the number is prime and counts its divisors. It handles numbers up to 10¹⁵ in your browser.

The division ladder

The calculator shows the same method you would use on paper: keep dividing by the smallest prime that divides the number.

NumberPrime divisor
3602
1802
902
453
153
55
1

Reading down the right-hand column gives 2 · 2 · 2 · 3 · 3 · 5. A factor tree gives the same result; it just splits the number into any two factors at each step until only primes remain.

Counting divisors

Once you have the factorization, the number of divisors follows from the exponents: add 1 to each exponent and multiply.

360 = 2³ · 3² · 5¹, so it has (3 + 1)(2 + 1)(1 + 1) = 24 divisors.

More examples:

  • 1,001 = 7 · 11 · 13 (8 divisors)
  • 1,024 = 2¹⁰ (11 divisors)
  • 97 is prime (2 divisors: 1 and 97)

Divisibility shortcuts

Quick tests help when factoring by hand:

  • 2: the last digit is even.
  • 3: the sum of the digits is divisible by 3 (360: 3 + 6 + 0 = 9).
  • 5: the number ends in 0 or 5.
  • 9: the digit sum is divisible by 9.
  • 11: the alternating sum of the digits is divisible by 11 (1,001: 1 − 0 + 0 − 1 = 0).

You only need to test primes up to the square root of the number. If none divide it, the number is prime. That is how the calculator decides that 97 is prime: it checks 2, 3, 5 and 7, since 11² is already larger than 97.

Why it is useful

Prime factorizations make other calculations easy. The GCF calculator multiplies shared primes at their lowest powers, and the LCM calculator multiplies all primes at their highest powers. Factorizations also help simplify fractions and square roots: √360 = √(2² · 3² · 2 · 5) = 6√10.

Primes are the basis of public-key cryptography, which relies on the fact that multiplying two huge primes is easy but factoring their product back is extremely hard.

Common mistakes

  • Including 1 or composite factors. 360 = 4 · 90 is a factorization, but not a prime one. Keep splitting until every factor is prime.
  • Treating 1 as prime. It is not, so it never appears in a prime factorization.
  • Missing repeated factors. After dividing by 2 once, try 2 again before moving on to 3.
  • Testing too far. You never need to test a divisor larger than the square root of what is left. If nothing up to that point divides it, what remains is prime.
  • Assuming odd means prime. 91 looks prime but equals 7 × 13, and 1,001 is 7 × 11 × 13.

Frequently asked questions

What is the prime factorization of 360?

2³ · 3² · 5, that is 2 · 2 · 2 · 3 · 3 · 5.

How do I know if a number is prime?

Test divisibility by primes up to its square root. If none divide it, it is prime. The calculator does this for you.

Is 1 a prime number?

No. A prime has exactly two divisors, 1 and itself; 1 has only one.

How many divisors does a number have?

Add 1 to each exponent in the prime factorization and multiply. 360 = 2³ · 3² · 5 has 4 · 3 · 2 = 24 divisors.

How large a number can I factor?

Whole numbers from 2 up to 10¹⁵.

Last updated: November 12, 2026

Recommended

Similar tools

If Prime factorization calculator helped, you may need these too.

See all in category →

People also use