Math · Number theory
Prime factorization calculator.
Break a whole number into its prime factors, including very large ones up to 10^24. Shows the exponent form, the divisor count and the check product.
Inputs
Prime factors
Enter a whole number.
What is prime factorization?
Every whole number above 1 is either prime or a product of primes, and the factorization is unique apart from order. A prime is a whole number above 1 whose only divisors are 1 and itself; 1 itself is not prime (OEIS A000040). So 360 = 2^3 x 3^2 x 5, and 97 is its own factorization.
How this tool works. It divides out small primes first, then proves each remaining piece prime with the Miller-Rabin test using the first 13 prime bases. The smallest odd composite that fools all 13 of those bases is 3,317,044,064,679,887,385,961,981 (Sorenson and Webster, OEIS A014233), so for every number below 10^24 the test is a proof, not a guess. Composite pieces are split with Pollard's rho method.
Worked examples. 600,851,475,143 = 71 x 839 x 1,471 x 6,857. 999,999,999,989 x 999,999,999,959 is found as a pair of 12-digit primes in well under a second. Number of divisors. Add 1 to each exponent and multiply: 360 has (3+1)(2+1)(1+1) = 24 divisors.
Frequently asked questions
What is the prime factorization of 360?
2^3 x 3^2 x 5, which is 2 x 2 x 2 x 3 x 3 x 5. It has 24 divisors.
How do I find the prime factors of a large number?
Divide out small primes, then split what remains with a method such as Pollard rho and confirm each factor is prime. This calculator does that for any whole number below 10^24.
Is 1 a prime number?
No. A prime has exactly two divisors, 1 and itself, and 1 has only one. Treating 1 as prime would make factorizations non-unique.
How many divisors does a number have?
Add 1 to each prime exponent and multiply the results. For 2^3 x 3^2 x 5 that is 4 x 3 x 2 = 24.
Why is there a limit of 10^24?
Below that bound the primality test used here is a proof. Factoring numbers with two very large prime factors takes too long in a browser, so very large semiprimes may be refused.
Sources
Checked
The prime definition is from OEIS A000040 and the deterministic bound for the 13-base Miller-Rabin test is from OEIS A014233 (Sorenson and Webster). Everything is computed in your browser with exact BigInt arithmetic. Runs entirely in your browser. Nothing you type is sent or stored.
For learning
Factorization of very large numbers is only attempted below 10^24. Use dedicated software for cryptographic-size numbers.