Prime Factorization Calculator (Factor Tree, Free)
Fractions & numbersFreeNo sign-up
A prime factorization calculator writes a whole number as a product of prime numbers. For 360, split it into factors until every branch is prime: 360 = 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5 in exponent form. From that one line you also get the number of divisors, (3 + 1)(2 + 1)(1 + 1) = 24.
360 =
Composite
The prime factorization of 360 is 2³ × 3² × 5, which means 360 = 2 × 2 × 2 × 3 × 3 × 5. It has 3 distinct prime factors (2, 3 and 5) and 24 positive divisors.
Show steps: tree, ladder, divisors
- Split 360 into two factors that multiply to it. Here we pick the pair closest together, which keeps the tree short; any pair works and gives the same primes.
- Keep splitting every branch that is not prime:360 = 18 × 2018 = 3 × 66 = 2 × 320 = 4 × 54 = 2 × 2
- Stop when every branch ends in a prime (circled). Collect the circled numbers: 2 × 2 × 2 × 3 × 3 × 5.
- Group equal primes with exponents: 360 = 2³ × 3² × 5.
| 2 | 360 |
| 2 | 180 |
| 2 | 90 |
| 3 | 45 |
| 3 | 15 |
| 5 | 5 |
| 1 |
- Write 360 at the top. Divide by the smallest prime that goes in evenly (try 2, then 3, 5, 7, 11, …) and write the quotient underneath.
- Repeat with each quotient:360 ÷ 2 = 180180 ÷ 2 = 9090 ÷ 2 = 4545 ÷ 3 = 1515 ÷ 3 = 55 ÷ 5 = 1
- Stop when the quotient is 1. The divisors down the left side are the prime factors: 360 = 2³ × 3² × 5.
- Number of divisors: add 1 to each exponent and multiply. 2³ × 3² × 5 gives (3 + 1)(2 + 1)(1 + 1) = 24. Each divisor picks a power of every prime, from the 0th power up to the exponent.
- Sum of divisors: multiply the sums of each prime’s powers. (1 + 2 + 2² + 2³) × (1 + 3 + 3²) × (1 + 5) = 15 × 13 × 6 = 1,170.
- Proper divisors (all except 360 itself) add up to 1,170 − 360 = 810. That is more than 360, so 360 is an abundant number.
| Factor pair | Product |
|---|---|
| 1 × 360 | 360 |
| 2 × 180 | 360 |
| 3 × 120 | 360 |
| 4 × 90 | 360 |
| 5 × 72 | 360 |
| 6 × 60 | 360 |
| 8 × 45 | 360 |
| 9 × 40 | 360 |
| 10 × 36 | 360 |
| 12 × 30 | 360 |
| 15 × 24 | 360 |
| 18 × 20 | 360 |
How to use the prime factorization calculator
- Type a whole number (2 or more, up to 40 digits) in the One number tab. The answer updates as you type.
- Read the exponent form at the top, then the chips: distinct primes, number of divisors, sum of divisors, the simplified square root and whether the number is perfect, abundant or deficient.
- Open Show steps and switch between the factor tree (two styles), the division ladder and the full list of divisors with factor pairs.
- To factor several numbers at once and get their GCF and LCM from the primes, use the Several numbers tab.
What is prime factorization?
A prime number has exactly two divisors, 1 and itself: 2, 3, 5, 7, 11, 13 and so on. Every whole number greater than 1 that is not prime (a composite number) can be written as a product of primes, and there is only one way to do it apart from the order. This is the Fundamental Theorem of Arithmetic. So 84 is always 2² × 3 × 7, whichever factors you start with.
The number 1 is neither prime nor composite and has no prime factors. Prime factorization is the starting point for finding the GCF and LCM, simplifying fractions and square roots, and counting divisors.
Method 1: the factor tree
Write the number at the top and split it into any two factors. Keep splitting each branch that is not prime. When every branch ends in a prime, circle those primes and multiply them back as a check.
For 360 you might start with 18 × 20. Then 18 = 3 × 6 and 6 = 2 × 3, while 20 = 4 × 5 and 4 = 2 × 2. The circled primes are 2, 2, 2, 3, 3 and 5. If you start with 2 × 180 instead, the tree has a different shape but ends with exactly the same primes. The calculator draws both styles: closest factor pairs (a short, wide tree) and smallest prime first (a long, thin one).
Method 2: the division ladder (repeated division)
Divide by the smallest prime that goes in evenly, write the quotient underneath, and repeat until the quotient is 1. The divisors down the left side are the prime factors.
| Divide by | Number |
|---|---|
| 2 | 360 |
| 2 | 180 |
| 2 | 90 |
| 3 | 45 |
| 3 | 15 |
| 5 | 5 |
| 1 |
You only need to test primes up to the square root of what is left. For 1001, √1001 is about 31.6. 1001 is not divisible by 2, 3 or 5, but 1001 ÷ 7 = 143, and 143 ÷ 11 = 13. Since 13 is prime, 1001 = 7 × 11 × 13.
Worked examples
Example 1: prime factorization of 72
72 ÷ 2 = 36, 36 ÷ 2 = 18, 18 ÷ 2 = 9, 9 ÷ 3 = 3, 3 ÷ 3 = 1. So 72 = 2 × 2 × 2 × 3 × 3 = 2³ × 3². It has (3 + 1)(2 + 1) = 12 divisors, and they add up to (1 + 2 + 4 + 8)(1 + 3 + 9) = 15 × 13 = 195.
Example 2: prime factorization of 5040
Divide by 2 four times (5040, 2520, 1260, 630, 315), by 3 twice (105, 35), then by 5 (7) and by 7 (1). So 5040 = 2⁴ × 3² × 5 × 7, and it has 5 × 3 × 2 × 2 = 60 divisors, which is why 5040 is a favorite of puzzle makers.
Example 3: a large number, 600,851,475,143
This 12-digit number has no small factor until 71. Trial division then finds 600,851,475,143 = 71 × 839 × 1,471 × 6,857. By hand this takes a while; the calculator does it instantly and shows the ladder.
Number of divisors and sum of divisors
If n = pa × qb × rc, every divisor of n picks a power of p from 0 to a, a power of q from 0 to b, and so on. That gives the two formulas:
- Number of divisors = (a + 1)(b + 1)(c + 1). For 360 = 2³ × 3² × 5: 4 × 3 × 2 = 24.
- Sum of divisors = (1 + p + … + pa)(1 + q + … + qb)(…). For 360: 15 × 13 × 6 = 1,170.
Subtract the number itself to get the sum of its proper divisors. If that sum equals the number, it is perfect (28 = 1 + 2 + 4 + 7 + 14). If it is larger, the number is abundant (360 gives 810); if smaller, deficient (every prime). A number is a perfect square exactly when every exponent is even, as in 144 = 2⁴ × 3².
Using prime factors for the GCF and LCM
Factor each number, then compare exponents prime by prime. The GCF uses only the primes all the numbers share, each with its lowest power. The LCM uses every prime that appears, each with its highest power. For 24 = 2³ × 3, 36 = 2² × 3² and 60 = 2² × 3 × 5, the GCF is 2² × 3 = 12 and the LCM is 2³ × 3² × 5 = 360. The Several numbers tab builds this exponent table for you.
Prime factorization of common numbers
| Number | Prime factorization | Divisors | Sum of divisors |
|---|---|---|---|
| 12 | 2² × 3 | 6 | 28 |
| 18 | 2 × 3² | 6 | 39 |
| 24 | 2³ × 3 | 8 | 60 |
| 30 | 2 × 3 × 5 | 8 | 72 |
| 36 | 2² × 3² | 9 | 91 |
| 48 | 2⁴ × 3 | 10 | 124 |
| 60 | 2² × 3 × 5 | 12 | 168 |
| 72 | 2³ × 3² | 12 | 195 |
| 84 | 2² × 3 × 7 | 12 | 224 |
| 90 | 2 × 3² × 5 | 12 | 234 |
| 100 | 2² × 5² | 9 | 217 |
| 120 | 2³ × 3 × 5 | 16 | 360 |
| 144 | 2⁴ × 3² | 15 | 403 |
| 180 | 2² × 3² × 5 | 18 | 546 |
| 360 | 2³ × 3² × 5 | 24 | 1,170 |
| 1,000 | 2³ × 5³ | 16 | 2,340 |
Common mistakes to avoid
- Stopping at a composite number. 72 = 8 × 9 is a factorization, but not a prime one. Keep going until every factor is prime.
- Listing 1 as a prime factor. 1 is not prime, so it never appears in a prime factorization.
- Dropping repeated primes. 72 is 2³ × 3², not 2 × 3. Count how many times each prime divides the number.
- Testing too far. You only need to try primes up to the square root of what is left. If none divides it, what is left is prime.
- Skipping the check. Multiply the primes back together. If you do not get the original number, a division went wrong.
How the calculator handles large numbers
For numbers up to 40 digits, the calculator first divides by every prime below 100,000. Any large part that is left is tested with the Miller-Rabin primality test and, if it is composite, split with Pollard’s rho method, a fast randomized search. Numbers whose prime factors are all small or medium are factored in a fraction of a second. A number made of two very large primes (around 18 digits each) can take longer than the time limit. In that case the calculator says so honestly and shows the composite part in brackets instead of guessing.
Prime factorization practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7. So 84 = 2² × 3 × 7. 4 and 21 are not prime, and 2 × 3 × 7 is only 42.
120 ÷ 2 ÷ 2 ÷ 2 = 15 = 3 × 5, so 120 = 2³ × 3 × 5. 2² × 3 × 5 is only 60.
Add 1 to each exponent and multiply: (3 + 1)(2 + 1) = 12. Adding the exponents (5) or multiplying them (6) are common mistakes.
36 = 2² × 3², so the sum is (1 + 2 + 4)(1 + 3 + 9) = 7 × 13 = 91. 55 leaves out 36 itself and is the sum of the proper divisors.
91 = 7 × 13, 51 = 3 × 17 and 87 = 3 × 29. 97 is not divisible by 2, 3, 5 or 7, the only primes up to √97 ≈ 9.8, so it is prime.
You only need primes up to √221 ≈ 14.9. Testing them finds 221 = 13 × 17, so 221 is not prime.
9 = 3 × 3 and 10 = 2 × 5, so the tree ends in 2, 3, 3 and 5: 90 = 2 × 3² × 5. Any starting pair gives the same primes.
Take the shared primes with their lowest powers: 2² × 3 = 12. 720 is the LCM (highest powers: 2⁴ × 3² × 5).
A number is a perfect square when every exponent in its prime factorization is even. Only 2² × 3⁴ × 7² qualifies; it equals (2 × 3² × 7)² = 126².
Quiz complete
Frequently asked questions
How do you find prime factors without a calculator?
Use repeated division. Divide by 2 as many times as you can, then by 3, 5, 7, 11 and so on, each time working with the quotient. Stop when the quotient is 1. For 180: 180 → 90 → 45 → 15 → 5 → 1, dividing by 2, 2, 3, 3 and 5, so 180 = 2² × 3² × 5.
How do you make a prime factorization tree?
Write the number at the top, split it into two factors, and keep splitting every branch that is not prime. Circle the primes at the ends of the branches. For 72: 72 = 8 × 9, 8 = 2 × 4, 4 = 2 × 2 and 9 = 3 × 3, so 72 = 2³ × 3².
How do you find the number of factors of a number?
Write the prime factorization, add 1 to every exponent, and multiply. 100 = 2² × 5², so it has 3 × 3 = 9 factors: 1, 2, 4, 5, 10, 20, 25, 50 and 100.
Is 1 a prime number?
No. A prime has exactly two different divisors, and 1 has only one. Leaving 1 out is what makes every prime factorization unique.
Can I do prime factorization on a scientific calculator?
Some models, including several Casio scientific calculators, have a factor key (often labeled FACT) that shows the prime factors of the number on the screen. Other calculators do not, so repeated division or this tool is the way to go, and the steps here show the working your teacher will want to see.
Related calculators
More fractions & numbers calculators
Related to This Article
More math articles
- The Best Grade 7 ELA Practice Tests for Pennsylvania Students
- ISEE Upper Level Math Flashcards (Free Online: Formulas, Terms & Concepts)
- FREE 5th Grade ACT Aspire Math Practice Test
- The Best Grade 5 ELA Practice Tests for Kentucky Students
- Theories and Levels of Analysis
- How to Convey Decimals in Words
- North Dakota NDSA Grade 8 Math Free Worksheets: Free Printable Grade 8 Math PDFs, No Signup
- 4th Grade FSA Math Practice Test Questions
- How to Solve Equations with Multiple Angles
- Free Grade 5 English Worksheets for Washington Students


What people say about "Prime Factorization Calculator With Factor Tree & Steps"?
No one replied yet.