Prime Factorization Calculator
Break any number into its prime factors.
Shows complete factorization with exponents, factor tree, and divisor count.
Prime factorization is the process of breaking a composite number down into a product of prime numbers. Every integer greater than 1 is either a prime number itself or can be expressed as a unique product of prime numbers. This is guaranteed by the Fundamental Theorem of Arithmetic.
How it works:
The method is straightforward. You start with the smallest prime number (2) and check if it divides evenly into your number. If it does, you divide and repeat. If it does not, you move to the next prime (3, 5, 7, 11, …) and try again. You continue this process until the remaining quotient is 1.
Example — factoring 360:
- 360 ÷ 2 = 180
- 180 ÷ 2 = 90
- 90 ÷ 2 = 45
- 45 ÷ 3 = 15
- 15 ÷ 3 = 5
- 5 ÷ 5 = 1
So 360 = 2³ × 3² × 5¹
Why is prime factorization useful?
It has many practical applications. In mathematics, it is essential for finding the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two numbers. In cryptography, the difficulty of factoring very large numbers into primes is the basis for RSA encryption, which secures online banking and communications worldwide.
Number of divisors: Once you have the prime factorization, you can calculate the total number of divisors. If n = p₁^a × p₂^b × p₃^c, then the number of divisors is (a+1)(b+1)(c+1). For 360 = 2³ × 3² × 5¹, the divisor count is (3+1)(2+1)(1+1) = 24 divisors.
Tips:
- The number 1 is neither prime nor composite — it has no prime factorization.
- Every even number has 2 as a factor.
- If the sum of a number’s digits is divisible by 3, then the number is divisible by 3.
- This calculator handles numbers up to 10 billion for practical browser performance.