Prime Factorization Calculator

n = p₁^a₁ × p₂^a₂ × … Trial division to find all prime factors with multiplicity.

Inputs

Result

Loading calculator…

General calculation reads

Amazon affiliate

As an Amazon Associate we may earn from qualifying purchases. This does not add cost for you.

How to use this calculator

  • Enter positive integer.
  • Read prime factorization + divisor count.

About this calculator

Every integer >1 has a unique prime factorization (Fundamental Theorem of Arithmetic). 360 = 2³ × 3² × 5. The number of divisors is the product of (exponent+1) terms: 360 has (3+1)(2+1)(1+1) = 24 divisors. Trial division is fastest for n < 10^12; beyond that, Pollard rho or quadratic sieve. Cryptographic security (RSA) relies on factoring being hard for products of two large primes.

Frequently asked

Why is factorization unique?+
Fundamental Theorem of Arithmetic — every integer >1 has exactly one prime factorization (up to order). Proven by Euclid's lemma.
How many divisors does n have?+
If n = p₁^a₁ × p₂^a₂ × …, divisor count = (a₁+1)(a₂+1)… A perfect square has odd divisor count.
How big can I factor here?+
Up to ~10^12 in milliseconds. Beyond that, slows linearly with √n. Crypto-sized (300-digit) needs specialized tools.
Why trial division?+
Simple and fast for small numbers. Used in school. Pollard rho is faster for n > 10^15. General number field sieve for crypto.
GCD/LCM use this?+
Conceptually: GCD = product of mins of each prime exponent. LCM = product of maxes. Algorithmically, Euclidean is faster than factoring.

Related calculators

More tools you might like

Hand-picked tools that pair well with this one — same audience, same intent.