Prime Factorization Calculator

Calculate prime factorization, find all prime factors, and list all factors of a number with step-by-step solutions.

For learning and homework help — verify critical calculations independently.

Reviewed by CalculatorDrive Math Editorial Board · Last updated

Calculator

Enter a positive integer (max: 10^15)

Enter a positive integer to find its prime factorization, prime factors, and all factors.

The short answer

Prime factorization breaks a number down into the prime numbers that multiply together to make it. 60 = 2² × 3 × 5 — no other combination of primes works, because every integer greater than 1 has exactly one prime factorization (the Fundamental Theorem of Arithmetic). Find it by dividing repeatedly by the smallest prime that fits, moving to the next prime once it stops dividing evenly.

Key takeaways

  • Every integer greater than 1 has exactly one prime factorization — no matter which primes you try first, you land on the same result.
  • A prime number factors into just one term: itself to the first power (7 = 7¹).
  • Whether a fraction's decimal terminates or repeats traces directly back to prime factorization — only 2s and 5s in the denominator produce a terminating decimal.
  • Prime factorization gets exponentially harder for computers as numbers get larger, which is the basis for RSA encryption's security.

The division method, step by step

Start with the smallest prime, 2. If it divides the number evenly, divide and repeat with 2 again — don't move to the next prime until 2 no longer works. Once it stops dividing evenly, move to 3, then 5, then 7, and so on, always retesting the same prime before advancing. Stop when the running quotient reaches 1.

Worked example: factoring 360

360 ÷ 2 = 180

180 ÷ 2 = 90

90 ÷ 2 = 45 (2 no longer divides evenly — move to 3)

45 ÷ 3 = 15

15 ÷ 3 = 5 (3 no longer divides evenly — move to 5)

5 ÷ 5 = 1 (done)

360 = 2³ × 3² × 5

Checking the answer: 2³ = 8, 3² = 9, and 8 × 9 × 5 = 360 — confirming the factorization is correct.

Why prime factorization secures encryption

For small numbers, factoring is nearly instant — a computer factors 91 into 7 × 13 in a fraction of a second. But when the two primes involved are hundreds of digits long, multiplying them together (to build a public key) still takes milliseconds, while factoring that product back apart (breaking the key) would take longer than the age of the universe using classical computers. RSA and similar cryptographic systems build their entire security model on this practical, one-directional difficulty.

Common mistakes to avoid

  • Stopping after dividing by a prime just once — keep dividing by the same prime repeatedly until it no longer divides evenly before moving on.
  • Testing composite divisors like 4 or 6 — only prime divisors belong in a prime factorization; a composite's own prime factors would already have been found first.
  • Forgetting to collapse repeated primes into exponents — write 2 × 2 × 2 × 3 × 3 as 2³ × 3², not as five separate repeated terms.
  • Assuming every large number is hard to factor — numbers with small prime factors factor quickly regardless of size; it's specifically products of two similarly large primes that resist factoring.

Frequently Asked Questions

What is prime factorization?

Prime factorization writes a number as a product of prime numbers. Twelve = 2² × 3. Every integer greater than 1 has a unique factorization.

Why is prime factorization useful?

It helps find GCF and LCM, simplify radicals, and understand divisibility. Cryptography relies on the difficulty of factoring very large primes.

What is a prime number?

A prime has exactly two positive divisors: 1 and itself. Two, three, five, and seven are primes; four is not because 2 × 2 = 4.

How do you factor a number into primes?

Divide by the smallest prime (2) repeatedly, then try 3, 5, 7, and so on until the quotient is 1. Stop testing at √n.

How do I use this prime factorization calculator?

Enter a positive integer greater than 1 and click Calculate. The tool shows the prime factors and their exponents.

How does prime factorization relate to cryptography?

RSA encryption relies on multiplying two large prime numbers being fast, while factoring the resulting product back into those two primes is extremely slow when the primes are hundreds of digits long. This asymmetry — easy to multiply, hard to un-multiply — is what keeps encrypted data secure, even though the underlying math is just prime factorization.

More math calculators