About the Prime Factorization Calculator
Enter a whole number from 2 up to one quadrillion and the calculator returns its prime factorization, whether it is prime, how many divisors it has and the sum of those divisors. These are the building blocks for simplifying fractions, finding GCF and LCM, and many number-theory problems.
The method is trial division: test 2, then odd numbers up to the square root of what remains. That is fast for the range supported here. Factoring much larger numbers is a genuinely hard problem, which is why modern cryptography relies on it.
How to Use the Prime Factorization Calculator
- Enter a whole number of 2 or more.
- Read the factorization in the headline.
- Use the tiles for divisor count and sum of divisors.
Formula and Method
Fundamental theorem of arithmetic
n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ
Every integer above 1 factors uniquely into primes.
Number of divisors
d(n) = (a₁ + 1)(a₂ + 1)…(aₖ + 1)
Add one to each exponent and multiply.
Sum of divisors
σ(n) = Π (pᵢ^(aᵢ+1) − 1) ÷ (pᵢ − 1)
Geometric series for each prime power.
Worked Example
Factor 360
Input: 360
- 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45 → 2³
- 45 ÷ 3 = 15, ÷ 3 = 5 → 3²
- 5 is prime → 5¹
- Divisors = (3 + 1)(2 + 1)(1 + 1) = 24
Result: 360 = 2³ × 3² × 5, with 24 divisors summing to 1,170.
Frequently Asked Questions
Is 1 a prime number?
No. A prime has exactly two distinct positive divisors, and 1 has only one. Excluding 1 is what makes prime factorization unique.
How can I tell whether a number is prime?
If it has no prime factor up to its square root, it is prime. The calculator reports this directly in the "Prime number?" tile.
What is the largest number I can factor here?
Up to 1,000,000,000,000,000 (10¹⁵). Above that, standard JavaScript numbers lose exact integer precision.
How is prime factorization used to find GCF and LCM?
The GCF multiplies the lowest power of each shared prime; the LCM multiplies the highest power of every prime that appears.
Related Calculators
Sources and Further Reading
Accuracy and Scope
Results use standard IEEE-754 double-precision arithmetic and are rounded for display. For exam, engineering or research work, verify critical values with a second method. See our full disclaimer.