Prime Factorization Calculator
Break any whole number up to a billion into its prime factors, with divisor count and a primality check.
How it works
Divide out each prime in turn: n = p₁ᵃ × p₂ᵇ × …
Trial division peels primes off the number: divide out every factor of 2, then 3, then 5, and so on up to the square root of what remains. Whatever is left over 1 at the end is itself prime. The exponents also reveal the divisor count — add 1 to each exponent and multiply.
Worked example
360 divides by 2 three times (360 → 180 → 90 → 45), by 3 twice (45 → 15 → 5), and 5 is prime, so 360 = 2³ × 3² × 5. Divisors: (3+1) × (2+1) × (1+1) = 24 of them.
Frequently asked questions
Why is 1 not a prime number?
If 1 counted as prime, factorizations would stop being unique — 6 could be 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3. Excluding 1 keeps every number’s prime fingerprint one of a kind.
Why only check divisors up to the square root?
Factors come in pairs that multiply to n, and in each pair one member is at most √n. If nothing up to √n divides the number, nothing above it can either (except the number itself).
What is prime factorization used for?
It is the backbone of GCF, LCM and fraction simplification, and at very large scales it protects your data: RSA encryption is secure precisely because factoring numbers with hundreds of digits is astronomically hard.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.