ES EN FR PT DE IT

Prime Factorization Calculator

Prime Factorization Calculator. Free online calculator with formula, examples and step-by-step guide.

The Prime Factorization Calculator is a free online math calculator. Prime Factorization Calculator. Free online calculator with formula, examples and step-by-step guide. Get instant results with the detailed formula and step-by-step examples.
Inputs
Result
Enter values and press Calculate

Prime Factorization Calculator: Break Down Any Number Into Prime Factors

What is Prime Factorization?

Prime factorization breaks any whole number greater than 1 into its fundamental building blocks—the prime numbers that multiply together to create it. Think of primes as the atoms of arithmetic: just as molecules decompose into atoms, composite numbers decompose into primes.

Take the number 84. You can divide it by 2 to get 42, then divide 42 by 2 to get 21. Now 21 won't divide evenly by 2, so try the next prime: 21 ÷ 3 = 7. And 7 is itself prime. Putting this together: 84 = 2 × 2 × 3 × 7, or written with exponents: 84 = 2² × 3 × 7.

The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one prime factorization. Whether you start dividing by 2, 3, or any other prime, you'll always arrive at the same result. The number 360 always factors to 2³ × 3² × 5, no matter which path you take.

This uniqueness makes prime factorization indispensable. When simplifying √84, you write √(2² × 3 × 7) = 2√21. When finding GCF(84, 126), you compare 84 = 2² × 3 × 7 with 126 = 2 × 3² × 7 and multiply common primes: 2 × 3 × 7 = 42. Cryptography systems like RSA depend on the fact that factoring large numbers remains computationally difficult.

How It Works: Prime Factorization Methods Explained

Two main approaches dominate prime factorization: the factor tree method and successive prime division. Both produce identical results but appeal to different thinking styles.

Successive Prime Division: This systematic method tests primes in ascending order. To factor 504:

  • Divide by 2: 504 ÷ 2 = 252, then 252 ÷ 2 = 126, then 126 ÷ 2 = 63 (three 2's so far)
  • 63 won't divide by 2, try 3: 63 ÷ 3 = 21, then 21 ÷ 3 = 7 (two 3's)
  • 7 is prime, so divide by 7: 7 ÷ 7 = 1 (one 7)
  • Result: 504 = 2³ × 3² × 7

Factor Tree Method: Start with any factor pair and branch out. For 504, you might choose 504 = 24 × 21. Then factor 24 = 6 × 4 = (2 × 3) × (2 × 2) and 21 = 3 × 7. Collecting all the primes at the "leaves": 2, 2, 2, 3, 3, 7. Written compactly: 504 = 2³ × 3² × 7.

When to Stop Testing Primes: You only need to test primes up to the square root of your number. If you're factoring 97, calculate √97 ≈ 9.85. Test primes 2, 3, 5, 7. None divide evenly, so 97 is prime. This works because if 97 had a factor larger than √97, it would also need a factor smaller than √97 to multiply to 97.

Exponential Notation: Writing 2 × 2 × 2 × 3 × 3 × 7 becomes tedious. Exponent notation compresses this to 2³ × 3² × 7. This format makes comparing factorizations easier. To find GCF(504, 720), compare 504 = 2³ × 3² × 7 with 720 = 2⁴ × 3² × 5. Take the smallest exponent for each common prime: 2³ × 3² = 8 × 9 = 72.

Step-by-Step Guide: Factorizing Any Number

Step 1: Check for Small Prime Factors First
Start with 2—if the number is even, divide repeatedly until you get an odd quotient. For 468: 468 ÷ 2 = 234, then 234 ÷ 2 = 117. You've extracted 2². Now work with 117, which is odd.

Step 2: Test Divisibility by 3
Add the digits: if the sum is divisible by 3, so is the number. For 117: 1 + 1 + 7 = 9, which divides by 3. So 117 ÷ 3 = 39. Check 39: 3 + 9 = 12, still divisible by 3. So 39 ÷ 3 = 13. You've extracted 3². Now work with 13.

Step 3: Continue with Larger Primes
Test 5 (does it end in 0 or 5?), then 7, 11, 13, and so on. Our remaining number is 13, which is itself prime. Divide: 13 ÷ 13 = 1. You've completed the factorization.

