Prime Factorization Calculator
Factor integers up to 2^53 into primes with exponent form, factor tree, all divisors, divisor count and sum, plus batch mode.
🔒 Runs entirely in your browser — nothing is uploadedBreaking a number into primes
Every integer greater than 1 can be written as a product of prime numbers in exactly one way, apart from the order of the factors. This is the fundamental theorem of arithmetic, and the prime factorization of a number is that unique product. For example, 360 = 2³ × 3² × 5. This calculator finds the factorization of any whole number up to 9,007,199,254,740,991, which is 2^53 − 1 and the largest integer a browser can represent exactly. Results appear in exponent form, in fully expanded form and as a factor tree.
Divisors, their count and their sum
Once you know the prime factorization, many other properties follow directly. If a number equals p₁^a₁ × p₂^a₂ × …, the number of positive divisors is (a₁ + 1)(a₂ + 1)…, because each divisor chooses an exponent from 0 up to the full power of every prime. The sum of the divisors is the product of (1 + p + p² + … + p^a) over the primes. For 360 that gives 4 × 3 × 2 = 24 divisors with a sum of 1170. The tool lists all divisors in increasing order, which helps with tasks such as finding common factors, simplifying fractions and checking whether a number is perfect, meaning its divisors other than itself add up to the number.
How the factoring works
Small prime factors are removed by trial division using a wheel that skips multiples of 2 and 3. Whatever remains has only large prime factors, so the calculator checks it with a deterministic Miller-Rabin test, and if it is composite it is split with Pollard's rho algorithm using exact BigInt arithmetic, then factored recursively. This makes even products of two primes in the tens of millions return quickly, where pure trial division would be slow. The factor tree shows one way to reach the primes by peeling off the smallest prime at each step.
Batch mode lets you paste a whole list of numbers and receive a table with each factorization and divisor count, while invalid entries are flagged individually rather than stopping the run. Everything is computed in your browser, so the numbers you enter are never uploaded.
How to use
- Enter numbersType a whole number from 1 to 9,007,199,254,740,991, or several numbers separated by spaces, commas or new lines.
- FactorizePress the button to split each number into its prime factors.
- Read the detailsFor one number you get exponent form, a factor tree, the list of divisors, their count and their sum.
- Use batch modeEnter many numbers at once to get a compact table of factorizations and divisor counts.