Prime Factorization Calculator
n = p₁^a₁ × p₂^a₂ × … Trial division to find all prime factors with multiplicity.
Result
Loading calculator…
—
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
GCD (Greatest Common Divisor) Calculator
Euclidean algorithm: gcd(a,b) = gcd(b, a mod b). Supports 2-6 integers.
LCM (Least Common Multiple) Calculator
lcm(a,b) = |a × b| / gcd(a,b). Smallest number that both a and b divide evenly.
Prime Number Checker
Is n prime? Trial division up to √n; identifies smallest divisor and nearest primes if composite.
Factorial Calculator (n!)
n! = 1 × 2 × … × n. Computes exactly up to 21! (number limit); approximate via Stirling for larger.
Scientific Notation Converter
Convert decimal ↔ scientific notation. Standard form a × 10^b with 1 ≤ |a| < 10.
Square Root Calculator (√n)
√n with integer-perfect-square check, simplified surd form, and decimal expansion.