Step 4: Write the Complete Factorization
Collect all the primes you extracted: 468 = 2² × 3² × 13. Verify by multiplying: 4 × 9 × 13 = 36 × 13 = 468. This quick check catches arithmetic errors before you proceed.

Step 5: Use Exponential Form
Group repeated primes and write exponents. Instead of 2 × 2 × 3 × 3 × 13, write 2² × 3² × 13. This compact form is standard in mathematics and makes comparisons straightforward.

Step 6: Apply to GCF and LCM Problems
Now use your factorization. To find GCF(468, 630), first factor 630 = 2 × 3² × 5 × 7. Compare with 468 = 2² × 3² × 13. Common primes are 2 and 3². GCF = 2 × 9 = 18. For LCM, take the highest power of each prime: 2² × 3² × 5 × 7 × 13 = 4 × 9 × 5 × 7 × 13 = 16,380.

Real-World Examples with Complete Calculations

Example 1: Simplifying a Square Root
Simplify √1,764. First factor 1,764: it's even, so 1,764 ÷ 2 = 882, then 882 ÷ 2 = 441. The sum 4 + 4 + 1 = 9, so 441 ÷ 3 = 147, then 147 ÷ 3 = 49. And 49 = 7². So 1,764 = 2² × 3² × 7². Now √1,764 = √(2² × 3² × 7²) = 2 × 3 × 7 = 42. Perfect squares have all even exponents in their prime factorization.

Example 2: Finding All Factors of a Number
A teacher has 72 students and wants to know all possible equal group sizes. Factor 72 = 2³ × 3². The total number of factors equals (3+1) × (2+1) = 4 × 3 = 12 factors. To list them, combine primes systematically: 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72. The teacher can create groups of any of these 12 sizes.

Example 3: Reducing a Fraction to Lowest Terms
Reduce 252/396. Factor both: 252 = 2² × 3² × 7 and 396 = 2² × 3² × 11. The GCF is 2² × 3² = 4 × 9 = 36. Divide: 252 ÷ 36 = 7 and 396 ÷ 36 = 11. The reduced fraction is 7/11. Prime factorization reveals the common factors instantly without trial and error.

Example 4: Determining Perfect Cube Status
Is 2,744 a perfect cube? Factor it: 2,744 ÷ 2 = 1,372, ÷ 2 = 686, ÷ 2 = 343. Now 343 = 7³ (since 7 × 7 × 7 = 343). So 2,744 = 2³ × 7³. All exponents are divisible by 3, confirming it's a perfect cube. The cube root is 2 × 7 = 14. Check: 14³ = 2,744. Perfect cubes have all exponents divisible by 3.

Example 5: Gear Ratio Optimization
Two gears have 168 and 252 teeth. To find how many rotations before they realign, factor both: 168 = 2³ × 3 × 7 and 252 = 2² × 3² × 7. LCM = 2³ × 3² × 7 = 8 × 9 × 7 = 504. The first gear rotates 504 ÷ 168 = 3 times, and the second rotates 504 ÷ 252 = 2 times before their teeth realign. This calculation ensures smooth mechanical operation.

Common Mistakes to Avoid

Mistake 1: Including Composite Numbers in the Factorization
A student factors 60 as 4 × 3 × 5 and stops there. But 4 isn't prime—it's 2². The correct factorization is 2² × 3 × 5. Always verify that every factor is prime. If you can divide it further (other than by 1 and itself), keep going. A quick check: none of your factors should appear in the multiplication table except in the 1s row or their own row.

Mistake 2: Stopping Before Reaching 1
When factoring 105, a student divides by 3 to get 35, then by 5 to get 7, and stops because 7 "looks prime." But you must divide by 7 to reach 1. The complete factorization is 3 × 5 × 7, not 3 × 5 × 7 with 7 left over. The process ends only when your quotient equals 1.

Mistake 3: Skipping Primes in Order
Testing primes out of order causes missed factors. If you test 5 before finishing with 3, you might miss factors. Always proceed systematically: 2, 3, 5, 7, 11, 13, 17, 19, 23... When factoring 221, testing 2, 3, 5, 7, 11, 13 reveals 221 = 13 × 17. Randomly jumping to larger primes wastes time and risks errors.

Mistake 4: Miscounting Exponents
Writing 72 = 2 × 3² instead of 2³ × 3² is a common slip. Count carefully: 72 ÷ 2 = 36, ÷ 2 = 18, ÷ 2 = 9 (that's three 2's), then 9 ÷ 3 = 3, ÷ 3 = 1 (that's two 3's). Use tally marks if needed: 72 → ||| for 2's, || for 3's → 2³ × 3². Double-check by expanding: 8 × 9 = 72. Correct.

