Prime Factorization Calculator
Find the prime factors of a number with step-by-step division, exponent form, a factor tree, factor pairs and a check of the answer.
- Expanded form
- 2 × 2 × 2 × 3 × 3 × 56 prime factors, counting repeats
- Exponent form
- 2³ × 3² × 5
- Prime factors
- 2, 3, 53 distinct primes
- Prime?
- No
- Composite
- Even or odd
- Even
- Distinct prime factors
- 3
- 2, 3, 5
- Total prime factors
- 6
- Counting repeats
Step-by-step factorization
Step 1: Divide by the smallest prime, again and again
Divide by 2 as long as the result stays whole, then by 3, then 5, and so on, until the quotient is 1.
360 ÷ 2 = 180
180 ÷ 2 = 90
90 ÷ 2 = 45
45 ÷ 3 = 15
15 ÷ 3 = 5
5 ÷ 5 = 1
Step 2: Write the divisors as a product
The primes you divided by, multiplied together, give back the original number.
360 = 2 × 2 × 2 × 3 × 3 × 5
Step 3: Group repeated primes with exponents
Exponents make repeated factors easier to read: 2 × 2 × 2 is written 2³.
360 = 2³ × 3² × 5
Factor tree for 360
Verify the factorization
2³ × 3² × 5
= 8 × 9 × 5
= 72 × 5
= 360 ✓
Multiplying the prime factors gives back 360, so 360 = 2³ × 3² × 5 is correct.
Number of factors
If n = pa × qb × …, then n has (a + 1)(b + 1)… positive factors, because each factor uses p between 0 and a times, q between 0 and b times, and so on.
360 = 2³ × 3² × 5¹
Number of factors = (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24
Factor pairs of 360
Factor pairs are pairs of whole numbers whose product equals the original number.
- 1 × 360
- 2 × 180
- 3 × 120
- 4 × 90
- 5 × 72
- 6 × 60
- 8 × 45
- 9 × 40
- 10 × 36
- 12 × 30
- 15 × 24
- 18 × 20
Factors vs prime factors
- All factors (24)
- 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
- Every whole number that divides 360 exactly
- Prime factors
- 2, 3, 5
- Only the factors that are prime numbers
- Prime factorization
- 360 = 2³ × 3² × 5
- The prime factors multiplied together, with repeats, to make 360
Prime factorizations make other problems quick: find the greatest common factor with the GCF Calculator, the least common multiple with the LCM Calculator, or simplify a fraction with the Fraction Calculator. To check whether a number is prime and find its neighbouring primes, use the Prime Number Calculator; for remainders and divisibility, the Modulo Calculator; and to see how many primes go into n!, the Factorial Calculator.
Prime factorization writes a whole number as a product of prime numbers: 360 = 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5 in exponent form. This prime factorization calculator finds the prime factors of a number and shows the working, so you can see how the answer is reached and check it.
Enter a positive whole number to get its prime factorization in expanded and exponent form, the step-by-step division, a factor tree, a verification, the number of factors, and its factor pairs, with factors and prime factors listed side by side.
Worked Calculation Examples
| Scenario | Result | Calculation Step |
|---|---|---|
| Prime factorization of 12 | 2² × 3 | 12 ÷ 2 = 6, 6 ÷ 2 = 3, 3 ÷ 3 = 1. So 12 = 2 × 2 × 3 = 2² × 3: two distinct primes, three prime factors counting the repeat. |
| Prime factorization of 36 | 2² × 3² | 36 ÷ 2 = 18, 18 ÷ 2 = 9, 9 ÷ 3 = 3, 3 ÷ 3 = 1. So 36 = 2 × 2 × 3 × 3 = 2² × 3², and it has (2 + 1)(2 + 1) = 9 factors. |
| Prime factorization of 60 | 2² × 3 × 5 | 60 ÷ 2 = 30, 30 ÷ 2 = 15, 15 ÷ 3 = 5, 5 ÷ 5 = 1. As a factor tree, 60 = 6 × 10 = (2 × 3) × (2 × 5). Either way, 60 = 2² × 3 × 5. |
| Prime factorization of 360 | 2³ × 3² × 5 | 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5, 5 ÷ 5 = 1. So 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. Check: 8 × 9 × 5 = 360. |
| 97, a prime number | 97 | √97 ≈ 9.85, and none of the primes 2, 3, 5 or 7 divides 97, so 97 is prime. Its prime factorization is simply 97; it is not written 1 × 97, because 1 is not prime. |
| A larger number: 1,001 | 7 × 11 × 13 | 1,001 is odd, its digit sum 2 is not divisible by 3, and it does not end in 0 or 5, so 2, 3 and 5 fail. 1,001 ÷ 7 = 143, 143 ÷ 11 = 13, 13 ÷ 13 = 1, so 1,001 = 7 × 11 × 13. |
What Is Prime Factorization?
Prime factorization is the process of expressing a positive whole number as a product of prime numbers, the numbers greater than 1 whose only factors are 1 and themselves (2, 3, 5, 7, 11, …). For example, 60 = 2 × 2 × 3 × 5, or 60 = 2² × 3 × 5.
However you find it, you always end up with the same primes. You might split 60 as 6 × 10 or as 4 × 15, but both lead to two 2s, one 3 and one 5. This is the Fundamental Theorem of Arithmetic: every whole number greater than 1 has exactly one prime factorization, apart from the order of the factors. That is why 1 is not counted as a prime: if it were, you could add any number of 1s, and the factorization would no longer be unique.
How to Find the Prime Factorization of a Number
The division method works for any number:
1. Start with the smallest prime that divides the number, usually 2.
2. Divide by that prime, and keep dividing by it while the result stays a whole number.
3. Move on to the next prime (3, 5, 7, …) and repeat with the quotient.
4. Stop when the quotient is 1.
5. Multiply all the primes you divided by, and combine repeated ones with exponents.
Example with 84: 84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7, 7 ÷ 7 = 1. The divisors were 2, 2, 3 and 7, so 84 = 2 × 2 × 3 × 7 = 2² × 3 × 7.
You only need to test primes up to the square root of the number that is left. If none divides it, what is left is prime.
Exponent Form
Repeated prime factors are easier to read with exponents: the exponent says how many times the prime is multiplied. 72 = 2 × 2 × 2 × 3 × 3 becomes 72 = 2³ × 3², and 1,024 = 2 × 2 × … × 2 (ten 2s) becomes 2¹⁰. A prime with no exponent, such as the 5 in 360 = 2³ × 3² × 5, appears once, so its exponent is 1.
Factors, Prime Factors and Factor Pairs
These three ideas are easy to mix up. Take 36:
Factors are all the whole numbers that divide 36 exactly: 1, 2, 3, 4, 6, 9, 12, 18 and 36.
Factor pairs are two factors whose product is 36: 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6.
Prime factors are only the factors that are prime: 2 and 3. The prime factorization multiplies them, with repeats, to make the number: 36 = 2² × 3².
Number of Factors From the Prime Factorization
If n = p^a × q^b × r^c …, then n has (a + 1)(b + 1)(c + 1)… positive factors. Each factor is built by choosing how many times to use each prime: p from 0 to a times (a + 1 choices), q from 0 to b times, and so on.
For 360 = 2³ × 3² × 5¹: (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24 factors. For 36 = 2² × 3²: 3 × 3 = 9 factors. A number has an odd number of factors exactly when every exponent is even, which happens only for perfect squares.
Prime Factorization and Divisibility Rules
Divisibility rules tell you quickly which small primes to try first:
2: the number is even (its last digit is 0, 2, 4, 6 or 8).
3: the sum of its digits is divisible by 3. For 360, 3 + 6 + 0 = 9, so 3 divides 360.
5: the last digit is 0 or 5.
10: the last digit is 0, which means both 2 and 5 are prime factors.
The prime factorization answers every divisibility question at once: a number d divides n exactly when each prime in d appears in n at least as many times. 360 = 2³ × 3² × 5 is divisible by 12 = 2² × 3 but not by 16 = 2⁴.
Uses of Prime Factorization
Greatest common factor (GCF): multiply the primes the numbers share, each to its smallest power. 12 = 2² × 3 and 18 = 2 × 3², so GCF = 2 × 3 = 6.
Least common multiple (LCM): multiply every prime that appears, each to its largest power. LCM(12, 18) = 2² × 3² = 36.
Simplifying fractions: cancel the common primes. 36/60 = (2² × 3²) / (2² × 3 × 5) = 3/5.
Square roots and number theory: √360 = √(2² × 3² × 2 × 5) = 6√10, and the counting of factors, perfect squares and common denominators all start from the prime factorization. Large-number cryptography such as RSA relies on the fact that factoring a product of two huge primes is extremely slow.
How to Use the Prime Factorization Calculator
- Enter a positive whole number, such as 360, up to one trillion. Results update as you type.
- Read the prime factorization in the result card, in exponent form (360 = 2³ × 3² × 5) and expanded form (2 × 2 × 2 × 3 × 3 × 5), with the distinct and total number of prime factors.
- Follow the step-by-step factorization: repeated division by the smallest prime until the quotient is 1, then grouping repeated primes with exponents.
- Check the answer in "Verify the factorization", which multiplies the prime powers back together, and see the factor tree for numbers with up to 12 prime factors.
- Use the factor pairs, the full list of factors and the number-of-factors formula to compare factors, prime factors and the prime factorization.
Frequently Asked Questions
What is prime factorization?
Writing a positive whole number as a product of prime numbers. For example, 60 = 2 × 2 × 3 × 5, or 2² × 3 × 5 in exponent form.
How do you find the prime factorization of a number?
Divide by the smallest prime that goes in exactly, keep dividing the quotient by primes (2, then 3, 5, 7, …) until you reach 1, then multiply the primes you used. For 84: 84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7, 7 ÷ 7 = 1, so 84 = 2² × 3 × 7.
What is the prime factorization of 12?
12 = 2 × 2 × 3 = 2² × 3.
What is the prime factorization of 36?
36 = 2 × 2 × 3 × 3 = 2² × 3².
What is the prime factorization of 360?
360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. It has 3 distinct prime factors, 6 prime factors counting repeats, and 24 factors in total.
What is the difference between factors and prime factors?
Factors are all the whole numbers that divide a number exactly; prime factors are only the ones that are prime. The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36, but its prime factors are just 2 and 3.
What happens when the number is already prime?
Its prime factorization is the number itself. 29 is prime, so its prime factorization is simply 29, with one prime factor. It is not written 1 × 29, because 1 is not a prime number.
Is 1 a prime factor?
No. 1 is not a prime number, because a prime has exactly two factors and 1 has only one. Leaving 1 out also keeps every prime factorization unique. The number 1 itself has no prime factors.
How can prime factorization be used to find the GCF?
Factor each number and multiply the primes they have in common, each raised to the smallest power that appears. 12 = 2² × 3 and 18 = 2 × 3², so GCF(12, 18) = 2 × 3 = 6.
How can prime factorization be used to find the LCM?
Factor each number and multiply every prime that appears, each raised to the largest power that appears. 12 = 2² × 3 and 18 = 2 × 3², so LCM(12, 18) = 2² × 3² = 36.
Is prime factorization unique?
Yes, apart from the order of the factors. The Fundamental Theorem of Arithmetic says every whole number greater than 1 is a product of primes in exactly one way, so 60 = 6 × 10 and 60 = 4 × 15 both end at 2² × 3 × 5.
How large a number can this calculator factor?
Any whole number up to one trillion (1,000,000,000,000), exactly. Larger numbers can take too long to factor by trial division in the browser, so the calculator asks for a smaller number instead of showing a partial answer.
Related Calculators
GCF Calculator
Find the greatest common factor of two or more whole numbers, with verification, Euclidean algorithm steps, common factors, and prime factorization.
LCM Calculator
Find the least common multiple of two or more whole numbers, with verification, GCD steps, and the prime factorization method.
Prime Number Calculator
Check whether a whole number is prime or composite, list its factors and prime factorization, and find the nearest primes.
Fraction Calculator
Add, subtract, multiply, and divide fractions.
Modulo Calculator
Find a mod b, the remainder of a division, with the quotient, the equation a = bq + r and step-by-step working, including negative numbers.
Factorial Calculator
Calculate n! exactly, with the step-by-step multiplication, digit count, trailing zeros and scientific notation.
Last updated: September 27, 2026.