Prime Factorization Calculator
Prime factors, the divisor count, and where it comes from.
Work out Prime Factorization. Prime factors, the divisor count, and where it comes from. Shows the working, not just the answer.
Prime factorisation
2^3 × 3^2 × 5
24 divisors in total
The divisor count comes straight from the exponents: add one to each and multiply. Here (3+1) × (2+1) × (1+1) = 24. That works because a divisor is built by choosing how many of each prime to include, from none up to all of them.
How the Prime Factorization Calculator works
Prime factorisation by trial division up to the square root — any composite must have a factor at or below its square root, which is what makes this fast enough to run on a nine-digit number in a browser. It also derives the divisor count from the exponents and explains the derivation.
Also known as: prime factors calculator · factor tree calculator · is this number prime · prime factorisation calculator
Why the square root bound works
Any composite number has a factor at or below its square root. If both factors exceeded it, their product would exceed the number itself.
So trial division can stop at √n, and whatever remains above 1 must be prime. That turns an O(n) search into O(√n) — the difference between a thousand steps and thirty-one for a million.
In practice
360 factors as 2³ × 3² × 5. The full list is 2, 2, 2, 3, 3, 5, and grouping the repeats is what produces the exponent form.
The divisor count follows straight from those exponents: add one to each and multiply. (3+1)(2+1)(1+1) = 24, and 360 does indeed have 24 divisors.
That works because a divisor is built by choosing how many of each prime to include — none, one, two or three of the 2s, and so on. The choices multiply.
Why 1 is not prime
It looks arbitrary until you consider unique factorisation. Every number above 1 factors into primes in exactly one way, and that uniqueness is the foundation of most of number theory.
If 1 counted as prime, that would collapse: 6 could be 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3, without limit. Excluding 1 keeps the factorisation unique, which is worth more than the tidiness of including it.
Frequently asked questions
How do I find the prime factorisation?
Divide by the smallest prime that fits, repeatedly, until nothing is left. 360 gives 2 × 2 × 2 × 3 × 3 × 5, written 2³ × 3² × 5.
How many divisors does a number have?
Add one to each exponent in its prime factorisation and multiply. 360 is 2³ × 3² × 5, so (3+1)(2+1)(1+1) = 24 divisors. That works because a divisor is built by choosing how many of each prime to include.
How can I tell if a number is prime?
Test for factors up to its square root only. If none divides it, it is prime — any composite must have a factor at or below its square root, so there is no need to look further.
Why is 1 not prime?
Because unique factorisation would break. If 1 counted as prime, every number would have infinitely many factorisations, since you could multiply in as many 1s as you liked.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/prime-factorization-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Prime Factorization Calculator"></iframe>The only condition is that the credit line stays visible. It sits inside the frame, so you do not have to do anything to keep it.