The Quick Answer
Prime factorization breaks a number into a product of prime numbers. Every integer greater than 1 has exactly one prime factorization.
| Number | Prime Factorization | Prime Factors | Total Divisors |
|---|---|---|---|
| 12 | 2² × 3 | 2, 3 | 6 |
| 60 | 2² × 3 × 5 | 2, 3, 5 | 12 |
| 100 | 2² × 5² | 2, 5 | 9 |
| 360 | 2³ × 3² × 5 | 2, 3, 5 | 24 |
The method: divide by the smallest prime that fits, repeat until you reach 1.
Step-by-Step: The Trial Division Method
Trial division is the standard approach for factorizing numbers by hand:
- Start with the smallest prime number: 2
- If the number divides evenly, write down 2 as a factor and divide
- Keep dividing by 2 until it no longer works
- Move to the next prime: 3, then 5, 7, 11, and so on
- Stop when the quotient reaches 1
You only need to check primes up to the square root of the number. If no prime up to √n divides it, the number itself is prime.
Example: Factorize 360
360 ÷ 2 = 180
180 ÷ 2 = 90
90 ÷ 2 = 45 → done with 2 (45 is odd)
45 ÷ 3 = 15
15 ÷ 3 = 5 → done with 3
5 ÷ 5 = 1 → done
360 = 2³ × 3² × 5
Three 2s, two 3s, one 5. That's the complete factorization.
Example: Factorize 84
84 ÷ 2 = 42
42 ÷ 2 = 21 → done with 2
21 ÷ 3 = 7 → done with 3
7 ÷ 7 = 1 → 7 is prime, done
84 = 2² × 3 × 7
Example: Factorize 997
Check: 2? No (997 is odd)
3? No (9+9+7 = 25, not divisible by 3)
5? No (doesn't end in 0 or 5)
7? 997 ÷ 7 = 142.4… No
11? 997 ÷ 11 = 90.6… No
...continue through primes up to √997 ≈ 31.6
31? 997 ÷ 31 = 32.2… No
997 is prime. Its only factorization is 997 itself.
Quick Divisibility Tests
Before dividing, these shortcuts save time:
| Divisor | Test |
|---|---|
| 2 | Last digit is even (0, 2, 4, 6, 8) |
| 3 | Sum of digits is divisible by 3 |
| 5 | Last digit is 0 or 5 |
| 7 | No simple rule — just divide |
| 11 | Alternating sum of digits is divisible by 11 |
Example for 3: Is 171 divisible by 3? Digits sum: 1 + 7 + 1 = 9. Yes, 9 is divisible by 3, so 171 ÷ 3 = 57.
Counting Divisors Without Listing Them
This is one of the most useful results from prime factorization. If a number has the factorization:
n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ
Then the total number of divisors is:
(a₁ + 1) × (a₂ + 1) × … × (aₖ + 1)
Why This Works
Each divisor is formed by choosing a power of each prime from 0 up to its exponent. For 60 = 2² × 3 × 5:
- Powers of 2 you can use: 2⁰, 2¹, 2² → 3 choices
- Powers of 3 you can use: 3⁰, 3¹ → 2 choices
- Powers of 5 you can use: 5⁰, 5¹ → 2 choices
Total combinations: 3 × 2 × 2 = 12 divisors.
More Examples
72 = 2³ × 3²
Divisors = (3+1)(2+1) = 12
1000 = 2³ × 5³
Divisors = (3+1)(3+1) = 16
5040 = 2⁴ × 3² × 5 × 7
Divisors = (4+1)(2+1)(1+1)(1+1) = 60
The number 5040 is notable — it has more divisors than any smaller number relative to its size, which is why it appears throughout combinatorics.
Practical Uses
Simplifying Fractions
Find the prime factorization of both numerator and denominator, then cancel common primes.
Simplify 84/120:
84 = 2² × 3 × 7
120 = 2³ × 3 × 5
Common factors: 2² × 3 = 12
84 ÷ 12 = 7
120 ÷ 12 = 10
84/120 = 7/10
This is equivalent to finding the GCD (Greatest Common Divisor) and dividing both sides by it.
Finding GCD and LCM
Once you have the prime factorizations of two numbers:
- GCD: take the lowest power of each shared prime
- LCM: take the highest power of each prime that appears in either number
GCD and LCM of 48 and 180:
48 = 2⁴ × 3
180 = 2² × 3² × 5
GCD = 2² × 3 = 12 (lowest shared powers)
LCM = 2⁴ × 3² × 5 = 720 (highest powers overall)
Check: GCD × LCM = 12 × 720 = 8640 = 48 × 180 ✓
Finding Perfect Squares
A number is a perfect square if and only if every exponent in its prime factorization is even.
144 = 2⁴ × 3² → exponents 4 and 2 are both even → perfect square (12²)
72 = 2³ × 3² → exponent 3 is odd → not a perfect square
The Fundamental Theorem of Arithmetic
This theorem states two things:
- Existence: every integer greater than 1 can be written as a product of primes
- Uniqueness: this representation is unique (ignoring order)
This means 30 = 2 × 3 × 5, and there is no other way to write 30 as a product of primes. This might seem obvious, but it requires proof and is not true in all number systems.
The uniqueness of prime factorization is what makes all the techniques above reliable — the GCD formula, divisor counting, and fraction simplification all depend on it.
Edge Cases
- 1 is neither prime nor composite. It has no prime factorization.
- 2 is the smallest prime and the only even prime.
- Prime numbers have a trivial factorization: just themselves (e.g., 97 = 97).
- Powers of 2 have only one prime factor: 1024 = 2¹⁰.
- Large numbers become computationally expensive to factor. RSA encryption relies on this — multiplying two 300-digit primes takes milliseconds, but factoring the result could take billions of years.
Common Mistakes
-
Forgetting to keep dividing by the same prime. 72 ÷ 2 = 36, but you need to divide by 2 again (36 ÷ 2 = 18, 18 ÷ 2 = 9) before moving to 3.
-
Stopping too early. After dividing out small primes, the remaining number might still be composite. Always check if the quotient needs further factoring.
-
Including 1 as a factor. 1 is not a prime number. Writing "1 × 2 × 3" is technically valid but 1 is never included in a prime factorization.
-
Confusing prime factors with all factors. The prime factors of 12 are 2 and 3. The complete set of divisors of 12 is {1, 2, 3, 4, 6, 12}.
Prime Factorization Calculator
Enter any number up to 1,000,000 to see its complete prime factorization, step-by-step division, and divisor count.
Open CalculatorRelated Tools
- Prime Number Checker — test whether a specific number is prime
- GCD & LCM Calculator — find the greatest common divisor and least common multiple
- Fraction Visualizer — visualize and simplify fractions
- Decimal to Fraction Converter — convert decimals to simplified fractions