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.

Prime factorization calculator
Any whole number from 2 up to 40 digits. Negative numbers work too (the answer starts with −1).
Try:
Prime factorization

360 =

2³ × 3² × 5

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.

Distinct prime factors2, 3, 5
Number of divisors24
Sum of divisors1,170
Prime factors with repeats6
√360 simplified6√10
Perfect, abundant or deficientAbundant
Check: multiply the primes back together2 × 2 × 2 × 3 × 3 × 5 = 360 ✓
Show steps: tree, ladder, divisors
Tree style:
360183623204225
  1. 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.
  2. Keep splitting every branch that is not prime:360 = 18 × 2018 = 3 × 66 = 2 × 320 = 4 × 54 = 2 × 2
  3. Stop when every branch ends in a prime (circled). Collect the circled numbers: 2 × 2 × 2 × 3 × 3 × 5.
  4. Group equal primes with exponents: 360 = 2³ × 3² × 5.

Prime Factorization Calculator (Factor Tree, Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the prime factorization calculator

  1. Type a whole number (2 or more, up to 40 digits) in the One number tab. The answer updates as you type.
  2. 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.
  3. Open Show steps and switch between the factor tree (two styles), the division ladder and the full list of divisors with factor pairs.
  4. 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.

Question 1 of 10
1. What is the prime factorization of 84?

Found a mistake? Let us know!

2. What is the prime factorization of 120?

Found a mistake? Let us know!

3. Which number has the prime factorization 2⁴ × 3²?

Found a mistake? Let us know!

4. How many divisors does 72 = 2³ × 3² have?

Found a mistake? Let us know!

5. What is the sum of all the divisors of 36?

Found a mistake? Let us know!

6. Which of these numbers is prime?

Found a mistake? Let us know!

7. To check whether 221 is prime, which primes do you need to test as divisors?

Found a mistake? Let us know!

8. In a factor tree for 90, a student writes 90 = 9 × 10. What are the circled primes at the end?

Found a mistake? Let us know!

9. Using prime factors, what is the GCF of 48 = 2⁴ × 3 and 180 = 2² × 3² × 5?

Found a mistake? Let us know!

10. Which number is a perfect square?

Found a mistake? Let us know!

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

Browse all 206 calculators

Related to This Article

What people say about "Prime Factorization Calculator With Factor Tree & Steps"?

No one replied yet.

Leave a Reply