Prime Factorization Calculator With Steps

Enter a whole number to find its prime factors by repeated division. You will also get the number of positive divisors, a simplified square root, and an exact multiplication check.

Written and checked by TheToolNet Editorial Team · Last reviewed: August 22, 2026 · How we check math tools

Prime-factor form
360 = 2³ × 3² × 5

A composite number is divided by the smallest prime that fits until only prime factors remain.

Factor a number step by step

Use an integer from 2 through 1,000,000,000,000. Calculation stays in your browser.

How to find prime factors by division

  1. Try 2 first. If it divides exactly, record 2 and divide again.
  2. Continue with 3, 5, 7, 11, and later primes as needed.
  3. When the quotient is 1—or the remaining quotient is prime—the listed primes are complete.
  4. Group repeated factors with exponents. For example, 2 × 2 × 2 becomes 2³.

The calculator tests divisors only as far as the square root of the remaining quotient. If none divides by that point, the quotient itself must be prime.

Square root using prime factorization

Prime factorization makes equal pairs visible. Every pair can move outside the radical as one copy. For 72 = 2³ × 3², take one pair of 2s and one pair of 3s outside: √72 = 2 × 3 × √2 = 6√2. A square root is an integer exactly when every prime exponent is even.

HCF by prime factorization

Factor each number, then keep only primes shared by every number at their smallest exponent. For 48 = 2⁴ × 3 and 180 = 2² × 3² × 5, the shared part is 2² × 3 = 12. Use the GCD and LCM calculator when you need to compare two or more numbers; it shows both prime factors and Euclidean steps.

Worked example: prime factorization of 84

Divide 84 by 2 to get 42, divide 42 by 2 to get 21, divide 21 by 3 to get 7, and stop because 7 is prime. Therefore 84 = 2² × 3 × 7. Multiplying 4 × 3 × 7 returns 84, which verifies the factorization.

Edge cases and limits

Zero and one do not have prime factorizations. A prime number is already its own prime factor. Negative integers can be written as −1 times the factorization of their absolute value, but this tool accepts positive integers only. The input cap keeps trial division responsive in ordinary browsers.

Frequently asked questions

What is prime factorization?

It is the unique way to write an integer greater than one as a product of primes, apart from changing their order.

Is 1 a prime factor?

No. One is a unit, not a prime, because it has only one positive divisor.

How do I use prime factors for a square root?

Pair equal factors. Move one factor from each pair outside the radical and leave unpaired factors inside.

Does the calculator show the division method?

Yes. The result lists every exact division and the remaining quotient.

Related tools and reference

Use the prime number checker for a direct primality test, or the GCD and LCM calculator for HCF and LCM from several numbers.