Prime Factorization Calculator
Find prime factors of any integer up to 10¹². Returns expanded form and exponent form.
What this calculates
Every positive integer factors uniquely into primes — the fundamental theorem of arithmetic. This calculator decomposes any number into its prime factors using trial division (fast for numbers up to ~10¹²) and indicates whether the input is itself prime.
Formula & how it works
Trial divide by primes 2, 3, 5, 7, … up to √n. Each successful divide reduces n; remaining n > 1 after the loop is its own largest prime factor.
Worked example
360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. 97 is prime (no divisors ≤ √97 ≈ 9.85).
Frequently asked questions
What is a prime?
Positive integer > 1 with no divisors other than 1 and itself. First primes: 2, 3, 5, 7, 11, 13, 17, …
Largest input?
Around 10¹². Above that, trial division gets slow — production cryptography uses different algorithms (Pollard rho, GNFS).
Why factorize?
Foundation of number theory, simplifying fractions, GCD/LCM, modular arithmetic, and the security of RSA encryption.