Prime Factorization Formula with Worked Examples

#Formula
TL;DR
The prime factorization formula writes any integer above 1 as n=p1a1×p2a2×⋯n = p_1^{a_1} \times p_2^{a_2} \times \cdots, a product of prime powers. This article gives five worked examples.
BT
Bhanzu TeamLast updated on November 7, 20266 min read

Key Points

  • The prime factorization formula is n=p1a1×p2a2×⋯×pkakn = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}, where each pp is a prime and each aa its exponent.

  • Every integer greater than 1 has exactly one such factorisation, apart from the order in which the primes are written.

  • The number 1 is never a prime factor, because it is not a prime, and including it would destroy that uniqueness.

  • Two standard methods reach the same answer: a factor tree, which splits repeatedly, and repeated division by the smallest prime that divides.

  • Trial division only needs primes up to n\sqrt{n}, so if none divides, the number is itself prime.

What Is the Prime Factorization Formula?

The prime factorization formula expresses a whole number as a product of primes, each raised to a power:

n=p1a1×p2a2×⋯×pkakn = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}

For example 360=23×32×5360 = 2^3 \times 3^2 \times 5. The classical treatment of this material is in Euclid's Elements, whose books seven to nine MacTutor records as dealing with number theory.

Why the Factorisation Is Unique and Why 1 Is Excluded

Factorising 12 as 22×32^2 \times 3 is the only way to write it as a product of primes. Reordering the factors changes nothing, and no different set of primes multiplies to 12.

That uniqueness is what makes prime factorisation useful. It gives every number a single fingerprint, which is why the HCF and the LCM can be read straight off two factorisations.

Admitting 1 as a prime factor would wreck it. Since 1×1=11 \times 1 = 1, you could write 12=1×22×312 = 1 \times 2^2 \times 3 or 150×22×31^{50} \times 2^2 \times 3, and the factorisation would stop being unique. That is the structural reason 1 is defined as neither prime nor composite.

Variable Key

Symbol

Meaning

Unit or type

Notes

nn

the number being factorised

integer above 1

1 has no prime factorisation

pip_i

a prime factor

prime number

listed in increasing order by convention

aia_i

the exponent

positive integer

how many times pip_i divides

n\sqrt{n}

trial-division limit

number

test primes only up to here

Examples of the Prime Factorization Formula

Example 1

Find the prime factorisation of 60.

Divide repeatedly by the smallest prime that works:

60÷2=30,30÷2=15,15÷3=5,5÷5=160 \div 2 = 30, \quad 30 \div 2 = 15, \quad 15 \div 3 = 5, \quad 5 \div 5 = 1 60=22×3×560 = 2^2 \times 3 \times 5

Final answer: 22×3×52^2 \times 3 \times 5

Example 2

Find the prime factorisation of 36, stopping at 4×94 \times 9.

Splitting 36 into 4×94 \times 9 looks like a complete factorisation, since neither factor divides the other.

But the formula asks for a product of primes, and neither 4 nor 9 is prime. Both are composite and split further.

Continuing until every factor is prime:

4=2×2,9=3×34 = 2 \times 2, \qquad 9 = 3 \times 3 36=22×3236 = 2^2 \times 3^2

Final answer: 22×322^2 \times 3^2. A factorisation is finished only when no factor can be split again.

Example 3

Find the prime factorisation of 97.

Test primes up to 97≈9.85\sqrt{97} \approx 9.85, so 2, 3, 5 and 7. None divides 97.

Final answer: 97 is prime, so its factorisation is simply 97.

Stopping at n\sqrt{n} is safe, because any factor larger than the square root would have to pair with one smaller than it, which the search would already have found.

Example 4

Find the prime factorisation of 1,260.

1260÷2=630, ÷2=315, ÷3=105, ÷3=35, ÷5=7, ÷7=11260 \div 2 = 630, \ \div 2 = 315, \ \div 3 = 105, \ \div 3 = 35, \ \div 5 = 7, \ \div 7 = 1 1260=22×32×5×71260 = 2^2 \times 3^2 \times 5 \times 7

Final answer: 22×32×5×72^2 \times 3^2 \times 5 \times 7

Example 5

Use prime factorisation to find the HCF and LCM of 48 and 180.

48=24×3,180=22×32×548 = 2^4 \times 3, \qquad 180 = 2^2 \times 3^2 \times 5

For the HCF take the lowest power of each shared prime; for the LCM take the highest power of every prime:

HCF=22×3=12,LCM=24×32×5=720\text{HCF} = 2^2 \times 3 = 12, \qquad \text{LCM} = 2^4 \times 3^2 \times 5 = 720

Final answer: HCF 12 and LCM 720. The least common multiple formula covers that second result in full.

Don't Confuse These Four Ideas

Term

Meaning

Example for 12

Prime factorisation

product of prime powers

22×32^2 \times 3

Factors

all numbers dividing it

1, 2, 3, 4, 6, 12

Prime factors

only the primes dividing it

2 and 3

Multiples

numbers it divides into

12, 24, 36, …

Factors and prime factors are the pair most often confused. The number 12 has six factors but only two distinct prime factors, and 1 appears in the factor list while never appearing among the prime factors.

Prime Factorization, Where Things Go Sideways

Mistake 1: Stopping before every factor is prime

Where it slips in: A split into two sensible-looking numbers feels like the job is done.

Don't do this: 36=4×936 = 4 \times 9

The correct way: Keep splitting until nothing can be split, giving 22×322^2 \times 3^2. Test each factor against the primes before declaring the factorisation complete.

Students who circle every prime leaf as they reach it, and leave composite ones uncircled, can see at a glance whether the tree has finished. The uncircled numbers are a visible list of work still to do.

Mistake 2: Including 1 as a prime factor

Where it slips in: 1 divides every number, so it looks like a universal factor.

Don't do this: 12=1×22×312 = 1 \times 2^2 \times 3

The correct way: Omit 1 entirely. It is not prime, and including it would make the factorisation non-unique since any power of 1 could be inserted.

Mistake 3: Losing a repeated prime

Where it slips in: The distinct primes get noted but their multiplicities do not.

Don't do this: 360=2×3×5360 = 2 \times 3 \times 5

The correct way: Count how many times each prime divides, giving 23×32×52^3 \times 3^2 \times 5. Multiplying the answer back out is the check: 2×3×5=302 \times 3 \times 5 = 30, not 360.

Bottom Line

  • The prime factorization formula writes nn as a product of prime powers, p1a1×p2a2×⋯p_1^{a_1} \times p_2^{a_2} \times \cdots.

  • The factorisation is unique for every integer above 1, which is what makes it useful for HCF and LCM.

  • 1 is excluded because its inclusion would destroy that uniqueness.

  • Trial division only needs primes up to the square root of the number.

  • To work through number theory with a teacher, explore a 5th grade math tutor or math tuition.

Where to Go From Here

Find the prime factorisation of 84, then of 225. Then take 72 and 120, factorise both, and read off their HCF and LCM from the prime powers.

Want a live Bhanzu trainer to walk through more number theory problems? Book a free demo class.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the prime factorization formula?
n=p1a1×p2a2×⋯n = p_1^{a_1} \times p_2^{a_2} \times \cdots, writing the number as a product of primes raised to powers.
Is the prime factorization formula result always unique?
Yes, for every integer greater than 1, apart from the order in which the primes are written.
Why is 1 not a prime factor?
Because 1 is not prime, and allowing it would let any number of 1s be inserted, which would destroy the uniqueness of the factorisation.
How far do I need to test for factors?
Only up to n\sqrt{n}. If no prime at or below the square root divides the number, the number is itself prime.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →