Skip to main content
MathFree · no sign-up

Prime Factorization Calculator

Break a single number into its prime factors, with the exponent form, every divisor, and how many there are.

Updated

Any whole number from 2 to a million.

Prime factorisation

2^3 x 3^2 x 5

360 = 2 x 2 x 2 x 3 x 3 x 5

Prime factors
2 x 2 x 2 x 3 x 3 x 5
Exponent form
2^3 x 3^2 x 5
Number of divisors
24
Perfect square
no

The divisor count comes from the exponents rather than from testing every number: (3 + 1) x (2 + 1) x (1 + 1) = 24, because each divisor picks an independent power of each prime.

All divisors: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

Advertisement

In short

What is the prime factorization of 360?

2^3 x 3^2 x 5, which is 2 x 2 x 2 x 3 x 3 x 5. Divide by the smallest prime that fits, over and over, until you reach 1. Those exponents also give the divisor count: (3+1)(2+1)(1+1) is 24, so 360 has 24 divisors.

Every whole number above 1 has exactly one prime factorisation. That uniqueness is a theorem, not a convention.

How to use the prime factorization calculator

Type a number and read its primes. The method is division: divide by the smallest prime that goes in, then keep going with what is left, until nothing remains but 1. What comes out is unique to that number and cannot be arrived at any other way.

That uniqueness is the fundamental theorem of arithmetic, and it is stronger than it sounds. It is not merely that this method always terminates — it is that any method anyone uses arrives at the same primes with the same multiplicities. There is exactly one way to build 360 out of primes.

2^3 x 3^2 x 5

The factorisation of 360

unique to 360

24

How many divisors it has

(3+1)(2+1)(1+1)

1

Number of ways to factorise it

the fundamental theorem

Advertisement

The divisor count is the part worth understanding rather than accepting. Every divisor of 360 is built by choosing how many 2s to include, how many 3s, and how many 5s. There are four choices for the 2s, three for the 3s and two for the 5s, so there are 4 x 3 x 2 = 24 divisors and no need to test a single number.

Perfect squares fall straight out of the exponents. A number is a perfect square exactly when every exponent in its factorisation is even, because a square is the factorisation doubled. 144 is 2^4 x 3^2, all even, so it is 12 squared. 360 has a 3 and a 1 among its exponents, so it is not a square.

Factorisations worth recognising
64
2^6 · 7 divisors · a square
97
prime · 2 divisors
100
2^2 x 5^2 · 9 divisors · a square
144
2^4 x 3^2 · 15 divisors · a square
210
2 x 3 x 5 x 7 · 16 divisors
360
2^3 x 3^2 x 5 · 24 divisors
1000
2^3 x 5^3 · 16 divisors

The 210 row is the first number with four distinct primes, and 360 has more divisors than it despite being larger only by a factor under two. Divisor count tracks the shape of the exponents rather than the size of the number, which is why highly composite numbers like 360 turn up so often in calendars and measurements.

Two numbers instead of one

The greatest common factor page takes the shared primes of several numbers, which is what this factorisation is for once you have more than one of them.

Open GCF calculator

Prime factorisations with divisor counts worked from the exponents, showing why divisor count tracks the shape of a number rather than its size.

NumberFactorisationDivisor countFrom the exponentsSquare
362^2 x 3^29(2+1)(2+1)yes
642^67(6+1)yes
97972(1+1)no
1002^2 x 5^29(2+1)(2+1)yes
1282^78(7+1)no
1442^4 x 3^215(4+1)(2+1)yes
2102 x 3 x 5 x 716(1+1)(1+1)(1+1)(1+1)no
3602^3 x 3^2 x 524(3+1)(2+1)(1+1)no
10002^3 x 5^316(3+1)(3+1)no
Divisor count is the product of one more than each exponent. A perfect square is exactly a number whose exponents are all even.

What prime factorisation is actually for

It is taught as an exercise and used as a tool. Reducing a fraction, finding a common denominator, simplifying a radical and testing divisibility all become mechanical once both numbers are broken into primes, because the shared structure becomes visible.

Reducing 360/1000 by inspection
360
2^3 x 3^2 x 5
1000
2^3 x 5^3
Shared
2^3 x 5
That is
40, the greatest common factor
Reduced
9/25
No trial division
the primes did the work

Take the lowest power of each shared prime and multiply: that is the greatest common factor, every time. Take the highest power of every prime appearing in either, and that is the least common multiple. Both fall out of the same two factorisations.

The other use is negative. Factorisation is easy for small numbers and extremely hard for large ones, and the whole of public-key cryptography rests on that gap: multiplying two large primes is instant, and recovering them from the product is not.

Doing it by hand without guessing

