Browse All Calculators

Prime Factorization Calculator

Free prime factorization calculator. Break any whole number into its prime factors, see the factor tree, exponent form, divisors and the working, step by step.

100% Free
No Sign-up
Instant Results
Works on Mobile

Prime Factorization Calculator

n = 108
Try an example
Step-by-step working
  1. Start with the number: 108.
  2. Divide by 2 twice: 108 ÷ 2 = 54, 54 ÷ 2 = 27.
  3. Divide by 3 three times: 27 ÷ 3 = 9, 9 ÷ 3 = 3, 3 ÷ 3 = 1.
  4. Multiply the primes back together: 2 × 2 × 3 × 3 × 3 = 108.
  5. Group equal factors: 2² × 3³.
prime factorization of 108
2² × 3³
= 2 × 2 × 3 × 3 × 3
Distinct primes
2
Total prime factors
5
Divisors
12
Type
Composite
Rules applied
  • Smallest prime first: divide by 2 as long as it fits, then 3, then 5, and so on, until nothing is left but 1.
  • Exponent form: equal primes are grouped, so 2 × 2 × 3 becomes 2² × 3.
  • Number of divisors: add 1 to each exponent and multiply the results.
Check your answer
  • Multiplying the factors gives 108.
  • Divisors: (2 + 1) × (3 + 1) = 12. Their sum is 280.
  • Numbers up to 108 that share no factor with it: 36 (Euler’s totient).
Quick note
Every whole number above 1 has exactly one prime factorization, apart from the order of the factors.
Prime Factorization Calculator - break a number into prime factors with a factor tree and steps online on HighCalc

Prime Factorization Calculator: Find the Prime Factors of Any Number

This free prime factorization calculator breaks a whole number into the prime numbers that multiply together to make it. It shows the factors in a list and in exponent form, draws a factor tree, tells you whether the number is prime, and counts its divisors. Every division is written out, so the page also works as a quick way to check homework.

Quick answer: the prime factorization of 108 is 2 × 2 × 3 × 3 × 3, which is written 2² × 3³. It has 12 divisors.

What Are Prime Factors?

A prime number is a whole number greater than 1 whose only divisors are 1 and itself. The first few are 2, 3, 5, 7, 11 and 13. Any other whole number is composite, which means it can be split into smaller numbers. Prime factors are the primes you get when you keep splitting until no more splitting is possible. Every number above 1 has exactly one set of prime factors, which is why they are sometimes called the building blocks of numbers.

How to Find the Prime Factors of a Number

Divide the number by 2 as many times as it goes in evenly. Then try 3, then 5, then 7, and carry on through the primes. Each time a prime divides exactly, write it down and continue with the answer. Stop when the result is 1. You only need to test primes up to the square root of what is left, because if none of them fit, the remaining number is itself prime. The calculator follows exactly these steps and lists them in the working box.

NumberPrime factorizationDivisors
122² × 36
602² × 3 × 512
842² × 3 × 712
1002² × 5²9
1082² × 3³12
3602³ × 3² × 524
10017 × 11 × 138
99739973 (prime)2

Factor Trees

A factor tree is a picture of the same process. Write the number at the top, split it into two factors, and keep splitting any factor that is not prime. The numbers at the ends of the branches are the prime factors. Different trees for the same number can look different, but they always end with the same primes. The graph above draws the tree for numbers up to 99,999, and for larger numbers it shows the prime powers as blocks instead.

Exponent Form and Divisors

When a prime repeats, it is written with an exponent, so 2 × 2 × 2 becomes 2³. This short form makes the divisor count easy: add 1 to each exponent and multiply the results. For 2² × 3³ that is (2 + 1) × (3 + 1) = 12 divisors. The same idea gives the sum of divisors and Euler's totient, which are both shown in the Check your answer box.

Uses of Prime Factorization

Prime factors are used to simplify fractions, find the greatest common factor and the least common multiple, and to tell whether a number is a perfect square or a perfect cube. They also appear in number theory and in the codes that protect online payments. To simplify a fraction after factoring, the fraction calculator is a handy next step, and the math solver, the scientific calculator and the percentage calculator cover other everyday number work.

How to Use This Prime Factorization Calculator

1

Enter a number

Type a whole number, drag the slider, or tap one of the examples.

2

Read the factors

See the prime factors in list form and in exponent form.

3

Check the working

Follow each division in the step-by-step box.

4

Use the extras

See the factor tree, the divisor count and whether the number is prime.

Features

Instant Results
The answer updates as you type
Prime Check
Tells you if a number is prime
Exponent Form
Short form such as 2² × 3³
Factor Tree
See how the number splits
Step-by-Step Working
Every division written out
Mobile Friendly
Works smoothly on phones, tablets and desktops
Frequently Asked Questions
Common questions about the Prime Factorization Calculator.
What is prime factorization?
Prime factorization writes a whole number as a product of prime numbers. A prime is a number above 1 that can only be divided evenly by 1 and itself, such as 2, 3, 5, 7 and 11. For example, 108 = 2 × 2 × 3 × 3 × 3, which is written in short form as 2² × 3³.
How do I find the prime factors of a number?
Divide the number by the smallest prime that goes into it evenly, then divide the answer again, and keep going until you reach 1. Start with 2, then try 3, 5, 7 and so on. The primes you divided by are the prime factors. The Step-by-step working box on this page shows each division.
What is a factor tree?
A factor tree splits a number into two factors, then splits any factor that is not prime, and repeats until every branch ends in a prime. The primes at the ends of the branches are the prime factors. The graph in the calculator draws this tree for numbers up to 99,999 that have at most eight prime factors.
Is 1 a prime number?
No. A prime number must have exactly two different divisors, 1 and itself, and the number 1 has only one divisor. It is also not composite, so it is neither prime nor composite. That is why the calculator reports that 1 has no prime factors.
Can two different numbers have the same prime factorization?
No. Every whole number above 1 has exactly one prime factorization, apart from the order of the factors. This rule is called the fundamental theorem of arithmetic, and it is the reason prime factors are used to find the greatest common factor, the least common multiple and the number of divisors.
How large a number can I enter?
You can enter any whole number from 1 up to 999,999,999,999,999. Numbers with large prime factors take a little longer, but the answer still appears right away for most inputs. Decimals, zero and negative numbers have no prime factorization, so the calculator asks you to change them.