Skip to content
Run here 100% in your browser, no upload, no login

Prime Factorization Calculator

Factor integers up to 10^12 into primes locally, with divisor count and divisor sum.

Trial division plus Pollard Rho on BigInt. Numbers above 10^12 are rejected instead of guessed.

Prime factorization

Distinct prime factors
Divisor count
Divisor sum

How to use it

  1. Enter a whole number between 2 and 10^12. Spaces and underscores are ignored.
  2. The result shows the standard prime factorization, such as 600851475143 = 71 x 839 x 1471 x 6857.
  3. Below it you get the count of distinct prime factors, the number of divisors and the sum of all divisors.
  4. The status line reports how long the factorization took; most numbers finish in milliseconds.
  5. Larger inputs above 10^12 are rejected with a clear message instead of a guess.

Common use cases

Why it stays private

All arithmetic runs in your browser with BigInt, using deterministic Miller-Rabin and Pollard Rho. No number is sent anywhere, and results recompute as you type.

FAQ

Q: Why is there a 10^12 limit? A: Pollard Rho is fast for the factors a calculator-sized input can have, but worst-case semiprimes near 10^12 can already take seconds. The limit keeps responses instant; anything larger is refused rather than estimated.

Q: How is primality decided? A: Deterministic Miller-Rabin with a fixed set of bases that has no pseudoprimes below 3.3x10^24, so the answer is exact, not probabilistic.

Q: What are divisor count and divisor sum? A: If the factorization is p^a x q^b, the divisor count is (a+1)(b+1) and the divisor sum multiplies the geometric series 1 + p + ... + p^a for each prime. Both are computed from the factorization you see.

Q: Does it handle repeated factors? A: Yes. Powers are collapsed with exponents, so 1024 shows as 2^10 rather than ten copies of 2.

Your data stays on this device

Prime Factorization Calculator runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.