About the Prime Factorization Calculator
Prime factorization writes a whole number as a product of prime numbers – numbers divisible only by 1 and themselves. For example, 360 = 2³ × 3² × 5. This calculator factors the number you enter and also shows the number and sum of its divisors, the complete list of factors and whether the number is prime.
It is exact for every whole number up to 2⁵³−1 (about 9 quadrillion) and shows the repeated-division steps you learn at school.
How to use
- Enter a whole number. Thousands separators are fine.
- The result appears in exponent form such as 2³ × 3² × 5; a prime number is labeled as prime.
- Below you find the number and sum of divisors, every factor and the division steps.
Worked examples
A number with lots of divisors
- Input
5040- Result
- 2⁴ × 3² × 5 × 7, 60 divisors, sum of divisors 19,344, 4 distinct primes
5040 = 7! is divisible by every number from 1 to 10, which is why it has (4+1)(2+1)(1+1)(1+1) = 60 divisors. Numbers like this are handy when you need many ways to split something evenly.
Checking a two-prime product
- Input
221- Result
- 13 × 17, composite, divisors 1, 13, 17, 221
221 passes the quick tests for 2, 3, 5, 7 and 11, so it is easy to mistake for a prime. You only need to try primes up to √221 ≈ 14.9, and 13 is the one that divides it.
A large prime
- Input
2147483647- Result
- 2,147,483,647 is a prime number, 2 divisors, sum 2,147,483,648
This is 2³¹ − 1, the largest value of a signed 32-bit integer, and also a Mersenne prime. You can see it in binary (31 ones) with the base converter.
Formulas for the number and sum of divisors
If n = pa × qb × rc, then:
- Number of divisors = (a + 1)(b + 1)(c + 1)
- Sum of divisors = (1 + p + … + pa)(1 + q + … + qb)(1 + r + … + rc)
Example: 360 = 2³ × 3² × 5 → number of divisors = 4 × 3 × 2 = 24, sum of divisors = 15 × 13 × 6 = 1,170
How to check if a number is prime
To test whether n is prime, divide it by every number from 2 up to √n. If n had a factor larger than √n, it would also have a matching factor smaller than √n. This calculator only tries 2, 3 and numbers of the form 6k ± 1, which makes it fast.
| Number | Prime factorization | Divisors |
|---|---|---|
| 12 | 2² × 3 | 6 |
| 100 | 2² × 5² | 9 |
| 1,001 | 7 × 11 × 13 | 8 |
| 1,024 | 2¹⁰ | 11 |
FAQ
Is 1 a prime number?
No. A prime has exactly two divisors (1 and itself). The number 1 has only one divisor, so it is neither prime nor composite.
Which numbers have an odd number of divisors?
Perfect squares. The product of (exponent + 1) is odd only when every exponent is even. Example: 36 = 2² × 3² has 9 divisors.
Why is the list of factors cut off?
For numbers with very many divisors, only the first 1,000 are listed to keep the page readable. The number and sum of divisors are always computed in full.
Is a factor tree the same as this?
Yes – a factor tree and the repeated-division method always end with the same prime factors, because every whole number has exactly one prime factorization.
What is prime factorization used for?
Finding the GCD and LCM, simplifying fractions and simplifying square roots, for example √72 = √(2³ × 3²) = 6√2. For the GCD and LCM of several numbers, the GCD and LCM calculator compares the prime exponents in a table.