Prime Factorization

Prime factorization breaks any whole number into a unique multiplication of primes—essential for finding common factors and simplifying fractions.

n=p1e1p2e2pkekn = p_1^{e_1} p_2^{e_2} \cdots p_k^{e_k}

Solve a problem with Prime Factorization

Type the problem. The solver will use Prime Factorization where Prime Factorization is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Prime Factorization takes
nn
pip_i
eie_i
Prime Factorization
SymbolMeaning
nnThe whole number you're breaking apart; it must be an integer greater than 1.
pip_iA prime number—a number larger than 1 that is only divisible by 1 and itself; the subscript ii just labels which prime it is (first, second, third, etc.).
eie_iThe exponent, or power, showing how many times that prime appears as a factor; each exponent is at least 1, and we only include primes that actually divide nn.

When to use it

Use prime factorization when you need to find what numbers divide evenly into a bigger number, or when you want to simplify fractions.

Level

Usually taught in: Pre-Algebra

Worked examples

1. Find the prime factorization of 36

Problem

Find the prime factorization of 36.
  1. 36=21836 = 2 \cdot 18

    Divide by 2, the smallest prime.

  2. 18=2918 = 2 \cdot 9

    18 is still even, so divide by 2 again.

  3. 9=339 = 3 \cdot 3

    9 is odd, but divisible by 3.

  4. 36=223236 = 2^{2} \cdot 3^{2}

    Count the prime factors: two 2s and two 3s, so write as powers.

Answer: 22322^{2} \cdot 3^{2}

This method—dividing by small primes one at a time—always works and always gives the same answer. The exponents tell you how many of each prime you have.

2. Find the prime factorization of 60

Problem

Find the prime factorization of 60.
  1. 60=23060 = 2 \cdot 30

    Start with the smallest prime, 2.

  2. 30=21530 = 2 \cdot 15

    30 is still even, divide by 2 again.

  3. 15=3515 = 3 \cdot 5

    15 is odd, so it is not divisible by 2; try 3, and 15÷3=515 \div 3 = 5.

  4. 60=223560 = 2^{2} \cdot 3 \cdot 5

    Both 3 and 5 appear once (exponent 1), and 2 appears twice (exponent 2).

Answer: 22352^{2} \cdot 3 \cdot 5

With three different prime factors, you need to try each small prime (2, then 3, then 5) in order until you reach a prime. This systematic approach ensures you do not miss any factors.

3. Find prime factorizations for a lab sensor schedule

Problem

A lab records temperature every 12 seconds and humidity every 18 seconds. Find the prime factorizations of both numbers to determine when both readings will be taken at the same time.
  1. 12=2612 = 2 \cdot 6

    First, find the prime factorization of 12 by dividing by 2.

  2. 6=236 = 2 \cdot 3

    Divide 6 by 2.

  3. 12=22312 = 2^{2} \cdot 3

    12 is now fully factored; 2 appears twice and 3 appears once.

  4. 18=2918 = 2 \cdot 9

    Now find the prime factorization of 18 by dividing by 2.

  5. 9=339 = 3 \cdot 3

    9 is not divisible by 2, but it is divisible by 3; divide by 3 twice.

  6. 18=23218 = 2 \cdot 3^{2}

    18 is fully factored; 2 appears once and 3 appears twice.

Answer: 12=223 and 18=23212 = 2^{2} \cdot 3 \text{ and } 18 = 2 \cdot 3^{2}

In real-world applications like lab equipment scheduling, prime factorization helps you find when different intervals overlap. The least common multiple combines the highest power of each prime: 222^{2} (from 12) and 323^{2} (from 18), giving 2232=362^{2} \cdot 3^{2} = 36 seconds when both readings occur together.

Common mistakes

Where Prime Factorization usually goes wrong
Answer came out wrong
Writing 36=2×1836 = 2 \times 18 and thinking this is the complete prime factorization.
Keep dividing: 18=2918 = 2 \cdot 9 and 9=339 = 3 \cdot 3, so 36=223236 = 2^{2} \cdot 3^{2}.
Including 1 in the prime factorization: 36=1223236 = 1 \cdot 2^{2} \cdot 3^{2}.
Write only the primes and their exponents: 36=223236 = 2^{2} \cdot 3^{2}.
Writing 60=231060 = 2 \cdot 3 \cdot 10 as the prime factorization.
Continue factoring: 60=2325=223560 = 2 \cdot 3 \cdot 2 \cdot 5 = 2^{2} \cdot 3 \cdot 5.
The mistakeWhy it is wrongThe fix
Writing 36=2×1836 = 2 \times 18 and thinking this is the complete prime factorization.18 is not a prime number, so the factorization is incomplete; you must continue dividing until all factors are prime.Keep dividing: 18=2918 = 2 \cdot 9 and 9=339 = 3 \cdot 3, so 36=223236 = 2^{2} \cdot 3^{2}.
Including 1 in the prime factorization: 36=1223236 = 1 \cdot 2^{2} \cdot 3^{2}.1 is not prime (primes must be greater than 1), and multiplying by 1 adds nothing, so it is always left out of prime factorizations.Write only the primes and their exponents: 36=223236 = 2^{2} \cdot 3^{2}.
Writing 60=231060 = 2 \cdot 3 \cdot 10 as the prime factorization.10 is not prime because 10=2510 = 2 \cdot 5; you must break it down further until every factor is prime.Continue factoring: 60=2325=223560 = 2 \cdot 3 \cdot 2 \cdot 5 = 2^{2} \cdot 3 \cdot 5.

Tips and when to use something else

  • Always start with 2: if the number is even, divide by 2 repeatedly until you get an odd number.
  • Use divisibility rules to speed up—a number ending in 0 or 5 is divisible by 5, and if the digits sum to a multiple of 3, the number is divisible by 3.
  • Draw a factor tree if you get confused: start with any two factors and branch down until everything is prime; you will get the same result no matter which factors you start with.
  • If you only need to simplify a fraction, you do not need to find the full prime factorization—just use the Greatest Common Factor to cancel common factors directly.

Frequently asked questions

What is the difference between factors and a prime factorization?
Factors are any numbers that divide evenly into your number—for 12, that is 1, 2, 3, 4, 6, and 12. A prime factorization is a specific product using only prime factors and their exponents: 12=22312 = 2^{2} \cdot 3. Prime factorization is unique and tells you the building blocks of the number.
Why is 1 not a prime number?
A prime number is defined as having exactly two distinct factors: 1 and itself. Since 1 only has one factor (itself), it does not fit the definition. Also, if 1 were prime, every number would have infinitely many factorizations (you could multiply by 1 as many times as you want), which would break the uniqueness of prime factorization.
Can I find the prime factorization of 0 or negative numbers?
No. Prime factorization only applies to whole numbers greater than 1. We do not factorize 1, 0, or negative numbers because the definition of primes requires them to be positive integers greater than 1.
Does the order of primes matter in the factorization?
No, the order does not matter because multiplication is commutative (order does not change the result). 2232^{2} \cdot 3 and 3223 \cdot 2^{2} are the same. The prime factorization of a number is unique, meaning there is only one correct set of primes and exponents.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18