Prime Factorization Calculator
Break an integer into exact prime powers and count its positive divisors.
Content updated August 1, 2026
Negative inputs include −1 as the sign factor. Divisor counts refer to the positive divisors of the absolute value.
Prime factorization rewrites an integer as a product of prime numbers. The result is unique apart from the order of the factors, which makes it useful for reducing fractions, finding common factors, and studying divisibility.
Enter any whole number whose absolute value is between 2 and 1 trillion. The calculator uses exact integer division, groups repeated primes as powers, and separately reports the number of positive divisors.
The Prime Factorization formula
|n| = p₁^e₁ × p₂^e₂ × … × pₖ^eₖEach p is a distinct prime and each e is a positive whole-number exponent.
Worked example
For 360, divide by 2 three times, by 3 twice, and by 5 once. The exact result is 2^3 × 3^2 × 5.
Assumptions, rounding, and limitations
Assumptions
- The input is a base-10 whole number.
- Negative inputs are factored as −1 times the prime factors of their absolute value.
- Divisor counts include positive divisors only.
Rounding: No rounding occurs; parsing, divisibility tests, division, and exponents use exact BigInt arithmetic.
Limitations
- The absolute value must be between 2 and 1 trillion.
- Trial division is deliberately bounded for predictable browser performance and is not intended for cryptographic-size integers.
How trial division finds every prime factor
The calculator first removes factors of 2 and 3. It then tests candidates of the form 6k − 1 and 6k + 1, because every prime greater than 3 must have one of those forms.
Testing stops when the candidate squared is larger than the unfactored remainder. If a remainder greater than one is left at that point, it must itself be prime.
From prime exponents to a divisor count
If |n| = p₁^e₁ × p₂^e₂ × …, a positive divisor may use each prime from exponent zero through its exponent in n. Multiplying the number of choices gives (e₁ + 1)(e₂ + 1)… positive divisors.
For a negative input, −1 is displayed as a sign factor. The prime powers and divisor count still describe the input's absolute value.
Frequently asked questions
▶What is the prime factorization of 360?
360 = 2^3 × 3^2 × 5. It therefore has (3 + 1)(2 + 1)(1 + 1) = 24 positive divisors.
▶Can a prime number be factorized?
Yes. Its prime factorization is simply the prime itself with exponent one.
▶How are negative integers handled?
The calculator shows −1 first, then the prime factorization of the absolute value.
▶Why is 1 not accepted?
One is a unit, not a prime, and it has no prime factorization. The accepted domain therefore starts at an absolute value of 2.
Related calculators
Find the greatest common factor and least common multiple of 2–20 integers.
Open calculator →Reduce one integer fraction to lowest terms and see its mixed-number and decimal forms.
Open calculator →Generate up to 100 secure random integers in an inclusive range, with optional duplicate prevention.
Open calculator →Disclaimer: Prime Factorization Calculator results are estimates for general information and education only, and are not financial, tax, legal or medical advice. Verify important decisions with a qualified professional.