Calcoid
Math

Prime Factorization Calculator

Factor any positive integer into its prime factors. Shows exponent form, expanded product, divisor count, and sum of divisors.

Factor a positive integer

Enter an integer between 2 and 1,000,000,000,000.

Prime factorization

360 = 23*32*5

Divisor count

24

Sum of divisors

1,170

Distinct primes

3

Expanded form

2 * 2 * 2 * 3 * 3 * 5

Frequently Asked Questions about the Prime Factorization Calculator

What is prime factorization?
Prime factorization expresses a positive integer as a product of prime numbers. Every integer greater than 1 has exactly one such factorization, regardless of the order you list the primes, a result called the Fundamental Theorem of Arithmetic. For example, 360 = 2^3 x 3^2 x 5.
Why does 1 have no prime factorization?
1 is neither prime nor composite. It is defined as the empty product (a product with no factors), which keeps the Fundamental Theorem tidy: every integer greater than 1 has a unique prime factorization, and 1 sits outside that rule by convention. This calculator returns no result for inputs of 1, 0, or any negative number.
How does this calculator factor large numbers?
It uses trial division with BigInt arithmetic so results stay exact near the input limit. The algorithm first pulls out the small primes 2, 3, 5, 7, and 11, then tests odd divisors starting at 13, stopping once the candidate exceeds the square root of the remaining value. For the maximum input of 1 trillion, that is at most about 500,000 odd candidates, fast enough to finish in well under a second in your browser.
What are the divisor count and sum of divisors?
For n = p1^e1 x p2^e2 x ..., the divisor count (tau function) is the product (e1 + 1)(e2 + 1)..., and the sum of divisors (sigma function) is the product of (p^(e+1) - 1) / (p - 1) for each prime factor. For 12 = 2^2 x 3^1, the divisor count is (2+1)(1+1) = 6 and the divisors 1, 2, 3, 4, 6, 12 sum to 28.
What is the largest number this calculator can factor?
The maximum input is 1,000,000,000,000 (10^12). That cap keeps trial division fast on every device, since sqrt(10^12) is 10^6 and the algorithm tests only odd divisors, so the worst case is around 500,000 test divisions. For much larger numbers, especially the large semiprimes used in cryptography, trial division is too slow and algorithms like the General Number Field Sieve are used instead.