Prime Factorization Calculator
Enter a positive integer to get its prime factorization, plus the divisor count, divisor sum, full list of divisors, and a primality check.
Last updated:
Input
Enter a positive integer to see its prime factorization and divisor information at a glance.
Enter a whole number of 1 or more (up to one trillion).
Result
Prime factorization
360 = 2^3 × 3^2 × 5
Number of divisors
24
Sum of divisors
1,170
Is prime
No
Divisors (24)
How it works
- Trial division checks each prime starting from 2, dividing as many times as possible to find the exponent of each prime factor, then writes the result as 2^a x 3^b and so on.
- The number of divisors equals the product of each exponent plus one, and the sum of divisors is the product of the geometric series for each prime factor.
- A number is reported as prime when it is greater than 1 and has exactly one prime factor with exponent 1.
- The number 1 has no prime factors, so its only divisor is 1 and its divisor count is 1.
Factoring 1260 step by step
Start with the smallest prime and keep dividing. 1260 ÷ 2 = 630, and 630 ÷ 2 = 315. 315 is odd, so move to 3: 315 ÷ 3 = 105, and 105 ÷ 3 = 35. Then 35 ÷ 5 = 7, and 7 is prime, so you are done. The result is 1260 = 2² × 3² × 5 × 7.
From the exponents you can read off the divisor count: (2 + 1) × (2 + 1) × (1 + 1) × (1 + 1) = 36. The sum of all divisors is (1 + 2 + 4) × (1 + 3 + 9) × (1 + 5) × (1 + 7) = 7 × 13 × 6 × 8 = 4,368. The calculator shows both figures along with the full list of 36 divisors.
Note that the divisor sum includes the number itself. When that sum is exactly twice the number, the number is called perfect: 28 (1 + 2 + 4 + 7 + 14 + 28 = 56) and 496 (divisor sum 992) are two examples you can check in the tool.
Using factorizations for GCD, LCM and fractions
Factor each number separately: 84 = 2² × 3 × 7 and 90 = 2 × 3² × 5. The greatest common divisor takes only the primes they share, each at the lower exponent: 2 × 3 = 6. The least common multiple takes every prime that appears, each at the higher exponent: 2² × 3² × 5 × 7 = 1,260. To simplify the fraction 84/90, divide top and bottom by the GCD of 6 and you get 14/15 in a single step, with no trial and error.
Squares, square roots and trailing zeros
- A number is a perfect square exactly when every exponent is even. 3600 = 2⁴ × 3² × 5², so it equals 60². Perfect squares also have an odd number of divisors; 3600 has 5 × 3 × 3 = 45.
- To simplify √72, factor 72 = 2³ × 3², pull the pairs 2² and 3² outside the root, and you get 6√2.
- The number of zeros at the end of a whole number equals the smaller of the exponents of 2 and 5. One trillion is 2¹² × 5¹², hence its 12 zeros.
Numbers that look prime but are not
51 = 3 × 17, 57 = 3 × 19, 91 = 7 × 13 and 1001 = 7 × 11 × 13 are classic traps. The digit-sum rule catches the first two: if the digits add up to a multiple of 3, so does the number (5 + 1 = 6, 5 + 7 = 12). Some composites give way to algebra instead: 9991 = 100² − 3² = 97 × 103. And remember that 1 is not prime.
Trial division only needs to test divisors up to the square root of n, because any factor larger than √n must pair with one smaller than √n. For this calculator's limit of one trillion, that means checking divisors up to one million. The largest prime below one trillion is 999,999,999,989, a good test input if you want to see a prime result at the top of the range.
Frequently asked questions
- How is the prime factorization computed?
- By trial division: it tests primes starting from 2, counts each prime's exponent, and writes the result as 2^a × 3^b …. For example, 360 becomes 2³ × 3² × 5.
- How are the divisor count and divisor sum found?
- The divisor count is the product of each exponent plus one, and the divisor sum is the product of each prime's geometric series. For 360 (2³×3²×5) the divisor count is 4 × 3 × 2 = 24.
- What happens if I enter 1 or a prime number?
- The number 1 has no prime factors, so its only divisor is 1 (count of 1). A number greater than 1 is judged prime when it has exactly one prime factor with an exponent of 1.
Reviews
Tell us what you think of this calculator.
Write a review
Rating