Pro Tips for Efficient Factorization

Tip 1: Master Divisibility Rules for Speed
Memorize these shortcuts: a number is divisible by 2 if it ends in 0, 2, 4, 6, or 8; by 3 if its digit sum divides by 3; by 4 if its last two digits form a number divisible by 4; by 5 if it ends in 0 or 5; by 6 if divisible by both 2 and 3; by 9 if its digit sum divides by 9; by 10 if it ends in 0. For 1,386: it's even (÷2 = 693), digit sum 6+9+3 = 18 (÷3 = 231), digit sum 2+3+1 = 6 (÷3 = 77), and 77 = 7 × 11. Result: 2 × 3² × 7 × 11.

Tip 2: Use the Square Root Cutoff
When testing whether a number is prime or finding its largest prime factor, stop at √n. For 149, calculate √149 ≈ 12.2. Test only primes 2, 3, 5, 7, 11. None divide evenly, so 149 is prime. For 143, test the same primes. 143 ÷ 11 = 13, so 143 = 11 × 13. This cutoff dramatically reduces work for large numbers.

Tip 3: Recognize Common Factorizations
Certain numbers appear repeatedly. Memorize these: 12 = 2² × 3, 24 = 2³ × 3, 36 = 2² × 3², 48 = 2⁴ × 3, 60 = 2² × 3 × 5, 72 = 2³ × 3², 84 = 2² × 3 × 7, 96 = 2⁵ × 3, 100 = 2² × 5². When you encounter 840, recognize it as 84 × 10 = (2² × 3 × 7) × (2 × 5) = 2³ × 3 × 5 × 7. Pattern recognition accelerates your work.

Tip 4: Factor Out Powers of 10 First
Numbers ending in zeros factor quickly. For 4,800, write it as 48 × 100 = 48 × 10² = 48 × (2 × 5)² = 48 × 2² × 5². Then factor 48 = 2⁴ × 3. Combine: 2⁴ × 3 × 2² × 5² = 2⁶ × 3 × 5². This approach handles trailing zeros efficiently without repeated division.

Tip 5: Verify with Digital Roots
The digital root (repeated digit sum) provides a quick check. For 2,520 = 2³ × 3² × 5 × 7, the digital root of 2,520 is 2+5+2+0 = 9. The product of digital roots of factors should match: 8 (from 2³) × 9 (from 3²) × 5 × 7 = 8 × 9 × 35 = 2,520, digital root 9. While not foolproof, mismatches indicate errors.

Frequently Asked Questions

No. By definition, a prime number has exactly two distinct positive divisors: 1 and itself. The number 1 has only one divisor (itself), so it's neither prime nor composite—it's a unit. This convention ensures unique factorization. If 1 were prime, then 6 could factor as 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3, destroying uniqueness.

Practically, numbers up to about 10¹² factor quickly on a computer. Beyond that, factorization becomes computationally intensive. RSA encryption uses numbers with hundreds of digits precisely because factoring them is infeasible with current technology. For hand calculations, numbers under 10,000 are manageable with patience and divisibility rules.

In standard arithmetic, primes are positive integers greater than 1. While -2, -3, -5 divide numbers just like their positive counterparts, mathematicians define primes as positive to maintain unique factorization. The factorization of -60 is written as -1 × 2² × 3 × 5, separating the sign from the prime factors.

RSA encryption relies on the asymmetry between multiplication and factorization. Multiplying two 100-digit primes creates a 200-digit number instantly. But reversing this—factoring that 200-digit number back into its two primes—would take classical computers billions of years. This one-way difficulty secures online transactions, digital signatures, and encrypted communications.

Written and reviewed by the CalcToWork editorial team. Last updated: 2026-04-29.

Frequently Asked Questions

15% of 200 is 30. Calculated as 200 × 15 / 100 = 30.
Percentage change = ((final − initial) / |initial|) × 100. From 80 to 100 it is (20/80)×100 = 25%.
The Pythagorean theorem states that in a right triangle, c² = a² + b², where c is the hypotenuse and a, b are the legs.
If A corresponds to B, and we want what corresponds to C: X = (B × C) / A.