🔢 Prime Factorizer & Prime Checker
Is 1,000,000,007 prime? (Yes.) What is 360 as a product of primes? (2³ × 3² × 5.) Exact answers up to 19-digit numbers, plus divisor counts.
Primality via deterministic Miller–Rabin; factoring via trial division + Pollard's rho — exact for inputs up to ~10¹⁹. Runs locally, works offline.
How the prime factorizer & prime checker works
Primality is decided by the deterministic Miller–Rabin test — with a fixed witness set proven correct for every number below 3.3×10²⁴, it's a mathematical verdict, not a probability. Factorization strips small primes by trial division, then applies Pollard's rho algorithm to whatever remains, which cracks the large factors of 19-digit numbers in milliseconds. From the factorization the tool also derives the number of divisors — (e₁+1)(e₂+1)… over the prime exponents — and their sum. All of it is exact BigInt arithmetic in your browser.
The reason a real algorithm matters: ask a chatbot whether a 10-digit number is prime and you get a confident answer you cannot distinguish from a guess — primality is exactly the kind of question language models answer fluently and unreliably. Miller–Rabin with deterministic witnesses is the opposite: a proof-backed verdict. And the difficulty of factoring big numbers is not a bug but the foundation of RSA cryptography — which is also why this tool caps at ~10¹⁹: beyond that, factoring hard numbers stops being a browser job.
Frequently asked questions
What is prime factorization?
Writing a number as a product of primes: 360 = 2³ × 3² × 5. By the fundamental theorem of arithmetic, this decomposition exists and is unique for every integer above 1 — it's the number's fingerprint.
How large a number can it handle?
Up to 19 digits (~10¹⁹). Primality testing is instant at that size; factoring uses Pollard's rho, which handles even the worst case (a product of two 9–10 digit primes) in well under a second.
How is primality tested?
Deterministic Miller–Rabin with the witness set {2,3,5,…,37}, proven sufficient for all n below 3.3×10²⁴ — so within this tool's range the answer is certain, not probabilistic.
What are the divisor count and divisor sum for?
Classic number theory shortcuts derived from the factorization: 360 = 2³×3²×5 has (3+1)(2+1)(1+1) = 24 divisors. Useful for homework, puzzles and spotting highly-composite numbers.
Is my number sent anywhere?
No — all computation is local and works offline.