Start with 2 and divide as many times as it goes. Move to 3, then 5, then 7, and keep going up the primes. You never need to test past the square root of what remains: if nothing below it divides, what is left is itself prime.

Do

  • Divide by 2 repeatedly before moving to any larger prime
  • Stop testing once the divisor exceeds the square root of what remains
  • Write the result in exponent form rather than a long product
  • Use the exponents to get the divisor count rather than listing them

Don't

  • Include 1 as a prime factor
  • Assume a number ending in an odd digit has no small factors
  • Test every number rather than just the primes
  • Expect this to be practical for numbers with hundreds of digits

The square-root rule is what makes hand factorisation feasible. To confirm 97 is prime you only need to test 2, 3, 5 and 7, because 11 squared is already above 97. Four divisions settle it rather than ninety-five.

Advertisement

The formula, worked line by line

Repeated division by the smallest prime that fits, and then one multiplication to count the divisors. Neither step involves any searching.

Every whole number above one is a product of primes in exactly one way. Not "can be written as" — is, uniquely.
The fundamental theorem of arithmetic

That is what makes the factorisation worth computing at all: it is a canonical description of the number rather than one representation among several.

divide by 2 while it goes, then 3, then 5, then 7, up the primes
stop when the divisor exceeds the square root of what remains
360 / 2 = 180 / 2 = 90 / 2 = 45 / 3 = 15 / 3 = 5 / 5 = 1
so 360 = 2^3 x 3^2 x 5
divisor count = product of (each exponent + 1)
Where a divisor count comes fromThree hundred and sixty factorises to two cubed times three squared times five, and multiplying one more than each exponent gives its twenty four divisors without testing any of them.360, FACTORISEDPrime factors2^3 x 3^2 x 5Add one to each power4 x 3 x 2Divisors24Checked by listing24 foundEach divisor picks anindependent power of eachprime: 2 can appear 0, 1, 2or 3 times, 3 can appear 0,1 or 2 times, 5 zero or once.
Three hundred and sixty broken into primes, and the divisor count its exponents give.
Why 360 has more divisors than 1000
360
2^3 x 3^2 x 5, three primes
Divisors
(3+1)(2+1)(1+1) = 24
1000
2^3 x 5^3, two primes
Divisors
(3+1)(3+1) = 16
1000 is larger by
nearly three times
Yet it has
8 fewer divisors

Spreading the exponents across more distinct primes produces more divisors than piling them onto fewer. That is why 360 became the degrees in a circle and the basis of so many old measurement systems: it divides evenly more ways than anything near its size.

Why the square root is where you can stop

Because factors come in pairs that multiply to the number. If a divides n, then n/a does too, and one of that pair is always at or below the square root. So testing past it only rediscovers partners of factors you already found.

What the factorisation gives you next

Everything that falls out of it
Greatest common factor
lowest power of each shared prime
Least common multiple
highest power of every prime
Divisor count
product of (exponent + 1)
Perfect square
every exponent even
Simplified radical
pull out the even powers
Terminating decimal
only 2s and 5s downstairs

Six separate questions, one computation. That is the argument for factorising first and answering afterwards, rather than attacking each question with its own method.

The one habit worth having: when a problem involves divisibility, common factors or simplifying, factorise first. The answer is usually visible once the primes are on the page.

Advertisement

Questions people ask

What is the prime factorization of 360?

2^3 x 3^2 x 5, or written out, 2 x 2 x 2 x 3 x 3 x 5. Divide by 2 three times to reach 45, then by 3 twice to reach 5, which is prime. Those exponents also give its 24 divisors, from (3+1) times (2+1) times (1+1).

How do I find the prime factors of a number?

Divide by the smallest prime that goes in and repeat with what is left. Start at 2, then 3, then 5, then 7, working up the primes. You can stop once your divisor passes the square root of what remains — whatever is left at that point is itself prime.

Why is 1 not a prime number?

Because including it would destroy the uniqueness of factorisation. If 1 were prime, 6 could be 2 x 3, or 1 x 2 x 3, or 1 x 1 x 2 x 3, and so on forever. The fundamental theorem says every number factorises in exactly one way, and excluding 1 is what makes that true.

How do I count the divisors of a number?

Add one to each exponent in the prime factorisation and multiply. For 360, which is 2^3 x 3^2 x 5, that is 4 x 3 x 2 = 24. It works because each divisor independently chooses how many of each prime to include, and the choices multiply.

Why does 360 have more divisors than 1000?

Because its exponents are spread across three distinct primes rather than two. 360 is 2^3 x 3^2 x 5 giving 24 divisors, while the larger 1000 is 2^3 x 5^3 giving only 16. That property is why 360 became the degrees in a circle and underlies many older measurement systems.