Prime Factorization Calculator Decompose integers into primes, build factor trees, and compute GCF/LCM — with 2025 educat...
Prime Factorization Calculator
Decompose integers into primes, build factor trees, and compute GCF/LCM — with 2025 educational insights and visual proofs.
Trial Division Algorithm**:
1. Divide by 2 while even 2. Try odd divisors 3, 5, 7… up to √n 3. If remainder > 1, it’s prime
Example** (840): 840 ÷ 2 = 420 420 ÷ 2 = 210 210 ÷ 2 = 105 105 ÷ 3 = 35 35 ÷ 5 = 7 7 ÷ 7 = 1 → **2³ × 3 × 5 × 7**
✅ Pro Tip**: Use divisibility rules: • 2: even • 3: sum of digits divisible by 3 • 5: ends in 0 or 5 • 7: double last digit, subtract from rest, repeat
⚠️ Avoid these errors:
- 1 is not prime** — It has only 1 factor (primes have exactly 2)
- Missing repeated factors** — 48 = 2⁴ × 3 (not 2 × 3 × 8)
- Assuming odd = prime** — 91 = 7 × 13 (not prime!)
- Stopping too early** — Always test up to √n (e.g., √169 = 13)
✅ Real-World Uses**:
- Fractions**: Reduce 84/120 → cancel 2²×3 → **7/10**
- Crypto**: RSA security relies on difficulty of factoring large numbers
- Scheduling**: LCM(12,15) = 60 → buses sync every hour
| Number | Prime Factors | # Factors | Type |
|---|---|---|---|
| 60 | 2² × 3 × 5 | 12 | Composite |
| 100 | 2² × 5² | 9 | Power |
| 97 | 97 | 2 | Prime |
| 2025 | 3⁴ × 5² | 15 | Power (2025 = 45²) |
📉 Total Factors Formula**:
If $n = p_1^{a_1} p_2^{a_2} \dots p_k^{a_k}$, then $$ \text{# Factors} = (a_1 + 1)(a_2 + 1) \dots (a_k + 1) $$ e.g., 840 = 2³ × 3¹ × 5¹ × 7¹ → (3+1)(1+1)(1+1)(1+1) = **32 factors**
➡️ Standard
“Prime factors of 840?” → **2³ × 3 × 5 × 7**
➡️ Factor Tree
See animated breakdown: 180 → 2 × 90 → 2 × 2 × 45 → …
➡️ GCF & LCM
“GCF/LCM of 84 and 120?” → GCF = 12, LCM = 840
Note: Handles up to 999,999 efficiently. Negative numbers use absolute value. Zero/one are invalid (no prime factors).